New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not autoplay/repeat GIFs in link embeds #3021

Open
Zarthus opened this Issue Feb 2, 2019 · 6 comments

Comments

Projects
None yet
5 participants
@Zarthus
Copy link
Contributor

Zarthus commented Feb 2, 2019

Feature Description

When someone links a GIF, the embedder automatically plays & repeats it. This kind of distracts from conversation.

If we cannot offer a play/pause button, I would recommend an option to not expand it automatically by default.

For mp4 this works fine.

img

@xPaw

This comment has been minimized.

Copy link
Member

xPaw commented Feb 2, 2019

For mp4 this works fine.

Because mp4 is a proper video, gif is an image.

It appears to be doable with javascript for gifs though. Like https://github.com/krasimir/gifffer

@xPaw xPaw added the Type: Feature label Feb 2, 2019

@k1nghat

This comment has been minimized.

Copy link

k1nghat commented Feb 9, 2019

it should probably be an option. i think the whole point behind gifs as used in the case of memes is that they are repeating. if the gif wasnt supposed to be looped it would have been made that way.

@MiniDigger

This comment has been minimized.

Copy link
Contributor

MiniDigger commented Feb 10, 2019

I think gifs should be repeating, but only play when you click or hover over the message (like discord does it for example)
discord does this by switching between gif and png format in the img element btw, that seems like an easy solution. just grab the first frame (on server) and display it as a placeholder (maybe together with some sort of indicator, discord uses a GIF overlay in the upper right corner)
https://i.imgur.com/gt6GUfn.png

@xPaw

This comment has been minimized.

Copy link
Member

xPaw commented Feb 10, 2019

that seems like an easy solution. just grab the first frame (on server)

easier said than done because you need to have a gif parser on the server, and even then, it will only work if you have prefetch storage enabled.

Using canvas on the client like all of the gif pausing libraries seem to do should be better overall.

@MiniDigger

This comment has been minimized.

Copy link
Contributor

MiniDigger commented Feb 10, 2019

you, noticed discord only does this to gifs uploaded to discord

@astorije

This comment has been minimized.

Copy link
Member

astorije commented Feb 11, 2019

I think it's fine to be able to stop a repeating gif, but I'd prefer to keep them playing by default. It's frustrating to share memes and expect viewers to click on them individually :D

Slack doesn't support stopping a GIF, and I personally took the habit of collapsing them when I have viewed them and/or find them distracting. I tend to do the same on TL 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment