forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1509933 - part1 : add new pref 'media.autoplay.blocking_policy'. …
…r=geckoview-reviewers,snorp,padenot This patch will do : - rename the old pref `media.autoplay.enabled.user-gestures-needed` to the new pref `media.autoplay.blocking_policy` - modify the value of the pref to `int` in order to introduce new policy - implement new policy in `AutoplayPoliocy` The advantage of doing so : - rename the pref to explicitly indicate that it's related the block policy we use - use the transient user gesture activation as a new policy to replace the old one using the user input, which doesn't work on the async handler More details : The old `click-to-play` policy we use is using the user input to determine if the play invocation is called by users or by scripts. But `UserActivation::IsHandlingUserInput()` is buggy which would fail when you call `video.play()` inside an async event handler. So we would like to replace it with the new transient user activation, which would treat the action as an user input if the action is performed within a certain period of time after a user interacts (eg. click) with the page. [1] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation Differential Revision: https://phabricator.services.mozilla.com/D73971
- Loading branch information
1 parent
c6e5d7a
commit f986ca0
Showing
4 changed files
with
39 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters