[whatwg] <video> implicitly invoke the load() method

Ian Hickson ian at hixie.ch
Mon Aug 18 14:27:23 PDT 2008


On Mon, 18 Aug 2008, Philip Jägenstedt wrote:
>
> Now consider this markup
> 
> <video src="foo"></video>
> 
> with this script dynamically changing the sources
> 
> video = document.getElementById("video");
> video.removeAttribute("src"); // implicit delayed load
> source = document.createElement("source");
> source.src = "bar";
> source.media = "projection";
> video.appendChild(source); // implicit delayed load
> source = document.createElement("source");
> source.src = "baz";
> source.media = "screen";
> video.appendChild(source); // implicit delayed load
> video.play() // i want to play now!
> 
> play() will call load() before returning, so after this has finished 
> there shouldn't be any need to load() any more. However, there is no 
> less than 3 calls to load() waiting. Playback will begin, but will stop 
> as soon as the first of those delayed loads are invoked.

Fixed.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list