Re: WebVTT spec

On Tue, Mar 19, 2013 at 9:12 AM, Ian Hickson <ian@hixie.ch> wrote:

> On Tue, 19 Mar 2013, Silvia Pfeiffer wrote:
> >
> > So how does the browser get informed about the format if the cues? Which
> > rules it has to use to interpret then?
>
> This is already defined in the spec, no? I'm confused about what is
> ambiguous here. Why would it be unclear?
>

In the spec where  addTextTrack(kind, label, language) is defined [1] it
says:

"Initially, the text track list of cues is not associated with any rules
for updating the text track rendering. When a text track cue is added to
it, the text track list of cues has its rules permanently set accordingly."

So I go to the definition of TextTrackCue() and it contains no information
on the "rules for updating the text track rendering".

So I go and check the addCue() function [2], which says:

"If the text track list of cues does not yet have any associated rules for
updating the text track rendering, then associate the text track list of
cues with the rules for updating the text track rendering appropriate to
cue."

However, what does "appropriate to cue" mean? How is the browser supposed
to distinguish between a cue in a WebVTT format or a cue in a TTML format
or anything else? Is it supposed to guess from the tags used in the cue?
This is why I suggested adding a "format" parameter to addCue().

Cheers,
Silvia.

[1]
http://www.whatwg.org/specs/web-apps/current-work/#dom-media-addtexttrack
[2] http://www.whatwg.org/specs/web-apps/current-work/#dom-texttrack-addcue

Received on Saturday, 23 March 2013 12:54:24 UTC