Re: Feedback on MediaController

On Thu, 21 Apr 2011 01:01:53 +0200, Ian Hickson <ian@hixie.ch> wrote:

> On Mon, 18 Apr 2011, Philip Jägenstedt wrote:
>>
>> Apart from this, I think that TrackList really should be a list of Track
>> objects or similar, so that getName/getLanguage are pushed onto that
>> object as .name and .language, just like on TextTrack.
>
> This would balloon the number of objects in the platform. Unless there's  
> a
> very good reason to have objects for each of these tracks, we should  
> avoid
> doing that.

Oops, I forgot to answer this part.

Is it the number of interfaces that pollute the global (window) namespace  
you are worried about, or the number of ECMAScript objects at runtime? Why  
would it a problem to have one object per audio/video track but not a  
problem for text tracks? The number of objects is negligible compared to  
the CPU/memory needed to actually decode multiple media streams in sync,  
so this can't be the only reason for this design. (Also, the objects can  
be created lazily when accessed.)

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Tuesday, 26 April 2011 09:54:16 UTC