Bug 68308
Summary: | <video> element not firing onerror events | ||
---|---|---|---|
Product: | WebKit | Reporter: | Offbeatmammal <offbeatmammal> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | UNCONFIRMED | ||
Severity: | Normal | CC: | ap, arun.patole, eric.carlson, offbeatmammal |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
URL: | http://blog.offbeatmammal.com/samples/jserr/videoOnError.html |
Offbeatmammal
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)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Arun Patole
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.
Ami Fischman
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?