Autoplay fails if the player is switched in a background tab
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | verified |
People
(Reporter: gordie.lachance, Assigned: alwu)
References
Details
Attachments
(4 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
Steps to reproduce the problem:
- Open the playlist https://v2.spiff-radio.org/playlist/349303
- Play the track #3 (Youtube), which is just before a Soundcloud track
- Go to another tab so the playlist is in a background tab.
- Wait for track #3 to end :
- Track #4 won't start until the tab is active again.
Actual results:
It seems that, since there is a player change (youtube > soundcloud) and that the page is in a background tab; it fails to autoplay the next track (even if autoplay is allowed in the browser's settings).
It works when skipping to a track from the same source (youtube > youtube for instance) or if the tab is active.
Expected results:
If the website is whitelisted, it should be able to skip and play the next track.
NB : Chromium had the same problem and fixed it (https://bugs.chromium.org/p/chromium/issues/detail?id=1244074).
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 3•3 years ago
|
||
This is caused by this, where we check the media suspend state from a wrong outer window. We should check the top level outer window (for spiff-radio), not the iframe's outer window (soundcloud).
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 5•3 years ago
|
||
Depends on D128126
Assignee | ||
Comment 6•3 years ago
|
||
Depends on D128127
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
Pushed by alwu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e20cfb194c38 part1 : create a new sync attribute on top-level browsing context for whether we should delay media from starting, and use it to replace the old attribute on outer windows. r=nika,emilio https://hg.mozilla.org/integration/autoland/rev/6a4be38e6586 part2 : use the new method to check if we should delay media from starting playback. r=emilio https://hg.mozilla.org/integration/autoland/rev/7e520eb5e476 part3 : merge RefreshAgentsSuspend into NotifyResumingDelayedMedia. r=emilio https://hg.mozilla.org/integration/autoland/rev/768a740658dd part4 : add a test. r=emilio
Comment 9•3 years ago
|
||
Did you see the question about ReplacedBy here Alastor? https://phabricator.services.mozilla.com/D128126#4226792
Nika, do you have opinions on ^?
Assignee | ||
Comment 10•3 years ago
|
||
Ah sorry I missed that question. I will submit another patch if we need to modify the current patch.
Comment 11•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e20cfb194c38
https://hg.mozilla.org/mozilla-central/rev/6a4be38e6586
https://hg.mozilla.org/mozilla-central/rev/7e520eb5e476
https://hg.mozilla.org/mozilla-central/rev/768a740658dd
Assignee | ||
Comment 13•3 years ago
|
||
A follow-up based on [1].
[1]
https://phabricator.services.mozilla.com/D128126#4226792
https://bugzilla.mozilla.org/show_bug.cgi?id=1733902#c12
Comment 14•3 years ago
|
||
Comment on attachment 9249090 [details]
Bug 1733902 - part5 : copy ShouldDelayMediaFromStart
in ReplacedBy()
.
Revision D130292 was moved to bug 1739685. Setting attachment 9249090 [details] to obsolete.
Updated•3 years ago
|
Comment 15•3 years ago
|
||
Reproduced the issue on an affected Nightly build 94.0a1 (2021-10-04), Win 10 x64.
Verified fixed on Firefox 96.0 (20220106144528), across the following platforms: Win 10 x64, Ubuntu 20.04 and macOS 10.15.
Description
•