Re: Video DOM API

On Sat, 10 Oct 2009 12:02:42 +0200, Gervase Markham <gerv@gerv.net> wrote:

> On 10/10/09 10:44, Simon Pieters wrote:
>> I think it is unreasonable, because pause() and play() are intended to
>> be used for author-supplied scripted controls, and the user should be
>> able to pause and play the first video without that causing the new
>> video to be loaded.
>
> But then why has the app author set the src= element if they don't want  
> the new file to be the one that element is playing?
>
> Here's the bottom line: I and at least one other person have been  
> confused by this API, because we expect
>
> element.src = "file";
> element.play();
>
> to play "file". I don't think that's unreasonable, I think it's sensible  
> and intuitive. My feedback on the spec is: make that work. I don't care  
> how :-)

Making setting src implicitly call load() irrespective of the current  
state would have desired effect and as far as I can see there's little  
reason to think someone would set src without actually intending to use  
the resource. There would be nothing special about play(), doing nothing  
at all after setting src would also load the new resource, although it  
would initially be paused.

While this would probably be more intuitive, I don't quite see the use  
case for it if pre-buffering is important.

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Saturday, 10 October 2009 15:34:42 UTC