If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

html5 video-tag on-error event fails in some conditions

UNCONFIRMED
Unassigned

Status

()

Core
DOM: Core & HTML
UNCONFIRMED
5 years ago
5 years ago

People

(Reporter: GID, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

6.97 KB, application/octet-stream
Details
(Reporter)

Description

5 years ago
Created attachment 705338 [details]
ForFirefox.zip

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17

Steps to reproduce:

I have a webpage that accepts a URL of a video from a user.  Then it tries to create a video-tag with it.  The reason for this is that I want to know the height and width and duration of the video, and the only way to do that is to play the video for a few seconds.  I have an 'onerror' event in the video-tag, to catch situations such as 1) invalid URL  2) invalid media for that browser  3) invalid media-type specified.  However, the onerror event doesn't fire, at least not for the wrong URL.


Actual results:

I got a black box with an error message in it, which is good, but the onerror event did not fire.


Expected results:

The onError event should fire.  It works in Internet Explorer but not firefox.  In my case I've attached an 'alert' to it.  If you want to experiment, the page is at http://www.rateforsuccess.com/AddVideo700.aspx.  The source-files are also attached to this bug report.  Note that the page is an aspx page, and there is a possibility that 'onerror' would work OK with a plain HTML page.

Updated

5 years ago
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
GID, what are the actual steps to reproduce with the linked-to page?  What should be entered in the various fields to reproduce the problem you're seeing?
(Reporter)

Comment 2

5 years ago
Boris,
If you view www.rateforsuccess.com/addvideo700.aspx (or the source I attached)
The fields are:
"name for video" - any arbitrary name
"youtube or 'other video/audio' - select 'other video/audio'
"video or audio" - select "video"
Then the "media type" listbox should fill up with choices like "video/mp4, video/webm" etc.
Choose one from there.
The final field is "enter URL".  Here I deliberately enter a URL of a non-existent video, to see if I can get the 'onerror' event to fire.  It is not firing in firefox, in chrome, in safari.  It is firing in Internet Explorer.
(Reporter)

Comment 3

5 years ago
(In reply to Boris Zbarsky (:bz) from comment #1)
> GID, what are the actual steps to reproduce with the linked-to page?  What
> should be entered in the various fields to reproduce the problem you're
> seeing?

Please see comment #2,
You need to log in before you can comment on or make changes to this bug.