Closed Bug 1477530 Opened 6 years ago Closed 6 years ago

Add option to allow a website to autoplay videos when in focus

Categories

(Firefox :: Site Identity, enhancement)

63 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox63 --- affected

People

(Reporter: mitchell, Unassigned)

References

Details

Hello, When the new permission to allow websites to autoplay video or not landed, I lost my preferred setup, mainly for sites like Youtube. The old behaviour where autoplaying videos would be kept paused until the tab entered focus was excellent. I could middle-click a bunch of videos and have them not play until I actually entered their tab, at which time I would not have to click them to start them. Now, I either have to click the video after focusing the tab, or cause all the background tabs to start playing immediately after I open them. A third option for websites' autoplaying permissions called something like "Autoplay when tab active" would be fantastic for me. I'd settle for an about:config flag as well. Thank you!
Dale or Chris, would you like to comment on this (and move it to the right component)? Thanks!
Flags: needinfo?(dharvey)
Flags: needinfo?(cpearce)
Hi Mitchell. Thanks for reaching out. By default Firefox will not start playing media in a tab before it's been in the foreground. With block autoplay enabled, we also won't play unless the tab has had some interaction, like a click on the play button. I think what you want is to revert to the old behaviour, where we didn't require the tab to have had some interaction before starting playback. You can do this by changing the preferences/privacy option: "For websites that autoplay sound" to "Allow" Autoplay", as demonstrated in the animation in this tweet: https://twitter.com/daleharvey/status/1020619223863873539 I'm going to go ahead and close this bug. Please comment here if my comment here didn't give you what you wanted. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Flags: needinfo?(dharvey)
Flags: needinfo?(cpearce)
Resolution: --- → WORKSFORME
Hi Chris. No, that's not what I'm after. I want the old behaviour, which was to wait for a tab to be focused (switched to?) before playback. So I can open a youtube video in a tab and NOT have it play in the background, but immediately begin playback when I ctrl+tab to it.
Flags: needinfo?(cpearce)
Even when set to "allow autoplay", Firefox still won't start playing until the tab has been focused. So I think you'll get the behaviour you're asking for if you change Firefox back to "allow autoplay".
Flags: needinfo?(cpearce)
Ah, you're right! It seems the behaviour is different between when a website is given explicit permission (video plays even in background tab) and when the browser allows global autoplay (video plays when tab is focused). This doesn't seem like good design to me. I had to come here to bugzilla to find out that the behaviour is different! As such, I still think that a seperate per-website permission to 'autoplay when in focus' would be a very good idea, and would reduce the amount of non-intuitive behaviour. I have at least got my old behaviour back, thank you Chris.
You need to log in before you can comment on or make changes to this bug.