Re: [ACTION-59] Introduce lookup by id structures for streams and tracks.

On 11/06/2012 11:14 AM, Adam Bergkvist wrote:
> On 2012-11-05 16:59, Martin Thomson wrote:
>> On 5 November 2012 14:12, Harald Alvestrand <harald@alvestrand.no> 
>> wrote:
>>> I like simplicity.
>>> I'd like to introduce three operators on a MediaStream:
>>>
>>> sequence<MediaStreamTrack> videoTracks()
>>> sequence<MediaStreamTrack> audioTracks()
>>> sequence<MediaStreamTrack> allTracks()
>>
>> That would be my preference.
>>
>> Add a "MediaStreamTrack? getTrackById(DOMString id)" and we're good.
>>
>
> There's more to it. We need to move the 
> add(MediaStreamTrack)/remove(...) functions and the event handler 
> attributes as well.
>
> I think the track lists should be attributes on MediaStream similar to 
> the track lists on the media elements; it's not possible with 
> sequences. A sequence is also about order which is the thing we want 
> to move away from.
>
> /Adam
Apologies for the earlier confusion; I was writing MediaStreamTrack 
where I should be writing MediaStreamTrackList. That's the level of 
hierarchy I don't see the need for any more; since a MediaStream holds a 
bag of MediaStreamTracks, there doesn't seem to need to be any separate 
lists any more - and with access operators, we can get the subset of 
tracks we need when we need them.

But given my inability to type straight, perhaps I'll see it later.

I'd like more people to think about this and offer opinions.

Received on Tuesday, 6 November 2012 10:52:49 UTC