Very large gifs should be shown as previews

Yes @techapj can you add support for gfycat to oneboxer?

4 إعجابات

I had added it to onebox. It looks like for some reason just white listing it like imgur didn’t worked as expected.

Definitely the first step is onebox embedding gfycat.

The next step I think would be for a plugin to do the gif -> gfycat conversion. Anyone could do this, and if gfycat support is properly added to onebox, I would do it eventually if no one else did.

5 إعجابات

I suspect it didn’t get properly whitelisted in the HTML sanitizer.

إعجاب واحد (1)

It seems like there is a bug with gfycat oEmbed, it always returns CooperativeScentedAnkolewatusi in the iframe.

Various links that confirms the issue:

Removing gfycat from whitelist, until this issue is resolved.

4 إعجابات

The OpenGraph data seems to be correct, can’t that be used instead of oEmbed?

إعجابَين (2)

Okay, added custom gfycat handler to use OpenGraph data endpoints instead of oEmbed:

https://github.com/discourse/onebox/pull/285

4 إعجابات

Does this do the gif like embed, or does it require pressing play?

إعجاب واحد (1)

It requires pressing play. Demo pic:

إعجاب واحد (1)

This is because if gifs without sound autoplay, then gifs with sound (could) autoplay too…

gyphy gifs don’t have sound because they are converted from gifs.

The whole point is not to embed a video, but to use video like a gif.

That means the gif should loop (yes I know not all gifs loop) and auto play. At the very least, it should loop until the user presses stop.

إعجاب واحد (1)

I understand @riking’s concern, but in this case it is totally safe to whitelist autoplay+loop for oneboxed Gifly GIF-videos as they do not have sound.

Note that Imgur also does not support sound, but as a precaution oneboxed GIF-videos are muted by default:

<video id="video" autoplay="autoplay" muted="muted" preload="auto" loop="loop" poster="//i.imgur.com/YfPjduYh.jpg">
    (...)
</video>

We should simply do the same for Gfycat.

4 إعجابات

Doesn’t look like this is working? :frowning:

The gem needs to be updated.

@zogstrip can you please bump onebox version and update the gem?

إعجاب واحد (1)

There you go :wink:

https://github.com/discourse/discourse/commit/f180d2202564febf8c6195684c01b6c7f51d4faa

7 إعجابات

@techAPJ I rebuilt @chapel’s post and it seems that it isn’t looped by default?

إعجابَين (2)

I believe this is now handled with @vinothkannans recent PR.

The xxxxtra large Gif was (eventually, pending background tasks) replaced with image placeholder. @vinothkannans does the tooltip work now so I can mouse over this kind of random looking generic image placeholder and get a plain English explanation of what happened?

3 إعجابات

Let’s see if this is still working:

4 إعجابات