Use browsing context to notify content tab to resume delayed autoplay media
Categories
(Core :: Audio/Video: Playback, enhancement, P2)
Tracking
()
People
(Reporter: alwu, Assigned: alwu)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
This bug will use the browsing context to notify content tab to resume delayed autoplay media, instead of using MessageManager
.
If we don't do so, we're not able to resume media in the different process when we we enable Fission, because the current way we use can only notify one process and would cause the media on other process can't be resumed.
Assignee | ||
Comment 1•6 years ago
|
||
After enable Fission, we're not able to resume media in the different process, because the current way we use can only notify one process and would cause the media on other process can't be resumed.
Therefore, we should use the browsing context to notify the web content which might be on different processes.
Assignee | ||
Comment 2•6 years ago
|
||
Replace the current way and use the new way.
Assignee | ||
Comment 3•6 years ago
•
|
||
resumeMedia
is used for resuming delayed autoplay, which have been replaced by notifying via the browsing context.
Assignee | ||
Comment 4•6 years ago
|
||
Not sure if mentioning someone in the phabricator will send the notication, so this NI is used for notification in case missing the comment [1]
Comment 5•6 years ago
|
||
Right, so I've landed the patch today. Hopefully it sticks. Now you should be able to do:
void ChromeBrowsingContext::NotifyStartDelayedAutoplayMedia() {
// This will send the message to all processes that have 'this'
for (auto iter = Group()->ContentParentIter(); !iter.Done(); !iter.Next()) {
auto entry = iter.Get();
entry->GetKey()->SendStartDelayedAutoplayMediaComponents(this);
}
}
IPCResult ContentChild::RecvStartDelayedAutoplayMediaComponents(
BrowsingContext* aContext) {
// Here I imagine BrowsingContext::StartDelayedAutoplayMediaComponents
// recursively traverses the bc sub-tree starting at aContext and does it's
// stuff.
aContext->StartDelayedAutoplayMediaComponents();
return IPC_OK();
}
Updated•6 years ago
|
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f884c612401e
https://hg.mozilla.org/mozilla-central/rev/94f8d2ce7f8c
https://hg.mozilla.org/mozilla-central/rev/bc864bb5cd2b
Comment 8•6 years ago
|
||
Alastor, is there anything manual QA can do to help test this?
Assignee | ||
Comment 9•6 years ago
|
||
It can be simply tested by checkin whether sound indicator can mute/unmute audio from tab.
Assignee | ||
Comment 10•6 years ago
|
||
Ah, sorry, I just realized that this bug is not about muting/unmuting audio in the tab (bug1553328). The way to verify is to check whether play tab
icon is work.
Comment 12•5 years ago
|
||
Confirming this issue as verified fixed on Nightly 70.0a1 (2019-07-16) and Nightly 69.0a1(2019-07-04) on Windows 10x64 , macOS 10.14 and Ubuntu 18.04x64. The Play tab icon is working as expected.
Updated•5 years ago
|
Description
•