chrisguttandin / extendable-media-recorder

An extendable drop-in replacement for the native MediaRecorder.
MIT License
272 stars 13 forks source link

Duration is zero #636

Closed assada closed 3 years ago

assada commented 3 years ago
let stream = audioCtx.createMediaStreamDestination();
// ...play some audio to stream...
let recorder = new MediaRecorder(stream);
recorder.start();
recorder.addEventListener('dataavailable', function (e) {
    saveBlob(e.data, 'sample.wav');
});

Result: playable as normal media file but with 0 duration image

Its posible to get ogg/wav format instead webm?

assada commented 3 years ago

Haha! I forgot to add { mimeType: 'audio/wav' } option to media recorder! After that its works awesome!

sorry for the hasty issue...

chrisguttandin commented 3 years ago

No problem. I'm glad you got it working.