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

Re: Media elements may never load, may load the wrong source, etc

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 3 Aug 2009 11:08:09 +0000 (UTC)
To: Philip Jägenstedt <philipj@opera.com>
Cc: Simon Pieters <simonp@opera.com>, public-html <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0908031107360.6420@hixie.dreamhostps.com>
On Mon, 27 Jul 2009, Philip Jägenstedt wrote:
> On Sun, 26 Jul 2009 05:05:42 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > On Wed, 8 Jul 2009, Philip Jagenstedt wrote:
> > > 
> > > I'd prefer wording requiring the resource selection algorithm to 
> > > continue the "asynchronous" steps once the triggering script has 
> > > finished, similar to the old wording for the implicit load(): "the 
> > > user agent must implicitly invoke the load() method on the media 
> > > element as soon as all other scripts have finished executing". 
> > > There's no element of chance involved as far as I can see. If this 
> > > could help remove the different handling of src/source with two 
> > > different waiting states and ugliness, all the better.
> > 
> > "as soon as all other scripts have finished executing" is vague to the 
> > point of not being testable, sadly. But I've taken that idea and 
> > recast the entire algorithm in a way that gets you the same effect.
> > 
> > Basically now it waits until the current task has finished, and then 
> > looks to see if there's a src="" or <source>, and if there is, it 
> > switches to the appropriate mode and processes that src="" or <source> 
> > (asynchronously). For <source>, if that one fails, it waits until the 
> > next time the event loop has finished, and then tries the next one.
> 
> Thanks, this fixes the biggest issue (predictability) and better matches 
> the constraints of actual implementation.
> 
> Pretty much the only testable difference is that immediately after the 
> resource selection algorithm returns (via load/pause/play) networkState 
> is NETWORK_NO_SOURCE, whereas it was previously NETWORK_LOADING. This 
> has the side-effect that calling load() twice no longer fires an abort 
> event, as the condition is "If the media element's networkState is set 
> to NETWORK_LOADING or NETWORK_IDLE". This is all fine (and emptied still 
> fires).

Sounds right.


> Spelling: "then jump o the waiting step below"

Fixed, thanks.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 3 August 2009 11:08:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:43 GMT