You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the MediaRecorder API to record audio in the audio/mpeg format. Upon checking the mimetype using file-type, I get either video/mp4 on Safari and video/webm on all other browsers.
As I do not support video uploads, it is an easy workaround. But a workaround nonetheless.
Is this something others can reproduce as well?
The text was updated successfully, but these errors were encountered:
The Magic-Bytes.js demo does come up with audio/webm for these files, but instead of video/webm, it seems to be struggling to distinguish it from Matroska instead.
This is the code I used to record it:
navigator.mediaDevices.getUserMedia({ audio: true }).then((stream) => {
let chunks = [];
mediaRecorder.value = new MediaRecorder(stream, {
mimeType: 'audio/webm',
});
mediaRecorder.value.addEventListener('dataavailable', (event) => chunks.push(event.data));
mediaRecorder.value.addEventListener('stop', () => {
const blob = new Blob(chunks, { type: 'audio/webm' });
const audioUrl = URL.createObjectURL(blob);
console.log(audioUrl); // save or set as player src
chunks = [];
});
});
Very similar to this issue #488.
I am using the MediaRecorder API to record audio in the
audio/mpeg
format. Upon checking the mimetype usingfile-type
, I get eithervideo/mp4
on Safari andvideo/webm
on all other browsers.As I do not support video uploads, it is an easy workaround. But a workaround nonetheless.
Is this something others can reproduce as well?
The text was updated successfully, but these errors were encountered: