New issue
Advanced search Search tips

Issue 695335 link

Starred by 1 user

Issue metadata

Status: Archived
Owner: ----
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

User Gesture should be present when user clicks native "play" button

Project Member Reported by fbeaufort@chromium.org, Feb 23 2017

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
  });


 
Labels: -OS-Chrome OS-All
Status: Available (was: Unconfirmed)
What's the compatibility story here? I would expect this to not work on all browsers because of how user gesture is handled.
Status: Archived (was: Available)
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