W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] video element not ready for prime time

From: Aryeh Gregor <ayg@aryeh.name>
Date: Thu, 12 Jan 2012 19:53:23 -0500
Message-ID: <CAKA+AxnqG=n-ZmOS2hc+h53+J6JopZa5CQ_EJcKYpJMJN3JKgA@mail.gmail.com>
On Thu, Jan 12, 2012 at 12:46 PM, Francis Boumphrey
<boumphreyfr at gmail.com> wrote:
> e.g. <video src='myvideo.mp4' controls>
> and my user agent does not support the format, all I get (in my versions of
> Opera and Firefox) is a blank screen. No message (as I would get with
> <embed>) and as far as I can see there is no way for me as an author to
> know that the video is not being played so I cannot code a 'write around'.

Boris answered the rest of your questions, but here's a way to detect errors:

data:text/html,<!doctype html>
<video src='nonexistent.mp4' controls onerror='alert("error")'></video>

If you use <source>, the error event is fired at the source element
instead and doesn't bubble (why not?), so you have to put onerror on
the source element instead.

I don't know why UAs don't provide their own error messages, though.
They provide error icons for failed image loads.
Received on Thursday, 12 January 2012 16:53:23 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:39 UTC