Get MediaStreamTrack(audio) from Video

Viewed 2575

I want to record audio from video element alongside recording from canvas. I have

var stream = canvas.captureStream(29);

Now I am adding audioTrack of video to the stream.

var vStream = video.captureStream();
stream.addTrack(vStream.getAudioTracks()[0]);

But this slows down the performance with every video added. As captureStream() is very heavy on video and it also requires a flag to be switched on in Chrome. Is there a way of creating only audio MediaStream from video element without using captureStream().

1 Answers
Related