Live data from Hacker News

A Polymer element for flexible GIF playback

geelen.github.io

11–20 of 82 posts

Re: A Polymer element for flexible GIF playback

#11

Alternatively, ditch GIFs entirely and use bandwidth-friendly and feature-friendly HTML5 video.

Not gonna happen until html5 can be set up to autoplay on mobile, and can be copy-pasted into your messaging app and will autoplay there too. I suspect there are other requirements, but much as I love the idea of moving away from gifs (for bandwidth at LEAST) there are a set of things that only gifs can do. Side note: autoplaying html5 would be a massive annoyance, because html5 video can have audio.

[deleted]

Re: A Polymer element for flexible GIF playback

#12

Alternatively, ditch GIFs entirely and use bandwidth-friendly and feature-friendly HTML5 video.

Not gonna happen until html5 can be set up to autoplay on mobile, and can be copy-pasted into your messaging app and will autoplay there too. I suspect there are other requirements, but much as I love the idea of moving away from gifs (for bandwidth at LEAST) there are a set of things that only gifs can do. Side note: autoplaying html5 would be a massive annoyance, because html5 video can have audio.

You know mobile devices have audio controls right? And many android devices have a separated audio control for the browser/content and for the critical stuff (ringtones/notifications)

Re: A Polymer element for flexible GIF playback

#13

is there a reason why these are controlled via stylesheets and not turning on/off the images (performance?)? also what happens if i have a gif with more than 100 frames? http://img42.com/PkTga+

No good reason. I'm going to experiment with toggling the element's style instead of adding a class. But because of the way GIFs are rendered, that's an O(n) task on every frame (so is the CSS style recalculation, of course, but I think the browser's CSS engine will be faster than my JS).

Re: A Polymer element for flexible GIF playback

#14
post #6

Earlier quoted context omitted.

Can you even autoplay HTML5 video on a page in, say, the platform I'm posting from, iOS 7?

No. And those with bandwidth caps are doubly grateful for that. Once for not being opted into wasting bandwidth, and again for the smaller file size if they choose to use it.

The browser/tab/page should ask for permission to play video/audio, just like Chrome for mobile already does for other services (i.e. location)

Re: A Polymer element for flexible GIF playback

#15
post #12

Earlier quoted context omitted.

Not gonna happen until html5 can be set up to autoplay on mobile, and can be copy-pasted into your messaging app and will autoplay there too. I suspect there are other requirements, but much as I love the idea of moving away from gifs (for bandwidth at LEAST) there are a set of things that only gifs can do. Side note: autoplaying html5 would be a massive annoyance, because html5 video can have audio.

You know mobile devices have audio controls right? And many android devices have a separated audio control for the browser/content and for the critical stuff (ringtones/notifications)

I had no idea, thanks!

Re: A Polymer element for flexible GIF playback

#19
post #13

is there a reason why these are controlled via stylesheets and not turning on/off the images (performance?)? also what happens if i have a gif with more than 100 frames? http://img42.com/PkTga+

No good reason. I'm going to experiment with toggling the element's style instead of adding a class. But because of the way GIFs are rendered, that's an O(n) task on every frame (so is the CSS style recalculation, of course, but I think the browser's CSS engine will be faster than my JS).

i'm pretty sure a `opacity = 0`, and an `opacity = 1` in the same run loop should perform fine, but nevertheless very cool!
Post reply on HN