- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Tue, 26 Mar 2013 10:23:48 +1100
- To: Ian Hickson <ian@hixie.ch>
- Cc: david Singer <singer@apple.com>, public-texttracks@w3.org
- Message-ID: <CAHp8n2=1mHV95P3ZAJ3dcL8Pe+QEwgUuLOeiVUd-57qMAxDpRg@mail.gmail.com>
On Tue, Mar 26, 2013 at 9:27 AM, Ian Hickson <ian@hixie.ch> wrote: > On Tue, 26 Mar 2013, Silvia Pfeiffer wrote:> 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. > Actually, the constructors were the key point of my problem. I think I've got it now: you wouldn't create a TextTrackCue() because it's only a virtual class, you would only create a WebVTTCue(). Thus, the format is clear and there is no need to specify it further. I've understood now. > > 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. > Yup, that resolves it. Sorry about the confusion - I really didn't think this through. > > 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. > Right. Problem solved, thanks! > 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 > > Yes, I think that's a style issue. > 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. > Right - I haven't fully applied all the ReSpec functionality yet. Thanks for pointing these out. 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. > Yes, that part I have no idea how to deal with. David will have to provide help there. Thanks - I'll give the formatting another go. Clearly, it's not ready yet. Silvia.
Received on Monday, 25 March 2013 23:24:36 UTC