simonlindholm/toggle-gifs

hover to play does not work when firefox is set to image.animation_mode once

Closed this issue · 2 comments

ck-on commented

This extension is a great idea!

However when image.animation_mode is set to once, the auto-play when hovering does not work, you have to click the controls on the gif to get it working (and then hover will work). It is possible to override the pause automatically on hover the first time?

Feature idea: also add context menu items for "animate gif" "stop animation" and "reload image"

I've tried to get the "once" mode to play reasonably OK with this addon, but it's hard. It's quirky, unmaintained, unloved, and would probably have been long removed if there had been any reason to touch that part of the Gecko codebase...

In particular, Firefox gives no indication of when an image with animation mode "once" has finished animating, and when it does finish animating, the image goes into a sort of error state it can only return from by resetting animation to the start. This means that when hovering such an image for the first time, the choice is between requiring the reset button to be pressed, or forcibly resetting the image, and the latter seemed more surprising. If you want to play around you can try changing the check (ic.animationMode === 0) at content/content.js line 470 to (ic.animationMode !== 1).

Thus, wontfix, but only because I don't think this is possible to fix.

"Reload image" as a context menu item seems like it doesn't belong in this addon; starting/stopping/resetting animation does, so I'll open an issue for it, but it seems like low priority given all the other ways that already exist. Is there a reason you would prefer it over shortcuts or hover buttons?

ck-on commented

something you can do for "animate once" images is reload the image and it will start playing again

that's how I've been dealing with it until now, I used an old plugin that had a "reload image" in the context menu