- From: Philip Jägenstedt <philipj@opera.com>
- Date: Thu, 09 Apr 2009 17:27:37 +0200
- To: Philip Jägenstedt <philipj@opera.com>, public-html@w3.org
On Thu, 09 Apr 2009 10:49:33 +0200, Philip Jägenstedt <philipj@opera.com>
wrote:
> Some feedback on the big batch of changes to media elements made in
> March.
>
> 1. may never load
>
> Previously there were many conditions for when to implicitly invoke the
> load() method, e.g. when a media element was inserted into a document.
> This was all replaced by the resource selection algorithm, but as far as
> I can see that algorithm is only invoked by an explicit load() and in
> the Audio(src) constructor.
>
> In other words, there's nothing to cause e.g. <video autobuffer
> autoplay> to either begin buffering or playing unless a script
> explicitly calls load() or play() on it.
>
> For simplicity I would prefer that the resource selection algorithm be
> started for any media element, regardless of whether it has any
> src/source, is in a document or any other conditions. This makes all of
> the below equivalent:
>
> <audio src="foo">
>
> a=new Audio("foo");
>
> a=new Audio();
> a.src="foo";
>
> a=document.createElement("audio");
> a.src="foo";
>
> This behavior isn't incredibly important in itself, but it removes the
> need for special cases in the Audio constructor or elsewhere. Ignoring
> whether or not the media element is in a document when invoking the
> resource selection/fetch algorithm makes sense for preloading, etc so I
> don't think we should reintroduce that.
My apologies, a text searching bug in Opera caused me to miss the
following:
If a media element whose networkState has the value NETWORK_EMPTY is
inserted into a document, the user agent must invoke the media element's
resource selection algorithm.
In other words, my above complaint is invalid and I don't suggest any
changes in how the resource selection algorithm is invoked. The examples
given above will behave differently, but that's not a big problem as far
as I can see.
Hope I didn't overlook something with the other two points...
--
Philip Jägenstedt
Opera Software
Received on Thursday, 9 April 2009 15:27:36 UTC