-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Closed
Labels
Content:MediaMedia docsMedia docseffort: mediumThis task is a medium effort.This task is a medium effort.help wantedIf you know something about this topic, we would love your help!If you know something about this topic, we would love your help!p2Minor issue with low priority, can be fixed later.Minor issue with low priority, can be fixed later.
Description
What page(s) did you find the problem on?
No page in particular, I just feel like the documentation is extremely confusing on how to record audio only streams. See example below.
Specific page section or heading?
N/A
What is the problem?
I expected to be able to record audio blobs following a call to navigator.mediaDevices.getUserMedia({audio: true, video: false}) but it seems like only video mime types are available.
What did you expect to see?
Expected to be able to, for example, record audio/mp4 blobs.
Did you test this? If so, how?
The following block of code throws the error: Uncaught (in promise) DOMException: MediaRecorder constructor: Video cannot be recorded with audio/mp4 as it is an audio type
This is not a helpful error message at all because I am not trying to record any video.
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);
})
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Content:MediaMedia docsMedia docseffort: mediumThis task is a medium effort.This task is a medium effort.help wantedIf you know something about this topic, we would love your help!If you know something about this topic, we would love your help!p2Minor issue with low priority, can be fixed later.Minor issue with low priority, can be fixed later.