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개의 좋아요

http://gfycat.com/CluelessElderlyHerald

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개의 좋아요