Bug 1657224 - add a pref to control stopping media after media reaches to the end. r=chunmin
In bug1654045, we would stop controlling media once media reaches to the end. Considering some user might still want to control media by pressing media keys even if it has ended, so adding a pref to control this abilitiy. Differential Revision: https://phabricator.services.mozilla.com/D85930
This commit is contained in:
@@ -5678,7 +5678,9 @@ void HTMLMediaElement::PlaybackEnded() {
|
||||
mAutoplaying = true;
|
||||
}
|
||||
|
||||
mMediaControlKeyListener->StopIfNeeded();
|
||||
if (StaticPrefs::media_mediacontrol_stopcontrol_aftermediaends()) {
|
||||
mMediaControlKeyListener->StopIfNeeded();
|
||||
}
|
||||
DispatchAsyncEvent(u"ended"_ns);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user