W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] Media element delaying load event

From: Chris Pearce <chris@pearce.org.nz>
Date: Wed, 04 Mar 2009 10:17:18 +1300
Message-ID: <49AD9E5E.4070603@pearce.org.nz>
The media element spec says:
> If a media element 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-element> 
> whose |networkState 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-networkstate>| 
> has the value |NETWORK_EMPTY 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#dom-media-network_empty>| 
> is inserted into a document 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#insert-an-element-into-a-document>, 
> the user agent must asynchronously invoke the media element 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#media-element>'s 
> resource selection algorithm 
> <http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#concept-media-load-algorithm>.
The resource selection algorithm then goes on to set the 
delaying-the-load-event flag to true. Depending on how the asynchronous 
invocation is implemented, the document could actually complete loading 
during the time after the insertion of a media element, but before the 
resource-selection algorithm sets the delaying-the-load-event flag is 
set to true. This means the load event could fire during that time, even 
though we intended to delay the load event.

Maybe we should set the delaying-the-load-event flag to true before we 
asynchronously call the resource-selection algorithm, and then then 
resource-selection algorithm can set the delaying-the-load-event flag to 
false if that decides it needs to wait for a src or source element child?

Chris Pearce.
Received on Tuesday, 3 March 2009 13:17:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:47 UTC