MediaStreamTrack clone API just clones the track but not the media source, as a result, if a track is muted/stopped it will mute/stop the media source and all the tracks associated with media source will be affected. A change in state of a track using a media source should not impact the other tracks using the same media source.
<rdar://problem/32518527>
(In reply to Prerak Jain from comment #0) > MediaStreamTrack clone API just clones the track but not the media source, > as a result, if a track is muted/stopped it will mute/stop the media source > and all the tracks associated with media source will be affected. A change > in state of a track using a media source should not impact the other tracks > using the same media source. There are things that can be done in terms of stopping/muting. If it comes to properties of the source (width, height, echo cancellation...), that may be harder.
Created attachment 313153 [details] Patch
Created attachment 313154 [details] Patch
Comment on attachment 313153 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=313153&action=review > Source/WebCore/ChangeLog:11 > + Moving enabled handling in MediaStreamTrackPrivate instead of RealtimeMediaSource. Nit: "Moving enabled handling in" => "Move enabled handling to" > Source/WebCore/ChangeLog:13 > + Moving WebRTC and WebAudio customers of RealtimeMediaSource to MediaStreamTrackPrivate. > + Moving creation of WebAudio provider to MediaStreamTrackPrivate. Nit: "Moving" => "Move" > Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:196 > mediaSample.setTrackID(id()); This isn't new to this patch, but sample can only have one "track ID" so I think we have a problem when a source is attached to more than one track.
> > Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:196 > > mediaSample.setTrackID(id()); > > This isn't new to this patch, but sample can only have one "track ID" so I > think we have a problem when a source is attached to more than one track. I was wondering what was its actual use. It seems it is only used in SourceBuffer::sourceBufferPrivateDidReceiveSample. Maybe trackID should not be set in MediaSample but retrieved from the track or from another parameter.
Created attachment 313159 [details] Fixes build
Created attachment 313164 [details] Fixing build again
Comment on attachment 313164 [details] Fixing build again Clearing flags on attachment: 313164 Committed r218497: <http://trac.webkit.org/changeset/218497>
All reviewed patches have been landed. Closing bug.
*** Bug 174126 has been marked as a duplicate of this bug. ***