Bug 68308 - <video> element not firing onerror events
Summary: <video> element not firing onerror events
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL: http://blog.offbeatmammal.com/samples...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 22:50 PDT by Offbeatmammal
Modified: 2020-05-04 07:48 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Offbeatmammal 2011-09-16 22:50:52 PDT
although most events are being reported correctly it appears that the Error event for the <video> element is not being fired (attached via both onError or using an addEventListener) and simply get bypassed.

The linked sample demonstrates a simple example (invalid URL for asset) but other events (eg network being disconnected, asset being protected before fully downloaded etc) are also ignored

Tested in WebKit nightly, Chrome (and ChromeOS) and Safari - all fail.
IE9/10 works per spec
Not tested in Firefox

Chromium issue logged - http://code.google.com/p/chromium/issues/detail?id=96871 but I'm guessing a fix here will roll upstream (will reference this bug from the Chromium link as well)
Comment 1 Arun Patole 2011-10-11 04:19:00 PDT
This doesn't look to be a bug. Error event on "video" is emitted only for source mentioned in "video" elements "src" attribute and not for the source mentioned in "source" elements "src" attribute. For error on "source" elements "src" attribute, Error event is emitted on that particular "source" element.

spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#concept-media-load-algorithm

In the example mentioned in this bug(url), if you try adding src="http://media.w3.org/2010/05/sintel/trailer-notfound.mp4" in <video>, you will get errors on video element.
Comment 2 Ami Fischman 2011-11-16 09:48:01 PST
Although #1 is correct in that onerror fires for the <source> element in this case, ISTM there's no way to get the error code in this case.  <source> doesn't have an error object and the containing <video> element's .error is not set.  Bug/shortcoming in the spec?