Re: State transitions for media elements

On Sun, 2008-11-16 at 08:03 +0000, Ian Hickson wrote:
> On Mon, 20 Oct 2008, Philip Jgenstedt wrote:
> > > 
> > > As defined, the networkState will never be set to NETWORK_LOADED 
> > > before the metadata and first frame have been obtained explicitly. Is 
> > > that ok?
> > 
> > That's the order of things in the load() algorithm currently. It's not a 
> > huge problem, but would it hurt to simply merge step 14 and 15, so that 
> > NETWORK_LOADED can occur independently of HAVE_METADATA and 
> > HAVE_CURRENT_DATA?
> 
> My concern is that people will end up with subtle bugs if the order 
> between those two are left up to the UA, and we'll end up having to define 
> it anyway. How important is it to you that they be unrelated? (And is it 
> really that they are unrelated, or that the NETWORK_LOADED thing will 
> always fire before anything else if it's from cache?)

Yes, that's a good point that hadn't occured to me. The out-of-order
events is a small issue to compensate for compared to many other things,
so let's leave things as they are.

Going through HAVE_METADATA if the data is cached should be so fast that
the script could hardly be left waiting for NETWORK_LOADED for any
measurable amount of time after the information was actually there.

-- 
Philip Jägenstedt
Opera Software

Received on Sunday, 16 November 2008 16:15:59 UTC