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

Issue 817346 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

video from getUserMedia seems to stutter when there is no autoplay

Reported by fi...@appear.in, Feb 28 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/64.0.3282.167 Chrome/64.0.3282.167 Safari/537.36

Steps to reproduce the problem:
1. go to any https-enabled page.
2. paste this into the console:
navigator.mediaDevices.getUserMedia({video: true})
.then(stream => {
  var stutter = document.createElement('video');
  stutter.srcObject = stream
  document.body.appendChild(stutter);
});

This creates a video element without autoplay and attaches a local media stream to it. IIRC the behaviour for a remote media stream is the same.

What is the expected behavior?
unclear... firefox does not play.

What went wrong?
the video updates with an irregular framerate. Developers apparently get confused by this because it kind-a seems to work and don't attempt to call play() or add autoplay (both fix the issue)

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 64.0.3282.167  Channel: n/a
OS Version: 
Flash Version:
 

Comment 1 by fi...@appear.in, Feb 28 2018

oh... this doesn't seem to happen with remote streams.
Make a call on 
   https://webrtc.github.io/samples/src/content/peerconnection/pc1/
paste
  var stutter = document.createElement('video');
  stutter.srcObject = pc2.getRemoteStreams()[0]
  document.body.appendChild(stutter);
This plays the remote stream just fine. Even though autoplay is lacking?!

Comment 2 by fi...@appear.in, Feb 28 2018

can reproduce both local and remote behaviour in 57.0.2987.110 so this is not related to the autoplay change. From what I recall the local issue has been around for ages.
Labels: Needs-Triage-M64
Labels: Triaged-ET M-66 FoundIn-66 Target-66 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome latest stable #64.0.3282.186 and latest canary #66.0.3358.0.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Components: Blink>Media>Video
Components: -Blink>Media>Video
Dropping Blink>Media>Video for GuM folks to triage.

Comment 7 by guidou@chromium.org, Mar 15 2018

Owner: guidou@chromium.org
Status: Started (was: Untriaged)

Comment 8 by guidou@chromium.org, Mar 15 2018

This shouldn't play. The stutter is because the renderer for mediastreams starts as if it should be playing, but other parts assume that it shouldn't be playing. So the initial state is inconsistent and the result is the stutter.
Will start work on a fix.

Comment 9 by guidou@chromium.org, Mar 15 2018

Cc: junov@chromium.org dcasta...@chromium.org niklase@chromium.org emir...@chromium.org foolip@chromium.org reve...@chromium.org ccameron@chromium.org guidou@chromium.org
 Issue 810330  has been merged into this issue.
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 20 2018

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

commit 81866e04ef43113fc195c539b291dd4d95a3d341
Author: Guido Urdaneta <guidou@chromium.org>
Date: Tue Mar 20 17:23:22 2018

Do not render frames if WebMediaPlayerMSCompositor has not started.

This CL makes WebMediaPlayerMSCompositor return null if it has never
started, even if it has a frame available to deliver.

This fixes the problem of paused media elements rendering frames when
they have a MediaStream assigned.

Bug:  817346 
Change-Id: Ie0ddfc92e1ba8f82b2ec0a463f8bebaaf1592926
Reviewed-on: https://chromium-review.googlesource.com/966901
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544421}
[modify] https://crrev.com/81866e04ef43113fc195c539b291dd4d95a3d341/content/renderer/media/stream/webmediaplayer_ms_compositor.cc
[modify] https://crrev.com/81866e04ef43113fc195c539b291dd4d95a3d341/content/renderer/media/stream/webmediaplayer_ms_compositor.h
[add] https://crrev.com/81866e04ef43113fc195c539b291dd4d95a3d341/third_party/WebKit/LayoutTests/media/video-capture-canvas-paused.html
[modify] https://crrev.com/81866e04ef43113fc195c539b291dd4d95a3d341/third_party/WebKit/LayoutTests/media/video-capture-canvas.html

Status: Fixed (was: Started)
Note that this fixes the autoplay issue on Mac but NOT in Chrome OS. I can still see the stutter in https://beaufortfrancois.github.io/sandbox/media/canvas-to-video.html?autoplay (video is autoplayed)

We may want to reopen  https://bugs.chromium.org/p/chromium/issues/detail?id=810330 if this wasn't a real duplicated.
The issue in  bug 810330  was the same as this bug. Basically, the media element was playing a MediaStream while it was paused.
If you notice on CrOS that the video is paused but it's playing (with or without stutter), then it's the same bug and it should be reopened (verify it's a version that has r544421 applied).
If it's a video that should be playing (not paused) and it's stuttering, then you should file a new bug.
Thanks. I've filed a new bug at https://bugs.chromium.org/p/chromium/issues/detail?id=824752

Sign in to add a comment