Re: MediaStreamTrack disabling - effect on downstream MediaStreams?

Suggestion: can the enabled attribute of a MediaStreamTrack take into
account its own state as well as its parent(s) state? This would make it
very easy to find out if a track is on or off.

Example:

var mediaStream2 = new MediaStream(mediaStream1);

// mediaStream1.tracks[0].enabled == true
// mediaStream2.tracks[0].enabled == true

mediaStream1.tracks[0].enabled = false;

// mediaStream1.tracks[0].enabled == false
// mediaStream2.tracks[0].enabled == false

mediaStream2.tracks[0].enabled = false;

// mediaStream1.tracks[0].enabled == false
// mediaStream2.tracks[0].enabled == false

mediaStream1.tracks[0].enabled = true;

// mediaStream1.tracks[0].enabled == true
// mediaStream2.tracks[0].enabled == false

On Wed, Sep 14, 2011 at 12:09, Harald Alvestrand <harald@alvestrand.no>wrote:

> **
>
> When a track in a MediaStream<http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastream>
>  parent is disabled, any MediaStreamTrack<http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastreamtrack>
>  objects corresponding to the tracks in any MediaStream<http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastream>
>  objects that were created from parent stop sending data, although their
> "enabled" status does not change. If a disabled track in a MediaStream<http://dev.w3.org/2011/webrtc/editor/webrtc.html#mediastream>
>  parent is re-enabled, data starts flowing on the downstream
> MediaStreamTrack objects, as long as their *enabled* attribute has the
> value "true".
>
>
-- 
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, 15 September 2011 18:09:17 UTC