question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New chrome autoplay policy prevents gifs from playing

See original GitHub issue

Description of the problem

With the new autoplay policy of chrome (seen at https://developers.google.com/web/updates/2017/09/autoplay-policy-changes), gifs and video’s don’t play automatically when hovered over, unless the user interacts with the page first. (Side note: Refreshing the page also counts as an interaction, making it a little difficult to reproduce)

Url of the page where the problem occurs (not the image url)

https://www.reddit.com/r/gifs/

Steps to reproduce the problem (include image url here)

  1. Go to the url https://www.reddit.com/r/gifs/
  2. Hover over one of the gif images
  3. Gif doesn’t play. Console shows the following error:

hoverzoom.js:485 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD

OS version, extension version (Chrome only, Firefox is not supported)

Windows 10 Ultimate Chrome 66.0.3359.139

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
qrohlfcommented, Sep 16, 2018

Possibly helpful - I solved this in @qrohlf/GifHub by including up a minimal play/pause UI. It’s licensed under the WTFPL, so you’re free to pull in in and use it in hoverzoom if you want 😉

It’s only about 70 lines of code including the CSS: https://github.com/qrohlf/GifHub/blob/f29343befe807517a22a5e2570e22ea241199d58/gifhub.js#L28-L102

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable Animated GIFs from Auto-Playing in Chrome and Firefox
Animation Policy: This will run animations only once or disable them altogether. Although Video is not impacted, it will work on all image ......
Read more >
How to Stop Animated GIFS From Playing ... - YouTube
How to Stop Animated GIFS From Playing Automatically on Chrome Browserhttps:// chrome. google.com/webstore/detail/animation- policy / ...
Read more >
How to Stop GIFs From Auto-Playing in Your Browser | PCMag
That stops videos and animated GIFs, but you can still click them to activate. Go back into settings to turn auto-play back on,...
Read more >
How to Disable Autoplaying GIFs From Your Browser [2022]
3. Prevent GIFs from playing automatically in Opera ... Not only do Chrome and Firefox have the extension, Opera also has an extension...
Read more >
How to Disable Autoplaying GIFs From Your Web Browser
With this extension you can use keyboard shortcuts to enable and disable GIF. Hit Ctrl+M keys together in the current tab to play...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found