Skip to content

HTMLMediaElement's load() should return a Promise #554

Open

Description

@foolip

As proposed by @cpearce in #505 (comment)

The tricky part is when the promise should be resolved. The spec has a number of steps under "Once enough of the media data has been fetched to determine the duration of the media resource, its dimensions, and other metadata" where it would make sense. At the end it says "Once the readyState attribute reaches HAVE_CURRENT_DATA, after the loadeddata event has been fired, set the element's delaying-the-load-event flag to false. This stops delaying the load event." Also resolving the load() promise at this point would probably work.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions