Bug 1525156 - part1 : not dispatch event when play is rejected by AudioChannelAgent. r=cpearce
"blocked" event is used for blocking autoplay. The `AudioChannelAgentBlockedPlay()` returns true when we lost audio focus on Android, so actually we don't need to dispatch "blocked" event. Differential Revision: https://phabricator.services.mozilla.com/D18627
This commit is contained in:
@@ -3638,7 +3638,6 @@ already_AddRefed<Promise> HTMLMediaElement::Play(ErrorResult& aRv) {
|
||||
if (AudioChannelAgentBlockedPlay()) {
|
||||
LOG(LogLevel::Debug, ("%p play blocked by AudioChannelAgent.", this));
|
||||
promise->MaybeReject(NS_ERROR_DOM_MEDIA_NOT_ALLOWED_ERR);
|
||||
DispatchEventsWhenPlayWasNotAllowed();
|
||||
return promise.forget();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user