Re: TextTrack questions

On Thu, Jan 16, 2014 at 10:18 AM, Brendan Long <self@brendanlong.com> wrote:

>
> On 01/15/2014 03:02 PM, Aaron Colwell wrote:
> > In the case of in-band tracks it is not clear what should be done
> > because seeking back to an earlier portion of the clip would cause the
> > file format parser to parse the cue data again and potentially try to
> > insert it again. If the original cue was modified, then the cue data
> > in the file and the values in the existing TextTrackCue wouldn't match
> > so simple duplicate detection would not work.
> >
> > Is the UA expected to keep a unique internal id for each in-band
> > TextTrackCue it creates so that it doesn't reinsert a cue that was
> > inserted previously, but was modified?
>
> As far as I know, the spec doesn't say how to handle this. In WebKit, we
> check if a cue already exists before adding it, so if we seek back and
> see a cue with exactly the same startTime, endTime and text as an
> existing cue, then we don't add it again.
>

Ok. So existing WebKit behavior will add the cue again if the application
modified it. That is likely to be surprising to the application developer.
We definitely need clarification on what the proper behavior should be in
the spec.
Does this behavior take into account cues added by the application itself.
For example if the application uses
addCue<http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#addcue(cue)>()
with data that is identical to something in the in-band track, will 2 cues
get displayed or only the one? It sounds like it would only be 1 which also
might be surprising to the developer.


>
> Keeping track of cues by ID would be nice, but WebVTT cues don't
> necessarily have ID's (and as far as I know, CEA-708 cues don't either).
>

I was assuming that the UA would create some sort of private ID based on
the contents of the cue and/or any other signals available to the format
parser like a sample index. This private ID would then be used to keep
track of whether an existing cue, modified or not, is the result of a
previous add by the file format parser.


Aaron

Received on Thursday, 16 January 2014 18:39:36 UTC