Bug 1524065 - part1 : implement the way to resume delayed autoplay media via browsing context. r=farre
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. Differential Revision: https://phabricator.services.mozilla.com/D18136
This commit is contained in:
@@ -985,6 +985,15 @@ nsDocShell::DispatchLocationChangeEvent() {
|
||||
&nsDocShell::FireDummyOnLocationChange));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::StartDelayedAutoplayMediaComponents() {
|
||||
RefPtr<nsPIDOMWindowOuter> outerWindow = GetWindow();
|
||||
if (outerWindow) {
|
||||
outerWindow->SetMediaSuspend(nsISuspendedTypes::NONE_SUSPENDED);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool nsDocShell::MaybeInitTiming() {
|
||||
if (mTiming && !mBlankTiming) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user