W3C home > Mailing lists > Public > public-media-capture@w3.org > July 2012

MediaStreamTrack behaviuor

From: ᛏᚮᛘᛘᚤ <tommyw@google.com>
Date: Wed, 4 Jul 2012 14:35:57 +0200
Message-ID: <CALLKCfN=26mrVRV8Z1yQne9uzbKQ5=HQKeQmyB7=ocCBYb1nEA@mail.gmail.com>
To: public-media-capture@w3.org
Cc: Per Kjellander <perkj@google.com>
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?

/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 Wednesday, 4 July 2012 12:36:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:10 UTC