Bug 1655204 - part3 : start listening to media control keys once media starts again. r=chunmin
For media which has been stopped via media key `Stop`, we should start controlling it if it starts playing again. Differential Revision: https://phabricator.services.mozilla.com/D85102
This commit is contained in:
@@ -4489,6 +4489,7 @@ void HTMLMediaElement::PlayInternal(bool aHandlingUserInput) {
|
||||
AddRemoveSelfReference();
|
||||
UpdatePreloadAction();
|
||||
UpdateSrcMediaStreamPlaying();
|
||||
StartMediaControlKeyListenerIfNeeded();
|
||||
|
||||
// Once play() has been called in a user generated event handler,
|
||||
// it is allowed to autoplay. Note: we can reach here when not in
|
||||
@@ -6216,6 +6217,7 @@ void HTMLMediaElement::CheckAutoplayDataReady() {
|
||||
AddRemoveSelfReference();
|
||||
UpdateSrcMediaStreamPlaying();
|
||||
UpdateAudioChannelPlayingState();
|
||||
StartMediaControlKeyListenerIfNeeded();
|
||||
|
||||
if (mDecoder) {
|
||||
SetPlayedOrSeeked(true);
|
||||
|
||||
Reference in New Issue
Block a user