Very large gifs should be shown as previews

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

4 „Gefällt mir“

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 „Gefällt mir“

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

1 „Gefällt mir“

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 „Gefällt mir“

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

2 „Gefällt mir“

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

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

4 „Gefällt mir“

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

1 „Gefällt mir“

It requires pressing play. Demo pic:

1 „Gefällt mir“

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 „Gefällt mir“

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 „Gefällt mir“

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 „Gefällt mir“

There you go :wink:

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

7 „Gefällt mir“

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

2 „Gefällt mir“

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 „Gefällt mir“

Let’s see if this is still working:

4 „Gefällt mir“