I am recording and sending audio via a website. For that purpose I use the MediaRecorder API.
There are no issues when using the site on desktop or Android devices and according to the MediaRecorder documentation, since a release in September 2020, iOS 14 should be supported as well.
The MediaRecorder is instantiated like this:
Код: Выделить всё
navigator.mediaDevices.getUserMedia({ audio: true, video: false })
.then((stream) => {
// Some validation and other processing. Omitted for brevity.
const mediaRecorder = new MediaRecorder(stream, { mimeType: 'audio/webm' });
// Using the mediaRecorder. Omitted for brevity.
});
Код: Выделить всё
NotSupportedError: mimeType is not supported
- (as shown in example above)
Код: Выделить всё
audio/webm
Код: Выделить всё
video/webm
- (also errors on desktop)
Код: Выделить всё
audio/ogg
- (also errors on desktop)
Код: Выделить всё
audio/ogg; codecs=opus
Am I getting something else entirely wrong?
Источник: https://stackoverflow.com/questions/678 ... -supported