7

Consider this, “GIFV good”: http://i.imgur.com/SQXB06O.gifv

Consider this, “GIFV bad”: http://i.imgur.com/MHfD9WX.gifv

Now both of these are recent uploads; 13 and 15 hours old respectively. However one plays as a video and one plays as a GIF. You can tell because if you right click GIFV good it says Pause, while if you right click GIFV bad it says View Image.

I know that GIFV bad has a video available:

$ wget --spider http://i.imgur.com/MHfD9WX.webm
HTTP request sent, awaiting response... 200 OK
Length: 542519 (530K) [video/webm]

However if you try http://i.imgur.com/MHfD9WX.webm directly, it just redirects you to the GIFV and plays a GIF.

What is causing this behavior?

6

According to Imgur staff:

we surface the original GIF if it's under 2M


What I really want from Imgur is for media to behave like YouTube videos:

  • Play once
  • Replay on click

I was able to accomplish this. First I stopped GIF looping in Firefox like this:

image.animation_mode; once

Then I created a bookmarklet to do the rest:

addEventListener('timeupdate', function(wh) wh.target.loop = 0, 1);
xr = document.querySelectorAll('img, video');
for (ya of xr) {
  zu = ya.style;
  zu.boxSizing = 'border-box';
  if (ya.play) {
    zu.border = 'thick solid violet';
    zu.position = 'relative';
    zu.zIndex = 10;
    if (ya.duration) zu.display = 'block';
    ya.onmouseover = function() this.controls = 1;
    ya.onclick = function() {
      this.parentNode.replaceChild(this.cloneNode(1), this);
      this.src = '';
    };
  }
  else {
    ya.onclick = function() this.src = this.src;
    zu.border = /gif/.test(ya.src) ? 'thick solid green' : 'thick solid peru';
  }
}

This stops videos from looping, and will replay media on click.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.