frosty
frosty

Reputation: 2851

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?

Upvotes: 3

Views: 7900

Answers (3)

Code Lover
Code Lover

Reputation: 863

The 'webm' method has been discontinued now. The new method is:

<video preload="auto" autoplay="autoplay" loop="loop" style="max-width: 90%; height: auto;">
  <source src="https://i.imgur.com/hxcsP6x.mp4" type="video/mp4">
</video>

Upvotes: 1

yousurname
yousurname

Reputation: 41

I recently had an issue with embedding a gifv using the webm extension. I had success replacing the "webm" extension with "mp4". This was only for a recently uploaded file, an older file did not have any issue.

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

This imgur support page seems to indicate using mp4 rather than webm: Sharing Posts, GIFs, GIFvs, and Images

Upvotes: 4

spencer.sm
spencer.sm

Reputation: 20604

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.

Upvotes: 6

Related Questions