[html5] HTMLMediaElement error state

Nathan Ziarek nziarek at gmail.com
Tue Jan 12 12:52:04 PST 2010


I hope I'm not being completely dense in looking at this.

I placed a Windows Media Video as the source of my video element and
opened it in Chrome / Safari / FireFox. My expectation was that the
video element would have an error state of 3 (if I tried to trick it
with a fake "type" attribute) or 4 and a networkState of 4.

When used as the "src" attribute of the <video> element, the error
state works as expected, while the networkState behaves differently
between FireFox and WebKit. Obviously these elements are young, so
differences are expected at this stage.

The concern is when the <video> element is used with one or more
<source> elements. If no <source> elements are playable, the error on
the <video> element is NULL. As this is the same in all browsers and
versions tested, and given the strict definition of HTMLMediaElement,
I'm wondering if this is expected behavior?

In my practical, real-world usage, it seems that if no suitable
<source> is found, the error code and the error event should bubble up
(I'm probably not using that terminology correctly) to the parent
<video> element. Without that, I do not see a way to determine if the
UA has determined there is nothing for it to display.

Am I just being dense?

Best,
Nathan



More information about the Help mailing list