User Gesture should be present when user clicks native "play" button |
||
Issue description
Chrome Version : 58.0.3007.0
OS Version: 9280.0.0
When I click the native "play" button of my <video> element, I wish video goes fullscreen with code below.
document.querySelector('video').addEventListener('play', function(e) {
e.target.webkitRequestFullscreen();
// FAIL
}, { once: true });
However, it raises error "Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.".
For info, using a custom "play" button makes it work:
document.querySelector('button').addEventListener('click', function(e) {
document.querySelector('video').webkitRequestFullscreen();
// SUCCESS
});
,
Jun 2 2017
What's the compatibility story here? I would expect this to not work on all browsers because of how user gesture is handled.
,
Dec 20 2017
I'm going to archive this because there is some work happening on user activation and that's the actual answer to this bug. |
||
►
Sign in to add a comment |
||
Comment 1 by zqzh...@chromium.org
, Feb 24 2017Status: Available (was: Unconfirmed)