Re: Survey ready on Media Multitrack API proposal

On Wed, Mar 3, 2010 at 6:09 PM, Maciej Stachowiak <mjs@apple.com> wrote:
>
> On Mar 2, 2010, at 11:03 PM, Silvia Pfeiffer wrote:
>
>> Hi Michael,
>>
>> I saw your questions on the proposal, so thought I should reply
>> immediately.
>
> Those were actually my questions, but I decided to delete my answer for now
> to avoid unduly influencing the answers of others. (For what it's worth, I
> think this is a good proposal and my questions are tangential to my general
> views on its merits).
>
>>
>>> 1) Is it a common use case to want to get a track by name? Is it common
>>> for tracks in a media file to even have unique names?
>>> I am not sure namedItem() is justified.
>>
>> A name is the best possible way to address individual tracks. That
>> name may well be a number in some media file formats, but the most
>> general case is to provide a string.
>
> The name being a number is something that won't work very well with the
> current API, since it will be treated as a numeric index, rather than as a
> name that happens to be a number. If you say tracks[1], is that supposed to
> be the second track, or the one named "1"?

If the track in the media resource is given the name "1", then the API
will expose it as "1" (the string). It will not be possible to use it
as an index.

The tracks[1] is an attribute inside the HTMLMediaElement, which has
nothing to do with the name. In fact, the name would be:
tracks[1].name="1";

I think you confused what associates with the track and what with the
overall media resource.


> You also didn't answer my second question -  are track names typically
> unique? Do media container formats generally guarantee the presence of
> unique track names?

There is no guarantee of their existence - same for the role
attribute. But where they exist, they are unique.

Regards,
Silvia.

Received on Wednesday, 3 March 2010 07:15:46 UTC