Closed Bug 1159678 Opened 11 years ago Closed 11 years ago

timeupdate event may be fired in the wrong order

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox40 --- affected

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file)

The spec specifies when to fire timeupdate, typically ever 15 to 250ms In W3C the spec "If the time was reached through the usual monotonic increase of the current playback position during normal playback, and if the user agent has not fired a timeupdate event at the element in the past 15 to 250ms and is not still running event handlers for such an event, then the user agent must queue a task to fire a simple event named timeupdate at the element. (In the other cases, such as explicit seeks, relevant events get fired as part of the overall process of changing the current playback position.)" It then defines specific events on when "timeupdate" event should be fired. http://dev.w3.org/html5/spec-preview/media-elements.html#paused-for-user-interaction defines what to do when pause() is called. This is the only time where timeupdate is associated and being fired before the "pause" event is being fired, with the exception of reaching the end of the media resource (where timeupdate / pause / ended will be fired and in that order. Expected: "timeupdate" event is fired when the JS explicitly pause() or we reach end of media. Actual: Whenever we enter the pause state, we fire the timeupdate event.
Blocks: 1148224
Fires timeupdate as per spec. Note that there is a non compliant behaviour when entering ended mode. the spec states: '4. Queue a task that, if the media element does not have a current media controller, and the media element has still ended playback, and the direction of playback is still forwards, and paused is false, changes paused to true and fires a simple event named pause at the media element.' ; when pause all the time, and synchronously and will always fire the pause event.
Attachment #8599259 - Flags: review?(karlt)
Assignee: nobody → jyavenard
Status: NEW → ASSIGNED
Comment on attachment 8599259 [details] [diff] [review] Don't always fire timeupdate event when entering paused I wonder whether the spec has changed. See http://www.w3.org/TR/2015/WD-html51-20150417/semantics.html#playing-the-media-resource:remove-an-element-from-a-document "When a media element is removed from a Document, the user agent must run the following steps:" "3. ⌛ Run the internal pause steps for the media element." The "internal pause steps" includes "3. Queue a task to fire a simple event named timeupdate at the element." HTMLMediaElement::UnbindFromTree() calls Pause(). I don't know what the specified behavior is for the mFragmentEnd code in FireTimeUpdate(). Should that correspond with http://www.w3.org/TR/2015/WD-html51-20150417/semantics.html#reaches-the-end ?
Attachment #8599259 - Flags: review?(karlt) → review-
I was using the 2012 spec.. That part has changed :(
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: