зеркало из https://github.com/mozilla/gecko-dev.git
8ed9cb7dbc
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 |
||
---|---|---|
.. | ||
android | ||
locales | ||
.eslintrc.js |