[whatwg] single step v.play();

Philip Jägenstedt philipj at opera.com
Mon Apr 20 00:37:15 PDT 2009


On Sat, 18 Apr 2009 10:21:44 +0200, Biju <bijumaillist at gmail.com> wrote:

> if a video element is already playing/loaded video from URL
> http://mysite.com/aaaaa.ogg
> and if we want play another file http://mysite.com/bbbbb.ogg
> we should do following JS code
>
>      v = $('v1');
>      v.src = "http://mysite.com/bbbbb.ogg";
>      v.load();
>      v.play();
>
> Why cant it be as simple as
>
>    v = $('v1');
>    v.play("http://mysite.com/bbbbb.ogg");
>
> Similarly for load
>    v = $('v1');
>    v.load("http://mysite.com/bbbbb.ogg");
>
> TIA

Since static markup uses the src attribute it needs to be supported via  
the DOM, so adding a parameter to load/play would only mean that there are  
several ways to do the same thing. I'm not sure replacing an already  
playing media resource is an important enough use case to make such a  
change to an already complex spec.

-- 
Philip Jägenstedt
Opera Software



More information about the whatwg mailing list