frosty frosty - 2 months ago 21
HTML Question

Imgur gifv file doesn't load as expected using video tag

<video width="320" height="240" controls>
<source src="http://i.imgur.com/91S22q6.gifv" type="video/webm">
Your browser does not support the video tag.
</video>


This doesn't seem to load the video. I assume the
.gifv
is messing it up somehow when it needs to use
.webm
. When I change it to
.webm
, it still doesn't load. Is there any way to embed a
.gifv
?

Answer

Iframe method:

<iframe src="https://imgur.com/91S22q6/embed" width="200" height="220" scrolling="no" style="border:none;"></iframe>

HTML video method using webm:

<video preload="auto" autoplay="autoplay" loop="loop" style="width: 200px; height: 200px;">
    <source src="//i.imgur.com/91S22q6.webm" type="video/webm"></source>
</video>

I changed the source extension from .gifv to .webm, removed the controls tag, set preload to auto, added autoplay, and added loop.