Confusing error message when recording audio with unrecognized media type
Categories
(Core :: Audio/Video: Recording, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox90 | --- | fixed |
People
(Reporter: dominique.hazael-massieux, Assigned: karlt)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
Quoting from https://github.com/mdn/content/issues/3317#issue-836807601, the following code
navigator.mediaDevices.getUserMedia({audio: true}).then((stream) => {
var mediaRecorder = new MediaRecorder(stream, {mimeType: 'audio/mp4'});
mediaRecorder.ondataavailable = function(event) {
var blob = event.data;
if (blob && blob.size > 0) {
sendBlobToServer(blob);
}
};
mediaRecorder.start(5000);
})
Actual results:
It raises an error saying "Video cannot be recorded with audio/mp4 as it is an audio type" (from https://github.com/mozilla/gecko-dev/blob/be413c29deeb86be6cdac22445e0d0b035cb9e04/dom/media/MediaRecorder.cpp#L225)
Expected results:
The problem is actually that audio/mp4 is not accepted by Firefox as a coded for MediaRecorder, since replacing "audio/mp4" with "audio/webm" works.
The error message should be fixed in that situation to say that audio/mp4 is not available to record audio.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Recording' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
| Assignee | ||
Comment 2•4 years ago
|
||
Guessing this is during MediaRecorder construction and comes from IsTypeSupportedImpl(), which may be able to do a better job of merging the two TypeSupports.
| Assignee | ||
Comment 3•4 years ago
|
||
| Assignee | ||
Comment 4•4 years ago
|
||
Updated•4 years ago
|
| Assignee | ||
Comment 5•4 years ago
|
||
Depends on D113916
Comment 7•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0ba3efcd5023
https://hg.mozilla.org/mozilla-central/rev/3a418c38c3e4
Description
•