Youtube autoplay after session restore even if the setting is blocked audible autoplay
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
People
(Reporter: scunnane, Unassigned, NeedInfo)
References
Details
Attachments
(3 files)
When I have a YouTube tab selected in a window, then update & restart Nightly, the YouTube tab autoplays once my Nightly session is restored. This is actually the current expected behavior.
However, from a user perspective, this behavior can be annoying if I'm working in one window, click to update/reload Nightly, then a YouTube video whose tab is active in another window suddenly starts playing.
There was an excellent Slack discussion on this issue, so I've attached screenshots of it.
Reporter | ||
Comment 1•2 years ago
|
||
Reporter | ||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
Per offline discussion with Stephanie, this seems the Youtube page bypassed the autoplay setting check after being opened by the session restore.
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
One way I found to quickly experiment with this is to directly compare a YouTube video to a video on Odysee.
- Open a new window with 2 tabs, one that's a YouTube video and the other that's an Odysee video
- With the Odysee video tab active, close the window
- Press ctrl-shift-N to re-open the just-closed window -> the Odysee video does NOT autoplay
- Switch the active tab to the YouTube video, then close the window.
- Press ctrl-shift-N to re-open the just-closed window -> the YouTube video DOES autoplay
Comment 5•2 years ago
•
|
||
Maybe we need to clear the autoplay permission when restoring. Or maybe when closing the tab.
Comment 6•1 year ago
|
||
I've been experiencing the same autoplay issues with Youtube Music after logging back in on my macOS (after the machine wakes up from sleep mode). So the STR are:
- Open music.youtube.com and start playing any song.
- Press Pause, change the window/tab
- Wait for the machine to sleep and lock the screen
- Wake up the machine and log back into your account
Expected:
- Youtube Music is opened on the same page but not playing the song.
Actual:
- The previously paused song starts playing while the user is logged in, before interacting with that page, even when the page is not focused.
And sporadically I've got the same surprise playback while a meeting recording is opened and paused in Panopto too. I can bring an URL when I experience it next time
Comment 7•1 year ago
|
||
We should do better here, and it doesn't seem very complex. Alastor, what do you think?
Comment 8•1 year ago
|
||
Hmm I can't reproduce this issue on my Firefox Nightly by following either comment 4 or comment 6. Edgar, do you know whether the user gesture in a window would be preserved after the window gets restored from ctrl-shift-N or session restore? I wonder if we didn't clear the user gesture flag correctly when restoring a window. Thanks!
Comment 9•1 year ago
|
||
Another case I observed recently was autoplay starting right after I pressed Restart to update Firefox
in the release from the About dialog on Mac.
Reporter | ||
Comment 10•8 months ago
|
||
I ran into this bug again today. I restarted my laptop (running Windows 11), opened up Nightly and had 5 windows restored by session restore. Of those 5 restored windows, 2 had YouTube videos as their active tab. Both YouTube videos started playing simultaneously, with no interaction on my end.
Description
•