Bug 1653390 - part1 : remove start check. r=bryce
The reason of checking those conditions before calling `StartListeningMediaControlKeyIfNeeded()` is because we was only starting the listener after media starts, which has been modified in D79234. Now we would start the listener before media starts, so we can remove that check. Differential Revision: https://phabricator.services.mozilla.com/D84114
This commit is contained in:
@@ -6546,11 +6546,7 @@ void HTMLMediaElement::SuspendOrResumeElement(bool aSuspendElement) {
|
||||
!AutoplayPolicy::IsAllowedToPlay(*this)) {
|
||||
MaybeNotifyAutoplayBlocked();
|
||||
}
|
||||
// If we stopped listening to the event when we suspended media element,
|
||||
// then we should restart to listen to the event if we haven't done so yet.
|
||||
if (mMediaControlKeyListener && !mMediaControlKeyListener->IsStarted()) {
|
||||
StartListeningMediaControlKeyIfNeeded();
|
||||
}
|
||||
StartListeningMediaControlKeyIfNeeded();
|
||||
}
|
||||
if (StaticPrefs::media_testing_only_events()) {
|
||||
auto dispatcher = MakeRefPtr<AsyncEventDispatcher>(
|
||||
|
||||
Reference in New Issue
Block a user