Bug 1513681 - part1 : dispatch 'GloballyAutoplayBlocked' event when site is blocked r=cpearce,smaug

This event is used to notify tab that this site is blocked and we should show the blocking icon for it. Patch2 will handle following details.

Differential Revision: https://phabricator.services.mozilla.com/D14794
This commit is contained in:
Alastor Wu
2019-01-04 19:05:52 +00:00
parent aa188e313d
commit 63535cb379
3 changed files with 19 additions and 0 deletions

View File

@@ -3697,6 +3697,7 @@ void HTMLMediaElement::DispatchEventsWhenPlayWasNotAllowed() {
ChromeOnlyDispatch::eYes);
asyncDispatcher->PostDOMEvent();
#endif
OwnerDoc()->MaybeNotifyAutoplayBlocked();
}
void HTMLMediaElement::PlayInternal(bool aHandlingUserInput) {