3 ms·
From the wiki: > For example, when a user clicks the element X, then we only allow a website to start the element X from a function that is in the call stack b
by opheliate 5y ago
From the wiki:
> For example, when a user clicks the element X, then we only allow a website to start the element X from a function that is in the call stack based on the X's “click” event handler.
I could be misinterpreting this, but doesn't that imply that scrolling into view would generally not be sufficient to allow autoplay? Since the scroll event would be on the body/window, and the video itself is not the target of the event?
- gruez 5y agoMy interpretation there is that you can start video playback within a click handler or one of its callees, but there's no check on where the video element is. The latter check would be impossible to implement because <video> elements can't have child elements (eg. for playback buttons) so adding that restriction would break custom playback buttons.