New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 804840 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

No play button fallback for videos in Data Saver is on

Reported by luc.pot...@gmail.com, Jan 23 2018

Issue description

Example URL:
https://myscript.com/calculator/

Steps to reproduce the problem:
1. Create a page with a video tag with "autplay" attribute and no "controls" attribute.
2. Turn on Data Saver in Chrome settings

What is the expected behavior?
I would expect Chrome to force the "controls" attribute to true when Data Saver in on. Otherwise it's impossible to play a video.

What went wrong?
There is no way to play the video because of this Data Saver mode and the absence of the "controls" att

Did this work before? No 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes

Chrome version: 63.0.3239.111  Channel: stable
OS Version: 5.0
Flash Version: 

Contents of chrome://gpu:
 
Cc: mlamouri@chromium.org
Components: -Internals>Media Internals>Media>UI
Owner: dah...@chromium.org
Status: Assigned (was: Unconfirmed)
FWIW, we can't force the controls attribute as it may as the video may already have controls even if it has the autoplay attribute. We are looking into dropping the autoplay restriction when Data Saver is enabled and this should make things a bit better as <video autoplay muted> would work and this issue is particularly problematic on these videos.

Comment 3 by dah...@chromium.org, Jan 24 2018

Status: WontFix (was: Assigned)
As mlamouri said, most sites disable controls in order to add their own. It is up to the site to ensure that users have some way of starting the video if they choose to disable Chrome's logic. This is working as intended.
I understand your point. However if there is no way to detect in JS that Data Saver mode is on, it's impossible for the developer to conditionally display the controls, is it? There are many situations where you want do display a muted video without controls.
FYI, I initially posted a comment on GitHub here: https://github.com/w3c/battery/issues/9#issuecomment-358309992 but it seems impossible to detect power saving mode. 

Comment 6 by dah...@chromium.org, Jan 24 2018

You can check whether the play promise gets rejected. If so, you will know that autoplay is blocked and you need to add controls. Here is a bit of pseudo code to get you started:

var promise = document.querySelector('video').play();

if (promise !== undefined) {

  promise.then(_ => {

    // Autoplay started!

  }).catch(error => {

    // Autoplay was prevented.

    // Show a "Play" button so that user can start playback.

  });

}
Thank you for the snippet. I had not thought of this approach.

Sign in to add a comment