Re: Cues with 'start time' >= 'end time'

> On Thu, 26 Apr 2012, Victor Carbune wrote:
>> On Thu, Apr 26, 2012 at 6:34 AM, Ian Hickson <ian@hixie.ch> wrote:
>> > On Thu, 26 Apr 2012, Silvia Pfeiffer wrote:
>> >>
>> >> I agree. Keeping such faulty cues in the objects will just result in
>> >> a need for extra error handling in the browsers and other
>> >> implementations, which have to continuously check if the next cue in
>> >> the TextTrackCueList is valid before attaching callbacks and doing
>> >> rendering etc.
>> >
>> > Actually, if they just implement the spec, it all just works, as far
>> > as I can tell. The algorithms mostly don't even need to check for
>> > this.
>>
>> I was thinking about missed cues: the exit event is dispatched before
>> the enter event.
>>
>> Also, for missed cues with start time = end time, even if it's common
>> sense, any dispatch order is theoretically correct.
>>
>> If there's some extra logic in the web page that depends on this order,
>> it might lead to complications.
>
> Thanks for pointing these out. I have now addressed these issues.
I think the change isn't correct:

9. For each text track cue in missed cues, prepare an event named
enter for the TextTrackCue object with the later of the text track cue
start time and the text track cue end time.

10. For each text track cue [...] in missed cues, prepare an event
named exit for the TextTrackCue object with the text track cue end
time.

Case 1: missed cue with proper timing (startTime < endTime)
Step 9 prepares the event ('enter', endTime) (...*later* of the start,
end time...)
Step 10 prepares the event ('exit', endTime)

We should keep events properly associated with timings if it is
nothing wrong with the cue.

Case 2: missed cue with wrong timing (startTime > endTime)
Step 9 prepares the event ('enter', startTime)
Step 10 prepares the event ('exit', endTime)

This is still inverse.


I highly encourage treating negative duration cues as zero-length duration cues.

Depending on the granularity of the playback mechanism a cue might be
treated once as missed cue and have events dispatched and other time
be skipped (because the mechanism steps within the cue timing). Making
it a zero-length cue makes sure it's always a missed cue.

Victor

Received on Friday, 27 April 2012 09:39:47 UTC