New issue
Advanced search Search tips

Issue 850922 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

videoElement.srcObject = stream doesn't autoplay

Reported by bogdanos...@gmail.com, Jun 8 2018

Issue description

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

Steps to reproduce the problem:
1. Cretae HTML5 video element, and select it with JS
2. Use navigator.MediaDevices.getUserMedia({video:true})
for getting video device
3. then add the return stream to the .srcObject of the element
4. Video element doesn't autoplay 

What is the expected behavior?
Element should autoplay when the stream is attached to the srcObject of the HTML5 video element.

What went wrong?
The video element should auto play like it did before, or I missed a release not.

Did this work before? Yes 66

Does this work in other browsers? No
 It also worked in Firefox, but can't remember what version exactly, maybe Firefox 58. The way it works now also fixes the bug in Mozilla Firefox.

Chrome version: 67.0.3396.79  Channel: stable
OS Version: 10.0
Flash Version: 

before chrome 67 this worked for local video to start playing:
//localVideo = document.querySelector("#localVideo");

navigator.MediaDevices.getUserMedia({video: true})
 .then(stream => {
  localVideo.srcObject = stream;
})

now it only is :
navigator.MediaDevices.getUserMedia({video: true})
 .then(stream => {
  localVideo.srcObject = stream;
  localVideo.play();
})
 
Sorry, now it works in this example on the bottom:
navigator.MediaDevices.getUserMedia({video: true})
 .then(stream => {
  localVideo.srcObject = stream;
  localVideo.play();
})

It auto plays correctly when i use this code here, forgot to edit it in original post.
Labels: Needs-Triage-M67

Comment 3 by guidou@chromium.org, Jun 11 2018

Status: WontFix (was: Unconfirmed)
This is all working as intended. You are just experiencing the effects of the new autoplay policy.
More details here: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Oh, OK. My bad then for not being informed. Thanks

Sign in to add a comment