This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16701 - The text track cue active flag should be set before the cuechange event is fired.
Summary: The text track cue active flag should be set before the cuechange event is fi...
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: This bug has no owner yet - up for the taking
Depends on:
Reported: 2012-04-11 17:53 UTC by Anna Cavender
Modified: 2012-04-11 18:41 UTC (History)
2 users (show)

See Also:


Description Anna Cavender 2012-04-11 17:53:23 UTC
When updating the active text track cues, the cuechange event is fired before setting (and unsetting) the active flag on the cues before firing the cuechange event.  Because of this, activeCues() may not return an accurate set of cues at the moment that the cuechange event is received.

Specifically, I propose that steps 15 and 16 be swapped under "When the current playback position of a media element changes ..." so that the active flag is first set and then the cuechange event is fired.
Comment 1 Simon Pieters 2012-04-11 17:59:56 UTC
The event isn't fired in step 15. It's *queued* in step 15. It isn't fired until the event queue spins, which happens after the whole algorithm has finished.
Comment 2 Anna Cavender 2012-04-11 18:41:49 UTC
Ah, thanks for the clarification.