Re: Track "id" format?

On Tue, Nov 12, 2013 at 5:31 AM, Brendan Long <B.Long@cablelabs.com> wrote:
>> I agree on using a string, and personally lean toward using a hex
>> representation.
>
> I think it would be best if the translation between binary-in-the-file to
> track id was format-specific, so we can use the most appropriate
> representation for each format.

We can define how to convert an inband ID representation into the
value for the @id attribute of tracks in HTML, but we have to stick
with the resulting @id value being conformant with the HTML spec.

In the HTML spec, @id is always DOMString, for all types of tracks:
http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#texttrack
http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#audiotrack
http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#videotrack

So, just convert whichever unique track identifier a format has into a
DOMString and expose that in the @id attribute.

It seems like that is:
* the PID for MPEG-TS
* the TrackUID for matroksa
* the name in Ogg Skeleton

Regards,
Silvia.

> For example, it seems reasonable to
> represent Matroska TrackUID's as decimal numbers, but for Ogg Skeleton files
> it could be the name (which can be anything, as long as it's per-file
> unique).
>
> Or maybe it would be useful if the ID was always a number? For Ogg we can
> use the stream serial number if we wanted to, but the current HTML spec says
> we should use the name header. The stream serial number has the advantage of
> always existing.

Received on Monday, 11 November 2013 22:42:39 UTC