Closed Bug 963238 Opened 11 years ago Closed 9 years ago

Media Recording - If the file's mime type cannot be recorded on the target platform, then fire an onerror callback indicating that the mime type is not supported

Categories

(Core :: Audio/Video: Recording, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: jsmith, Assigned: jesup)

References

Details

Attachments

(1 file, 1 obsolete file)

If I try to record a media file in which the mime type isn't supported on the platform, then I should get an error fired to me in an onerror callback on the media recorder object.
Assignee: nobody → rlin
Do you mean this file isn't playable and media recorder should fire onerror event? In this case, media stream isn't vaild and media recorder object would reject to accept this one and throw invalid exception.
Flags: needinfo?(jsmith)
(In reply to Randy Lin [:rlin] from comment #1) > Do you mean this file isn't playable and media recorder should fire onerror > event? > In this case, media stream isn't vaild and media recorder object would > reject to accept this one and throw invalid exception. The file itself could be playable in the browser actually - the case I hit this problem was with a mp4 file in Desktop Firefox. Throwing an exception here though sounds fine to me though.
Flags: needinfo?(jsmith)
Could you provide the file for us? Which OS platform do you use? I think mp4 playback capacity isn't enabled on all platform.
(In reply to Randy Lin [:rlin] from comment #3) > Could you provide the file for us? > Which OS platform do you use? I think mp4 playback capacity isn't enabled on > all platform. One way to test this on Desktop Firefox Nightly: 1. Go to http://mozilla.github.io/qa-testcase-data/webapi/mediarecorder/ 2. Under "Setup Stream for Media Recorder by File" - set the following parameters: 2a. File: gizmo.mp4 2b. Media Type: video 2c. Mime Type: video/mp4 3. Select play on each input & output video elements 4. Select start recording
The desktop video recording already landed, You can test and it would output to webm format.
Component: Video/Audio → Video/Audio: Recording
No longer blocks: MediaRecording
Free it if someone want it.
Assignee: rlin → nobody
Rank: 15
Priority: -- → P1
I notice there's a patch in Bug 1220107 comment 3... abandoned?
I noticed our implementation was different from up-to-date spec, like the second argument of MediaRecorder ctor. https://w3c.github.io/mediacapture-record/MediaRecorder.html#constructors So I have no idea if my patch is ready to review, or we should first implement the second arg of ctor by spec.
Assignee: nobody → rjesup
Status: NEW → ASSIGNED
Comment on attachment 8727089 [details] [diff] [review] Support isTypeSupported() in MediaRecorder, and throw on invalid mimetypes at construction f?cpearce, almost ready for review; running a Try and also will need to check we have the right skip-if's for webm and mp4 checks webidl change is a 1-liner grabbed from the spec http://w3c.github.io/mediacapture-record/MediaRecorder.html Section 3
Attachment #8727089 - Flags: review?(bugs)
Attachment #8727089 - Flags: feedback?(cpearce)
Updated skip-if's for the tests
Attachment #8727145 - Flags: review?(cpearce)
Attachment #8727145 - Flags: review?(bugs)
Attachment #8727089 - Attachment is obsolete: true
Attachment #8727089 - Flags: review?(bugs)
Attachment #8727089 - Flags: feedback?(cpearce)
Comment on attachment 8727145 [details] [diff] [review] Support isTypeSupported() in MediaRecorder, and throw on invalid mimetypes at construction f?cpearce, Review of attachment 8727145 [details] [diff] [review]: ----------------------------------------------------------------- Would be happy for you to not add the Gonk stuff, since we don't need to bother supporting it anymore. ::: dom/media/MediaRecorder.cpp @@ +1116,5 @@ > + codeclist = gWebMVideoEncoderCodecs; > + result = true; > + } > +#endif > +#ifdef MOZ_OMX_ENCODER MOZ_OMX_ENCODER is only defined on gonk right? We don't need to maintain Gonk anymore. @@ +1129,5 @@ > + } > +#endif > + > + // codecs don't matter if we don't support the container > + if (!result) { |result| is only false iff codeclist==nullptr, so you could remove |result| and instead go: if (!codeclist) { return false; } Then you'd also not need to check if codecList is non-null immediately below here. @@ +1140,5 @@ > + rv = parser.GetParameter("codecs", codecs); > + > + // See http://www.rfc-editor.org/rfc/rfc4281.txt for the description > + // of the 'codecs' parameter > + nsCharSeparatedTokenizer tokenizer(codecs, ','); You can use ParseCodecsString() from dom/media/VideoUtils.h to make this simpler. ::: dom/media/test/mochitest.ini @@ +731,5 @@ > tags=msg capturestream > [test_mediarecorder_unsupported_src.html] > tags=msg > +[test_mediarecorder_webm_support.html] > +skip-if = os == 'android' || arch == 'arm' || arch == 'arm64' || arch == 'arm' You have (arch == 'arm') twice in this conditional.
Attachment #8727145 - Flags: review?(cpearce) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: