[whatwg] <video> resource selection algorithm and NETWORK_NO_SOURCE

Silvia Pfeiffer silviapfeiffer1 at gmail.com
Tue Jul 27 16:10:07 PDT 2010


On Tue, Jul 27, 2010 at 6:17 PM, Philip Jägenstedt <philipj at opera.com>wrote:

> On Tue, 27 Jul 2010 00:01:26 +0200, Silvia Pfeiffer <
> silviapfeiffer1 at gmail.com> wrote:
>
>  On Tue, Jul 27, 2010 at 1:37 AM, Philip Jägenstedt <philipj at opera.com
>> >wrote:
>>
>>  On Mon, 26 Jul 2010 16:53:43 +0200, Silvia Pfeiffer <
>>> silviapfeiffer1 at gmail.com> wrote:
>>>
>>>  On Mon, Jul 26, 2010 at 11:25 PM, Philip Jägenstedt <philipj at opera.com
>>>
>>>> >wrote:
>>>>
>>>>   <video controls width="400px">
>>>>
>>>>>  </video>
>>>>>  <script type="text/javascript">
>>>>>    var video = document.querySelector("video");
>>>>>    var exts = ["mp4", "webm", "ogv"];
>>>>>    exts.forEach(function(ext) {
>>>>>      var source = document.createElement("source");
>>>>>      source.src = "HelloWorld."+ext;
>>>>>      source.type = "video/"+ext;
>>>>>      video.appendChild(source);
>>>>>    });
>>>>>    video.play();
>>>>>  </script>
>>>>>
>>>>>
>>>>>
>>>> Does this actually work in Opera now?
>>>>
>>>>
>>> Yes, when I have a HelloWorld.webm file available it starts playing. It
>>> also works in Firefox 4b1 and it should work in Chrome and Safari too
>>> unless
>>> they are buggy.
>>>
>>
>>
>>
>> Right, so it works if you create the <source> elements newly, but it still
>> doesn't work when you have previously created the <source> element just
>> with
>> an empty @src attribute (which I think is legal). Both of these work in
>> all
>> the other browsers, btw.
>>
>
> Yes, but it shouldn't work, and will stop working as soon as they implement
> the new resource selection algorithm. It is very important that authors
> don't depend on this bug, so I hope you'll change any code where you have
> accidentally done so.



I don't see a reason why it shouldn't work. What is the logic behind that?

I believe the spec should specify what authors should reasonably expect to
work. I think this is a case that should reasonably be expected to work. If
the spec doesn't currently allow it, but browsers have implemented it - so
it is possible to make it work - then I don't see a reason why the spec
shouldn't be adapted to work as implementations work and as users/authors
expect it to work.


Cheers,
Silvia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100728/d1301ad3/attachment.htm>


More information about the whatwg mailing list