Query on video element error handling

Hi All,

I am working on a embedded platform integrating WebKit. I am facing an
issue on how to propagate the platform video errors to HTML application.


This is a query regarding the <video> and <source> element and the error
attribute. This mail is discussing only the error case where the media file
points to a invalid location or network down. Following are the different
options to use video tag:

Option1: <video src="invalidfile"></video>

<video> element
'error<http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#error-0>'
attribute has a valid MediaError object, with which we can identify the
type of the error


Option2: <video><source src="invalidfile"></source></video>

<video> element 'error' attribute is null when error occurs

'error' event of <source> element is fired but with out MediaError object
After this error, <video> element's networkState is modified to NO_SOURCE
With this we are NOT able to identify what type of error it is (network or
no_source or decode)

With option2 behavior, eventhough <video> element resulted in error,
application does no know what kind of error it is.

In our platform, we need to know the type of the content (mp4 or mpeg or
hss). So we have to use <source> element only [<video>.canPlayType() does
not help us].


Could you please let me know whether this by design for any specific reason
(not to inform specific errors)?

Is there any other ways to get the MediaError with <source src="''
type="''> element?

Regards,
Saravanan KR

Received on Wednesday, 8 January 2014 09:33:17 UTC