W3C home > Mailing lists > Public > public-html-comments@w3.org > October 2009

Re: Video DOM API

From: Simon Pieters <simonp@opera.com>
Date: Wed, 14 Oct 2009 10:25:42 +0200
To: "Michael A. Puls II" <shadow2531@gmail.com>, public-html-comments@w3.org
Message-ID: <op.u1r604jiidj3kv@simon-pieterss-macbook.local>
On Wed, 14 Oct 2009 06:12:01 +0200, Michael A. Puls II  
<shadow2531@gmail.com> wrote:

> Gervase Markham <gerv@gerv.net> wrote:
>> On a <video> element (I haven't tried <audio>), if you change the src=
>> attribute to a new file, you have to call .load() before .play(),
>> otherwise it replays the old file. This lost me half an hour of 
>> debugging, and recently another person posted in the Mozilla newsgroups
>> having exactly the same problem.
> (Thanks for posting this)
> I am that other person and here's what I personally expect, fwiw:
> When setting src:
> 1. The current media should stop playing.
> 2. It should then be unloaded.
> 3. All states should be reset (including the play state).
> 4. The new media should start loading.
> 5. If autoplay is true, the new media should start playing. If not, it  
> only starts playing when you call play().
> My use-case is setting @src when clicking on a link (in an ordered list  
> of many links with click handlers) to an .ogg file.
> Having to call load() after setting src seems odd since I set src for a  
> reason, which is, to load it so I can play() it (or automatically play  
> it if I have autoplay set to true).
> For <object> when you change @type/@data, the object is pretty much  
> re-evaluated. I pretty much expect the same when setting src for <audio>  
> and <video>

What behavior do you expect when using <source>s instead of src?

Simon Pieters
Opera Software
Received on Wednesday, 14 October 2009 08:26:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:26:25 UTC