I noticed that the oneboxed gfycat video plays at a slower FPS than the embedded version. Compare below:
Oneboxed (achived by pasting gfycat link into post)
Embedded (achieved by copying video location from gfycat and pasting into post)
Is this intentional for the sake of network resources, or is it a bug? I notice that the direct (second) link is on fat.gfycat.com instead of gfycat.com, so I’m not sure if maybe gfycat updated their backend and Discourse hasn’t adjusted yet.
I see that the official gfycat.js library requires a piece of code (the library loader, a simple <script> tag from their README.md) to be included just once for all videos. Is there any way of achieving that in OneBox?
Any chance autoplay could be enabled by default for the gfycat onebox instead? Gfycat clips are essentially glorified gifs (even limited to 15 seconds), so preferably they’d behave similarly. There shouldn’t be an issue with bandwidth because webm files are substantially smaller than their gif equivelants which already autoplay (the one in the OP is 1/6th the size of the equivalent gif).
I made the changes. Probably, the most bandwidth savings would be made if we used the low quality source. However, there is no way we can actually switch between sources and I am not sure if the browser can do that by itself (taking into consideration bandwidth, if on desktop or mobile, etc.)
Using this documentation here (we recently published it on our docs) will make all shared Gfycats faster regardless of browser. There is logic in there that detects factors like browser, OS, network speed, etc. and we also provide users the option to toggle between high quality and lower resolution. Gfycat Iframe Documentation