[whatwg] Enabling/disabling tracks in MediaStreams

On Mon, 18 Jul 2011, Tommy Widenflycht (?~[~O?~Z??~[~X?~[~X?~Z?) wrote:
>
> I am very confused regarding the below paragraph from the latest spec:
> 
> When a track in a MediaStream parent is disabled, any MediaStreamTrack 
> objects corresponding to the tracks in any MediaStream objects that were 
> created from parent are disassociated from any track, and must not be 
> reused for tracks again. If a disabled track in a MediaStream parent is 
> re-enabled, from the perspective of any MediaStream objects that were 
> created from parent it is a new track and thus new MediaStreamTrack 
> objects must be created for the tracks that correspond to the re-enabled 
> track.
> 
> After cloning a LocalMediaStream it looks like this:
> 
> LocalMediaStream -> MediaStream1
> Track1(E)           Track1(E)
> Track2(E)           Track2(E)
> Track3(E)           Track3(E)
> 
> and as I interpret the spec it looks like this if Track1 in the 
> LocalMediaStream is disabled:
> 
> LocalMediaStream -> MediaStream1
> Track1(D)           Track2(E)
> Track2(E)           Track3(E)
> Track3(E)

Correct so far (though I'd avoid the term "cloning" since it's not quite 
what's going on here -- the spec uses "forking", which may be closer 
though is still not ideal).


> So Track1 disappears from the MediaStream1 object and doesn't come back 
> even if Track1 in the LMS object is enabled:
>
> LocalMediaStream -> MediaStream1
> Track1(E)           Track2(E)
> Track2(E)           Track3(E)
> Track3(E)

No, it'll create a new track object:

 LocalMediaStream -> MediaStream1
 Track1(E)           Track4(E)
 Track2(E)           Track2(E)
 Track3(E)           Track3(E)

This is specified in the sentence that starts "If a disabled track in a 
MediaStream parent is re-enabled...".

If you could explain how you are interpreting the current text I would be 
happy to fix the problematic area to be clearer (it's not clear to me 
what's unclear at the moment).


On Mon, 18 Jul 2011, Harald Alvestrand wrote:
> 
> What is the scenario in which this behavioiur is useful?

The muting feature exists in order to allow authors to mute outgoing video 
while leaving outgoing audio and while still having a local video montior.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 18 July 2011 11:38:52 UTC