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

Issue 620319 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Changing video element source from a MediaStream to a URL allows it to play without user gesture on Android

Project Member Reported by avayvod@chromium.org, Jun 15 2016

Issue description

Navigate to https://github.com/avayvod/avayvod.github.io/blob/master/autoplay-video-ms-test.html to see in action (doesn't work on Chrome 51, but seems to work on 52+).

The idea would be to lock the element once it switches from the MediaStream source to anything else that usually doesn't autoplay.
 
The M51/M52 difference explains why I couldn't reproduce on my phone! :)

I had this test page: https://mounirlamouri.github.io/sandbox/autoplay/mediastream.html
(source: https://github.com/mounirlamouri/sandbox/blob/gh-pages/autoplay/mediastream.html)

FWIW, my test page uses a method that doesn't require any permission which makes the issue way more obvious and easier to test.
Labels: -Pri-1 Pri-2
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49e3b076201542b38774c2137e097f52ea15110f

commit 49e3b076201542b38774c2137e097f52ea15110f
Author: avayvod <avayvod@chromium.org>
Date: Wed Jun 29 11:25:04 2016

Fixes the issue when the media element could be assigned a MediaStream object and then a src= URL that would autoplay as the element was unlocked for MediaStream.

BUG= 620319 
TEST=manual + a layout test

Review-Url: https://codereview.chromium.org/2075563003
Cr-Commit-Position: refs/heads/master@{#402777}

[add] https://crrev.com/49e3b076201542b38774c2137e097f52ea15110f/third_party/WebKit/LayoutTests/media/autoplay-from-mediastream-to-src.html
[modify] https://crrev.com/49e3b076201542b38774c2137e097f52ea15110f/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Status: Fixed (was: Started)

Sign in to add a comment