Stopping CanvasCaptureMediaStreamTrack prevent other MediaStreamTrack from stopping
Reported by
je...@iotum.com,
Jan 9 2018
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299 Steps to reproduce the problem: 1. Visit https://webrtc.github.io/samples/src/content/capture/canvas-video/ and confirm the canvas is streamed to <video> by dragging the pot on the left. 2. Open F12, check window.stream.getTracks() to be [CanvasCaptureMediaStreamTrack] 3. Run the following: navigator.mediaDevices.getUserMedia({audio:false,video:true}).then(s=>{video.srcObject=window.camStream=s}, (msg,err)=>console.error(msg,err)); 4. Stopping by window.camStream.getVideoTracks()[0].stop(); and re-starting by running #3 would obtain a new stream and the <video> would resume as expected. 5. Run window.stream.getVideoTracks()[0].stop() to stop the CanvasCaptureMediaStreamTrack 6. window.camStream.getVideoTracks()[0].stop() no longer works, nor is #3 (stuck in promise pending state) What is the expected behavior? Stopping CanvasCaptureMediaStreamTrack should not prevent other media track from working. What went wrong? Somehow CanvasCaptureMediaStreamTrack() causes other MediaStreamTrack to get stuck and not able to stop. Did this work before? Yes 63.0.3239.132 Does this work in other browsers? N/A Chrome version: 64.0.3282.71 Channel: beta OS Version: 10.0 Flash Version: I'm hoping Chrome M64 doesn't go live with this regression.
,
Jan 9 2018
Experience same issue mentioned by Comment 1
,
Jan 10 2018
,
Jan 10 2018
Able to reproduce the issue on reported version 64.0.3282.71 and latest canary 65.0.3317.0 using Mac 10.12.6, Ubuntu 14.04 and Windows-10 hence providing Bisect Info Bisect Info: ================ Good build: 64.0.3266.0 Bad build: 64.0.3267.0 You are probably looking for a change made after 515931 (known good), but no later than 515932 (first known bad). https://chromium.googlesource.com/chromium/src/+log/93cd0fae59e688c7f064269b60a194cb2c321adc..26387bf1c7f788ab6617d00569a538637bf33deb Reviewed-on: https://chromium-review.googlesource.com/751981 @Guido Urdaneta: Please confirm the issue and help in re-assigning if it is not related to your change. Adding ReleaseBlock-Stable as it seems recent break, feel free to remove it if not applicable. Thanks!
,
Jan 10 2018
,
Jan 10 2018
Working on a fix.
,
Jan 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b59aeb83a4f06e3e2eaefd6544477c20657fead0 commit b59aeb83a4f06e3e2eaefd6544477c20657fead0 Author: Guido Urdaneta <guidou@chromium.org> Date: Wed Jan 10 18:48:10 2018 Force state update for nondevice video source after stop. Before this change, stopping nondevice tracks (e.g., canvas capture) did not trigger an update that was necessary to remove completed tasks from a queue with MediaStream-related tasks, preventing new operations such as getUserMedia from executing. A test is on a separate CL (crrev.com/c/860361) in order to make merging easier. Bug: 800313 Change-Id: Ia395b10510362af91a471a352ff90025c5776dd6 Reviewed-on: https://chromium-review.googlesource.com/860040 Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#528367} [modify] https://crrev.com/b59aeb83a4f06e3e2eaefd6544477c20657fead0/content/renderer/media/media_stream_video_capturer_source.cc [modify] https://crrev.com/b59aeb83a4f06e3e2eaefd6544477c20657fead0/content/renderer/media/media_stream_video_source.cc [modify] https://crrev.com/b59aeb83a4f06e3e2eaefd6544477c20657fead0/content/renderer/media/media_stream_video_track.cc
,
Jan 11 2018
,
Jan 11 2018
This bug requires manual review: We are only 11 days from stable. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jan 11 2018
,
Jan 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e7329103d9840cad6533c692aede8301ce13797e commit e7329103d9840cad6533c692aede8301ce13797e Author: Guido Urdaneta <guidou@chromium.org> Date: Thu Jan 11 16:24:48 2018 Add test to check that getUserMedia works after stopping canvas capture This is a test for crrev.com/c/860040. Bug: 800313 Change-Id: I8a2aada4d3bc7cd415eb638d689b463ccc9a102a Reviewed-on: https://chromium-review.googlesource.com/860361 Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#528638} [modify] https://crrev.com/e7329103d9840cad6533c692aede8301ce13797e/content/browser/webrtc/webrtc_getusermedia_browsertest.cc [modify] https://crrev.com/e7329103d9840cad6533c692aede8301ce13797e/content/test/data/media/getusermedia.html
,
Jan 11 2018
,
Jan 11 2018
Thanks for the fix. Can you please confirm if this is well tested in Canary/Dev? And is this a safe merge overall?
,
Jan 12 2018
This has been in Canary for 2 days. I tested on a Canary and the issue is fixed. I expect the merge to M64 to be straighforward.
,
Jan 12 2018
Approving merge to M64. Branch:3282
,
Jan 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/706fdfe3ffc9dc0234938cf02a38b693a8d557e4 commit 706fdfe3ffc9dc0234938cf02a38b693a8d557e4 Author: Guido Urdaneta <guidou@chromium.org> Date: Fri Jan 12 20:59:11 2018 Force state update for nondevice video source after stop. Before this change, stopping nondevice tracks (e.g., canvas capture) did not trigger an update that was necessary to remove completed tasks from a queue with MediaStream-related tasks, preventing new operations such as getUserMedia from executing. A test is on a separate CL (crrev.com/c/860361) in order to make merging easier. Bug: 800313 Change-Id: Ia395b10510362af91a471a352ff90025c5776dd6 Reviewed-on: https://chromium-review.googlesource.com/860040 Reviewed-by: Henrik Boström <hbos@chromium.org> Commit-Queue: Guido Urdaneta <guidou@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#528367}(cherry picked from commit b59aeb83a4f06e3e2eaefd6544477c20657fead0) Reviewed-on: https://chromium-review.googlesource.com/864023 Reviewed-by: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/branch-heads/3282@{#496} Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840} [modify] https://crrev.com/706fdfe3ffc9dc0234938cf02a38b693a8d557e4/content/renderer/media/media_stream_video_capturer_source.cc [modify] https://crrev.com/706fdfe3ffc9dc0234938cf02a38b693a8d557e4/content/renderer/media/media_stream_video_source.cc [modify] https://crrev.com/706fdfe3ffc9dc0234938cf02a38b693a8d557e4/content/renderer/media/media_stream_video_track.cc |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by sean.io...@gmail.com
, Jan 9 2018