Skip to content

Establish a well-defined way of identifying asynchronously initialized media elements #83

Answered by heff
cjpillsbury asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think we need an addition and here's what I think we can use to do that:

  • play() already uses an async promise
  • <video> already errors if you try to seek before loadedmetadata/readyState:HAVE_METADATA. Even if the underlying iframe isn't loaded, the custom media element can still return readyState:0 HAVE_NOTHING
  • Otherwise media playback functions have async event responses, so the function calls can be queued until the underlying iframe is loaded

So basically while the underlying player iframe may not be loaded, the custom element can still be providing default states that help know what's possible, or queueing calls to the media functions for when the iframe is ready.

Am I missin…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@cjpillsbury
Comment options

@heff
Comment options

Answer selected by cjpillsbury
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants