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)
Core
Audio/Video: Recording
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: jsmith, Assigned: jesup)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
cpearce
:
review+
khuey
:
review+
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Updated•11 years ago
|
Blocks: MediaRecording
Updated•11 years ago
|
Assignee: nobody → rlin
Comment 1•11 years ago
|
||
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)
Reporter | ||
Comment 2•11 years ago
|
||
(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)
Comment 3•11 years ago
|
||
Could you provide the file for us?
Which OS platform do you use? I think mp4 playback capacity isn't enabled on all platform.
Reporter | ||
Comment 4•11 years ago
|
||
(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
Comment 5•11 years ago
|
||
The desktop video recording already landed,
You can test and it would output to webm format.
Updated•11 years ago
|
Component: Video/Audio → Video/Audio: Recording
Reporter | ||
Updated•11 years ago
|
No longer blocks: MediaRecording
Updated•9 years ago
|
Rank: 15
Priority: -- → P1
Comment 8•9 years ago
|
||
I notice there's a patch in Bug 1220107 comment 3... abandoned?
Comment 9•9 years ago
|
||
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 | ||
Comment 10•9 years ago
|
||
MozReview-Commit-ID: LPIJMSgXwxf
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → rjesup
Status: NEW → ASSIGNED
Assignee | ||
Comment 11•9 years ago
|
||
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)
Assignee | ||
Comment 12•9 years ago
|
||
Updated skip-if's for the tests
Attachment #8727145 -
Flags: review?(cpearce)
Attachment #8727145 -
Flags: review?(bugs)
Assignee | ||
Updated•9 years ago
|
Attachment #8727089 -
Attachment is obsolete: true
Attachment #8727089 -
Flags: review?(bugs)
Attachment #8727089 -
Flags: feedback?(cpearce)
Comment 13•9 years ago
|
||
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+
Attachment #8727145 -
Flags: review?(bugs) → review+
Comment 14•9 years ago
|
||
Comment 15•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Comment 16•9 years ago
|
||
Comment 17•9 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•