I want to use MediaRecorder
in order to record an existing mp3 file. I tried to pass an Audio
element as a source to MediaRecorder
, after calling captureStream() but it doesn't works.
new MediaRecorder(new Audio('./audio.mp3').captureStream(), {
audioBitsPerSecond: 16000
});
The error:
Uncaught DOMException: Failed to execute 'start' on 'MediaRecorder': The MediaRecorder cannot start becausethere are no audio or video tracks available.
How can I do that?