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

Pause GIFs when window is not in focus without having to minimize #3997

Closed
1 task done
Ambient-Impact opened this issue Feb 28, 2020 · 9 comments
Closed
1 task done

Comments

@Ambient-Impact
Copy link

  • I have searched open and closed issues for duplicates

Bug Description

Hi there. I use both Signal and Discord pretty heavily as a gamer on Windows 10, and I'd love it if we had the option to pause GIFs when the Signal window loses focus, like Discord does. It's not a huge issue, but it does feel like a bit of a UX problem that I have to hunt for the minimize button when alt-tabbing is much faster.

Steps to Reproduce

  1. Have an animated GIF that's either been sent or received visible in a Signal conversation.
  2. Switch to another app.
  3. Make the Signal app visible either by moving a window that's on top partially out of the way or press and hold alt+tab to bring up the app switcher.

Actual Result: GIF continues to play while Signal is not focused.

Expected Result: GIF is paused while Signal is not focused.

Platform Info

Signal Version: v1.31.0

Operating System: Windows 10 Home v1903 (build 18362.657)

@scottnonnenberg-signal
Copy link
Contributor

Could you talk about why this is important to you? Is it that you don't want your computer using the resources to animate the GIF while it's in the background? Or you don't want to lose your place in the GIF playback?

@Ambient-Impact
Copy link
Author

@scottnonnenberg-signal It's primarily for performance reasons. That said, I'm not sure how much a performance hit most GIFs are.

@stimularity
Copy link

I was also going to request this.

MS Teams has a similar feature that plays the gif for about 30 seconds then pauses it on the first frame. If that chat loses focus, it is paused. If you click on the gif, it pauses the it and a little pause indicator appears over it. Clicking it resumes play. It will loop for another 30 seconds if play is clicked.

I often have teams and signal open side by side, its very distracting to see a constantly moving gif on a mostly static screen.

@iwismer
Copy link

iwismer commented Apr 9, 2020

I would also like to see this in some form. I find that signal takes about 5-10% CPU when it has a GIF visible, but almost nothing when I scroll the GIF out of view or switch conversations.

I found the same behavior with Slack's GIFs and animated reacts. Slack has an option to disable animations, which I have done and seems to help my battery life and performance.

It would be good to see an option to disable animations, have GIFs click-to-play, or auto-pause them after a set amount of time (or any combination of those things).

In the end it seems like a problem with Electron being heavy when showing animated content, so any way to mitigate this issue would be welcomed.

@rcbevans
Copy link

I noticed this when I had signal open on a second monitor and agree it's distracting. @scottnonnenberg-signal this is something I'd be interested in contributing; I spent a while exploring the code today and have a rough idea of how it could be implemented.

  • In main.js subscribe to the main window focus and blur events which trigger when the main window gains/loses focus
  • Broadcast an event to which Image components can subscribe - I'm not sure what the preferred mechanism for this would be
  • In Image.tsx, use the attachment MIME type to determine if the image is a gif. If it is, render a canvas element as well as an img, with the img visible by default displaying the animated gif.
  • on loss of window focus, render the current gif frame into the canvas element and toggle visibility so the static canvas is visible.
  • on focus, toggle the visibility back to the animated img element.

@lstor
Copy link

lstor commented Feb 4, 2021

To me, this is an accessibility issue. I have a brain injury which means that multitasking, conscious or subconscious, is detrimental to me. This means that any time a gif is sent in the Signal client, I have to hide it from view when I'm doing other tasks on the computer, else my head will subconsciously pick up on it and wear itself out after a minute.

Obviously the workaround is fairly simple (change conversation or hide the window) so this is low priority, but having the feature would be very nice.

@SebiTimeWaster
Copy link

SebiTimeWaster commented Feb 22, 2021

Could you talk about why this is important to you? Is it that you don't want your computer using the resources to animate the GIF while it's in the background? Or you don't want to lose your place in the GIF playback?

It is extremely distracting since all my messengers are running on a second monitor being visible all the time. it signals my brain that there is new content i need to attend all the time. This is one of the most basic features a messenger needs to have.

@stale
Copy link

stale bot commented Sep 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@oleschri
Copy link

Seems to me this has been discussed in community forums for a while.
https://community.signalusers.org/t/stop-animated-stickers-and-gifs/19186

Can we reopen this issue, @josh-signal?

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

No branches or pull requests

9 participants