Bug 1590579 - part2 : update controller's audible state when it starts. r=chunmin

Everytime when we start a controller, we should also update its audible state correctly, in order to request audio focus correctly.

Differential Revision: https://phabricator.services.mozilla.com/D50151
This commit is contained in:
alwu
2019-10-24 20:18:47 +00:00
parent 6673f8c765
commit a69e37aba8

View File

@@ -1165,6 +1165,9 @@ class HTMLMediaElement::AudioChannelAgentCallback final
}
NotifyMediaStarted(mAudioChannelAgent->WindowID());
NotifyMediaAudibleChanged(
mAudioChannelAgent->WindowID(),
mIsOwnerAudible == AudioChannelService::AudibleState::eAudible);
mAudioChannelAgent->PullInitialUpdate();
}