Re: WebVTT spec

On Tue, 26 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".
> >
> > Not sure why the constructor (assuming that's what you mean by 
> > "TextTrackCue()") would be where that would be defined. These objects 
> > can be created in many ways; most commonly, they're created by the 
> > WebVTT parser directly, without the constructor.
> 
> If you're using <track>, yes.

The API doesn't make any distinction as to where the cue originally came 
from. It just has an object that represents a text track cue, which could 
be a WebVTT cue, or an EBU cue, or a Spruce STL cue, or whatever.


> I am assuming a JavaScript-only use of TextTrack() constructor and 
> TextTrackCue(). And yes, you are right: the format is much better suited 
> to being defined in the TextTrack() constructor rather than in a 
> TextTrackCue().

I don't understand the relevance of constructors at all here.


> > The definition of the WebVTT data model says of WebVTT cues:
> >
> > # The associated rules for updating the text track rendering of WebVTT
> > # text track cues are the rules for updating the display of WebVTT text
> > # tracks.
> 
> When you are doing it all in script, there is no WebVTT file and no 
> means to specify that the cue that you are providing is in the format of 
> a WebVTT cue.

What's that got to do with anything?

The WebVTTCue constructor ("new WebVTTCue()") creates a WebVTT cue (if you 
want, you could make this more explicit by changing "Create a new _text 
track cue_" to "Create a new _text track cue_ that is a _WebVTT cue_", 
and then make "WebVTT cues" in the data model section a <dfn> for xrefs).

When you provide a WebVTT cue's object (WebVTTCue) to addCue(), addCue() 
checks what kind of cue it is, and based on that either rejects the cue or 
sets the text track to be a text track for that kind of cue.


> > A WebVTT cue isn't a TTML cue. Why would distinguishing them be 
> > difficult?
> 
> Again: assuming you do it all in script: you create a text track using 
> TextTrack() then you add a cue using TextTrackCue() and addCue().

I'm not sure what you mean by TextTrack() and TextTrackCue().

Right now in the specs the only pure-script way to create a cue of any 
format by invoking the WebVTTCue constructor ("new WebVTTCue()"), which 
returns a WebVTT cue. The only way to create a TextTrack object is using 
the addTextTrack() method on HTMLMediaElement.


> The browser has no idea what format that cue is in - it could be in 
> WebVTT Cue format or TTML cue format or anything else for that matter.

The format of the cue is known when it is created.


> On Sun, 24 Mar 2013, Silvia Pfeiffer wrote:
> > >
> > > I've copied the spec text to a new HTML file and uploaded it to the 
> > > W3C Mercurial repository - it's now staged at:
> > >
> > > https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html
> >
> > Do you have a diff of this spec to the existing one? I'd like to make 
> > sure that the diff is zero before we actually hand things over.
> 
> Are you after a diff on the html level or something else? I just copied 
> all the text from the whatwg source file that was between <!--START 
> webvtt --> and <!--END webvtt --> markers, then applied the ReSpec 
> boilerplate.

I mean a diff of this:

   https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html

...and this:

   http://dev.w3.org/html5/webvtt/

It looks like there's all kinds of errors right now, for example compare 
these two sections:

   https://dvcs.w3.org/hg/text-tracks/raw-file/default/webvtt/webvtt.html#webvtt-cue-text-dom-construction-rules
   http://dev.w3.org/html5/webvtt/#webvtt-cue-text-dom-construction-rules

Also the new style sheet you have applied is missing all kinds of things. 
For example, the table in the section above is all misstyled, domintro 
blocks are unstyled, the spacing in the IANA section is all off, broken 
cross-references and incomplete sections aren't highlighted, etc.

Also you're referencing a version of HTML with all kinds of errors, and 
you seem to have changed the spec's status from "Standard" to "Working 
Draft" which seems like a regression.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 25 March 2013 22:27:49 UTC