答复: MediaStreamTrack behaviuor

Are you sure?

Since we do not construct new mediastreamtrack, so I mute it in 1st  mediastream, it will change the object status.
Since it is the same object referenced in 2nd mediastream, so I think it is also muted.

SO do you mean that if we construct a new mediastream using existing mediastreamtrack, it will be a new object?

Yang
Huawei


-----邮件原件-----
发件人: Stefan Hakansson LK [mailto:stefan.lk.hakansson@ericsson.com] 
发送时间: 2012年7月4日 21:43
收件人: public-media-capture@w3.org
主题: Re: MediaStreamTrack behaviuor

On 07/04/2012 02:35 PM, Tommy Widenflycht (ᛏᚮᛘᛘᚤ) wrote:
> Hi,
> I am a bit confused regarding the latest draft regarding how
> MediaStreamTracks should behave when they are part of more than one
> MediaStream.
>
> It used to be that when a MediaStream was created with a list of Tracks
> one created new tracks that had the same underlying data source as the
> input tracks. Basically one cloned the tracks.
>
> Now the draft says that the new MediaStream should add the same Tracks
> to its lists. That means that the same Track can now belong to more than
> one MediaStream. This has an unfortunate effect that if one disables a
> Track, the Track gets disabled in all MediaStreams. It is no longer
> possible to have independent enabled stated, and for example this basic
> use case is impossible:
>
> A LocalMediaStream is created by getUserMedia. The user creates a new
> MediaStream with the video track from the LMS. The LMS is attached to a
> video tag for self view, and the MS is added to a PeerConnection. The
> user wants to implement a video mute function for outgoing video and
> therefore disables the video track in the MS. This now disables the
> video track in the LMS as well whereas before this was doing the right
> thing.
>
> What is the reasoning behind this change?

To me it sounds like an editing mistake. One of the purposes of being 
able to create new MS's from track(lists) of existing MS's is to be able 
to disable a specific track in one MS without disabling the "same" track 
(i.e. the track representing the same source) in the other MS.

So, the way it used to be is the way it should be IMO.

Stefan

>
> /Tommy
>
> --
> Tommy Widenflycht, Senior Software Engineer
> Google Sweden AB, Kungsbron 2, SE-11122 Stockholm, Sweden
> Org. nr. 556656-6880
> And yes, I have to include the above in every outgoing email according
> to EU law.

Received on Thursday, 5 July 2012 09:14:12 UTC