Skip to content
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

Option to only play gifs on hover #4055

Open
geekgonecrazy opened this issue Aug 18, 2016 · 15 comments
Open

Option to only play gifs on hover #4055

geekgonecrazy opened this issue Aug 18, 2016 · 15 comments
Labels
Milestone

Comments

@geekgonecrazy
Copy link
Member

On native clients we seem to run into a problem where too many gifs playing causes the render loop to get blocked. We need to adopt what other platforms have done, and don't play them automatically. Maybe only hover?

@Jellyfrog
Copy link

or play X times and then switch to on hover

@FibreFoX
Copy link

FibreFoX commented Aug 18, 2016

What gifs do you mean? Is there some native support for providers like imgur? I just know that https://github.com/FinndropStudios/GifRocket webhook?

@geekgonecrazy
Copy link
Member Author

@Jellyfrog that would work too.

@FibreFoX so if you post a link to a gif it'll show up and start playing. These might be posted by a user, by gifRocket etc. The idea is to not have those play automatically. Just imagine someone went a little gif crazy and pasted links to 10-15 gifs. You now have all 10-15 of those gifs playing at the same time. Eating through resources that you don't necessarily want them to be. It can bog down your chat.

@subesokun
Copy link

I'd love to see a play button just like Twitter does. Once the animation has completed it should stay in paused mode. Also it should remember that the Gif has been played already once so that it won't be played again if you enter the room or scroll around.

@FibreFoX
Copy link

FibreFoX commented Aug 20, 2016

This should be a customizable option of the user, but not "on hover", mobile devices don't have hover, "on click"/"on tap" would be nice to have available here.

@gabrielsixel
Copy link
Contributor

Something like this: http://rubentd.com/gifplayer/ ?

@geekgonecrazy
Copy link
Member Author

@gabrielsixel exactly. Something that wouldn't bog down the render thread.

@ggazzo ggazzo added this to the Short-term milestone Feb 8, 2019
@sushant52
Copy link
Contributor

@geekgonecrazy @ggazzo We could convert the GIF to .mp4 video format and use the video controls to play/pause the GIF, and also add a loop, autoplay, muted options to give it more GIFy feel if one wants to.

Examples of popular website already doing this:-

This not only provides more controls with simple already built controls, but also reduces file size and improves performance of servers.
Source
What say?

@ritwizsinha
Copy link
Contributor

@geekgonecrazy I am working on this feature, I will first try to implement a simple click/tap for play and stop and if that looks good may be I could do some of the optimizations mentioned above. Thanks

@geekgonecrazy
Copy link
Member Author

@RocketChat/frontend if work here won't be accepted please chime in so no one wastes time 🙏

@ritwizsinha
Copy link
Contributor

ritwizsinha commented Apr 23, 2021

@geekgonecrazy I looked at the code and understood, what had to be done
gif-issue-rocketchat.
I tried adding a wrapper for Image component and a variable controlling toggle when clicked. The stopped gif contains the preview url.
One problem arises is how to care of the open attachment feature when clicked, when the gif is running, clicking on the gif does two things as shown above (opens the attachment and stops the gif).
One solution is to remove the action of stopping a gif and automatically stopping it after one run.
wdyt?

@MondaySam
Copy link

MondaySam commented Jul 14, 2021

Please make the gif stop playing after one run or two.
We like to post reaction gifs via /giphy but it quickly gets annoying when those gifs are constantly running.
Especially when you have the chat open on another screen and constantly see movement in your peripheral view.

@3id0
Copy link

3id0 commented Sep 30, 2021

Please make the gif stop playing after one run or two. We like to post reaction gifs via /giphy but it quickly gets annoying when those gifs are constantly running. Especially when you have the chat open on another screen and constantly see movement in your peripheral view.

I disagree. I mean its a sane option as a default but probably better to let the user choose with a configuration option on the client side.
Also you are allowed to minimize your chat window if it bothers you :p

@sennewood
Copy link

GIFs need autoplay.

@norogoth
Copy link

norogoth commented Aug 10, 2022

@sennewood is correct. If GIFs in Rocketchat can't autoplay, is life even truly worth living?

Also, I feel like GIFs used to autoplay and now they don't after an update or something. Anyone know why that may be?

@tassoevan tassoevan added stat: triaged Issue reviewed and properly tagged and removed Triaged labels Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests