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:
,
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.
,
Feb 28 2018
,
Mar 1 2018
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...!!
,
Mar 2 2018
,
Mar 9 2018
Dropping Blink>Media>Video for GuM folks to triage.
,
Mar 15 2018
,
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.
,
Mar 15 2018
Issue 810330 has been merged into this issue.
,
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
,
Mar 20 2018
,
Mar 22 2018
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.
,
Mar 22 2018
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.
,
Mar 22 2018
Thanks. I've filed a new bug at https://bugs.chromium.org/p/chromium/issues/detail?id=824752 |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by fi...@appear.in
, Feb 28 2018