Re: Track "id" format?

On Tue, Nov 12, 2013 at 6:50 AM, Brendan Long <B.Long@cablelabs.com> wrote:
>> I'm concerned about having id clashes. If the page contains a out-of-band
>> track that has an id that matches the one we generate we could have
>> problems. Both the in-band and out-of-band text tracks would have the same
>> id.
>
> I'm not sure there's any way we can prevent this. It seems to me that we
> should:
>
> Define what happens when the id on an in-band text track is the same as the
> id on an out-of-band text track, with media fragments and getTrackById().
> I'd recommend that the out-of-band track is used, since that's probably what
> the author is expecting. Luckily, this situation can't happen with audo and
> video tracks (yet?).
> Recommend that people use ids that are unlikely to conflict (not numbers).

Agreed. This is not a new situation. The HTML spec defines id to be
document unique:
http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute
But sometimes it happens that an id value is re-used by accident.
That's generally an undefined situation, since it's non-conformant,
but when selecting an element with an id that's not unique, browsers
usually return the first such element. This is not codified anywhere
FAIK.

Silvia.

Received on Monday, 11 November 2013 23:28:05 UTC