[whatwg] Media element delaying load event

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?

Thanks,
Chris Pearce.

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