[Blink>Media] Moving autoplay logic to AutoplayPolicy
This CL moves autoplay code from HTMLMediaElement to the AutoplayPolicy class, which helps decoupling the autoplay logic from HTMLMediaElement. BUG=712606 Review-Url: https://codereview.chromium.org/2813303005 Cr-Commit-Position: refs/heads/master@{#466137}
This commit is contained in:
docs/media
third_party/WebKit/Source/core/html
@ -14,6 +14,13 @@ There are two ways of initiating autoplay:
|
||||
* Autoplay by `play()` method: Explicitly calling the `play()` method without
|
||||
user gesture.
|
||||
|
||||
All the autoplay logic is handled by the AutoplayPolicy class. When the media
|
||||
element wants to perform some action (like unmute, autoplay by attribute or
|
||||
`play()` method), it will send a request to AutoplayPolicy, and if the request
|
||||
is approved, the element can autoplay, otherwise it should be paused. Also the
|
||||
media element should inform the AutoplayPolicy about relevant changes such as
|
||||
"the element has been moved to a new document".
|
||||
|
||||
## User gesture lock
|
||||
|
||||
Each media element has a user gesture lock. If the element is allowed to
|
||||
|
Reference in New Issue
Block a user