Skip to content

In "time-marches-on", consider moving step 6 "queueing time-update event" to step 1. #13117

Open

Description

@rayguo17

What is the issue with the HTML Standard?

In the time march on steps, step 1-5, is about preparing cues for later process, and does not contain any early return condition in the spec, but in implementation, we can skip the steps, if the media element itself does not contain any track list. Step 6,:

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 media element task given the media element to fire an 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.)

which is independent of step 1-5, and should always be run regarless of the result of step 1-5. Changing the order would also not affect the outcome. And we can gain performance from more eager return condition check.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions