New issue
Advanced search Search tips

Issue 873596 link

Starred by 2 users

Issue metadata

Status: Closed
Owner:
Closed: Oct 1
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-09-27
OS: Windows
Pri: 2
Type: Compat



Sign in to add a comment

Bypass of Autoplay Policy Changes

Reported by polskafi...@gmail.com, Aug 13

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Example URL:
https://lunaris.play.ai/poc.html

Steps to reproduce the problem:
1. Create a <video>
2. Use snippet:
function init(){
	setTimeout(function(){ 
	document.getElementById("vid").muted = false;
	document.getElementById("vid").play();
	}, 50);
}
3. Bypass muted autoplay video restriction

What is the expected behavior?
Video should stay muted, because user did not interact

What went wrong?
By delaying script execution, we can bypass Autoplay Policy Changes and still autoplay video with sound.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 68.0.3440.106  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 30.0 r0
 
poc.html
291 bytes View Download
Components: Blink>Media
Cc: mlamouri@chromium.org
Components: -Blink>Media Blink>Media>Autoplay
Owner: beccahughes@chromium.org
Status: Assigned (was: Unconfirmed)
Thanks for the report! It seems that I can reproduce this, indeed.
After a bit of testing, it appears you can also do this in Android's Chrome, but you need to increase function timeout a bit (about 1000)
Status: Started (was: Assigned)
A better solution might be a control in chrome://settings/content that enables the user to choose whether or not to allow video to play - period.

There have been instances when I've attempted to read an article, and there were two or more third party video advertisements that auto-played [thankfully muted] - consuming so many resources that even scrolling down the page was painfully slow.
Unfortunately, blocking muted videos is not the right solution. This used to be the common policy on mobile for Chrome and Safari and websites simply kept using animated images or even sometimes dececoded videos in javascript. Both are significantly worse for resources than a video playing muted. Realistically, the only thing the browser can control is whether sound is going out.
I cannot reproduce this on Linux with 68.0.3440.112 or 70.0.3518.0 with both dev and release builds.

Also, did you have the devtools open when you were able to do this? There is a bug where having devtools open may count as a user gesture.

@mlamouri - which version could you reproduce it on?
I'm running with 69.0.3497.12 (Dev) on Linux. I have a pending update which I guess might move me to 70.*. I can try on my laptop later which is more up to date.
Just tested on 70.0.3514.0 (Dev) and I can't repro. Same on 69.0.3497.32 (Beta) and 68.0.3440.106 (Stable). (・_・ヾ
polskafi...@gmail.com - can you reproduce this on dev or beta?
NextAction: 2018-09-20

Comment 12 Deleted

It stopped working for some unknown reason, but I increased the timeout to 1000 and it works again, but not always: https://lunaris.play.ai/poc2.html
I still cannot repro this on Linux or Mac.
I still cannot reproduce this on 68.0.3440.106 (Windows 64 bit). Please can you go to chrome://version and copy and paste your "Variations" section here?
Labels: Needs-Feedback
NextAction: 2018-09-27
The NextAction date has arrived: 2018-09-27
Status: Closed (was: Started)
We still cannot reproduce this and the issue has been waiting feedback for 30 days so closing.

Sign in to add a comment