MediaStreamTrack.clone() doesn't carry properties over |
||||||
Issue descriptionCloning a MediaStreamStreamTrack creates a new MediaStreamTrack using the same source: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp?q=mediastreamtrack.clone&sq=package:chromium&dr=C&l=142 MediaStreamComponent* clonedComponent = MediaStreamComponent::create(component()->source()); MediaStreamTrack* clonedTrack = MediaStreamTrack::create(context, clonedComponent); This means that flags such as enabled or stopped don't carry over. This is true for CanvasCaptureMediaStreamTrack as well. Can we make it so that MediaStreamComponent has a clone method that creates a new ID instead? (And avoid code duplication for CanvasCaptureMST.clone as well.)
,
Dec 1 2016
FTR not all properties are carried over with the above CL, stopped/readyState which is part of MediaStreamTrack probably need to be cloned. It should be done in a way so that not all subclasses (MST, CanvasCaptureMST) have to implement the clone step separately.
,
Mar 13 2018
,
Mar 13 2018
,
Mar 30 2018
,
Apr 4 2018
c.padhi@:One thing clone() is missing is cloning constraints.
T.getConstraints() should return the same value as T.clone().getConstraints(), but currently the latter always returns {}.
To fix this, the constraints_ field of MediaStreamComponent must be copied in MediaStreamComponent::Clone().
,
Apr 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/98a21bb961814a18a259f9d08fe2e2f0ea489d42 commit 98a21bb961814a18a259f9d08fe2e2f0ea489d42 Author: Chandan Padhi <c.padhi@samsung.com> Date: Fri Apr 06 02:51:18 2018 Clone MediaStreamTrack's constraints MediaStreamTrack's clone should have same constraints. This CL ensures that MediaStreamTrack.clone().getConstraints() returns the same value as MediaStreamTrack.getConstraints(). Bug: 669212 Change-Id: I305a3e3e831d8355576201dada5f1ef81072bab5 Reviewed-on: https://chromium-review.googlesource.com/997319 Reviewed-by: Guido Urdaneta <guidou@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Chandan Padhi <c.padhi@samsung.com> Cr-Commit-Position: refs/heads/master@{#548647} [modify] https://crrev.com/98a21bb961814a18a259f9d08fe2e2f0ea489d42/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-clone.html [modify] https://crrev.com/98a21bb961814a18a259f9d08fe2e2f0ea489d42/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.cpp [modify] https://crrev.com/98a21bb961814a18a259f9d08fe2e2f0ea489d42/third_party/WebKit/Source/platform/mediastream/MediaStreamComponent.h
,
Apr 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4e66bb2982aa9fecc436fe8ef5a605f4acfc22f7 commit 4e66bb2982aa9fecc436fe8ef5a605f4acfc22f7 Author: Chandan Padhi <c.padhi@samsung.com> Date: Fri Apr 06 06:48:42 2018 Clone MediaStreamTrack's readyState property MediaStreamTrack's clone should have the same state. This CL ensures that MediaStreamTrack.clone().readyState returns the same value as MediaStreamTrack.readyState. Bug: 669212 Change-Id: I7547aff039ecdef5fb6d059957ea3566c798d86f Reviewed-on: https://chromium-review.googlesource.com/996837 Commit-Queue: Chandan Padhi <c.padhi@samsung.com> Reviewed-by: Guido Urdaneta <guidou@chromium.org> Cr-Commit-Position: refs/heads/master@{#548699} [modify] https://crrev.com/4e66bb2982aa9fecc436fe8ef5a605f4acfc22f7/third_party/WebKit/LayoutTests/fast/mediastream/MediaStreamTrack-clone.html [modify] https://crrev.com/4e66bb2982aa9fecc436fe8ef5a605f4acfc22f7/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp [modify] https://crrev.com/4e66bb2982aa9fecc436fe8ef5a605f4acfc22f7/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
,
Apr 12 2018
,
Jun 7 2018
[bulk-edit: disregard if N/A] Can the owner please set milestone to this bug if applicable? |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bugdroid1@chromium.org
, Dec 1 2016