Closed Bug 1376004 Opened 7 years ago Closed 7 years ago

Show proper error on UI when getting 404

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: bwu, Assigned: jwwang)

References

Details

Attachments

(2 files)

Per bug 1374510 comment 3, we should show the proper error message for 404.
Attached file test_404.html
This test case set 'src' to a resource that doesn't exist. Our video control shows "Video format or MIME type is not supported" while Chrome shows an empty UI. Our UI is confusing which looks we don't support the format instead of 404 file not found.
This should be a bug of video control.
Component: Audio/Video: Playback → Video/Audio Controls
Product: Core → Toolkit
See Also: → 1380232
Hi JW, If the error msg is "Video format or MIME type is not supported", that means we received "MEDIA_ERR_SRC_NOT_SUPPORTED" in the video controls. Do we have any additional information can help us indicate 404 error instead of a generic "MEDIA_ERR_SRC_NOT_SUPPORTED" error? otherwise we might need to change message to a more neutral wording for both cases.
Flags: needinfo?(jwwang)
The spec. doesn't talk about any specific error like 404. https://html.spec.whatwg.org/multipage/media.html#dom-mediaerror-media_err_src_not_supported "The media resource indicated by the src attribute or assigned media provider object was not suitable." Can we assume "not suitable" means "doesn't exist"? Or at least we can show an empty UI as Chrome does that is less misleading.
Flags: needinfo?(jwwang) → needinfo?(cpearce)
We cannot assume that "not suitable" means "doesn't exist". "not suitable" includes not having a codec that can decode the media for example. We could certainly feed back more details on the HTMLMediaElement.error.message field; we have the capability now to have that contain an arbitrary string, so we could set it to a known value which conveys 404 which the videocontrols could look out for.
Flags: needinfo?(cpearce)
Attachment #8886496 - Flags: review?(cpearce)
Comment on attachment 8886496 [details] Bug 1376004. P1 - include http response code in the error.message field so the UI has more details to display a proper error message. https://reviewboard.mozilla.org/r/157300/#review162730 Great, thanks.
Attachment #8886496 - Flags: review?(cpearce) → review+
Component: Video/Audio Controls → Audio/Video: Playback
Product: Toolkit → Core
Thanks!
Assignee: nobody → jwwang
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/974788a46fa3 P1 - include http response code in the error.message field so the UI has more details to display a proper error message. r=cpearce
Hi Ray, We include response code in the error.message field. You can now parse the string to get more details about the error. The format is: xxx: yyy. xxx is the http response code and yyy is a string that describes the code. E.g. 404: Not Found. I think 404 is the only code we care about for now.
(In reply to JW Wang [:jwwang] [:jw_wang] from comment #10) > Hi Ray, > We include response code in the error.message field. You can now parse the > string to get more details about the error. > > The format is: xxx: yyy. xxx is the http response code and yyy is a string > that describes the code. > E.g. 404: Not Found. > > I think 404 is the only code we care about for now. Sure, is bug 1380232 the right place to carry on the UI part?
No. Please open a new bug for UI changes.
Blocks: 1381375
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: