W3C home > Mailing lists > Public > public-webrtc@w3.org > September 2011

Re: MediaStreamTrack disabling - effect on downstream MediaStreams?

From: ᛏᚮᛘᛘᚤ <tommyw@google.com>
Date: Thu, 15 Sep 2011 11:08:42 -0700
Message-ID: <CALLKCfNSzQDTv2qLCN9_e6G2eT2-89=i6TvVn70KqV=LgR1kzA@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>
Cc: "public-webrtc@w3.org" <public-webrtc@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:25 UTC