How to record audio and play music on webpage on mobile phone with javascript?

Viewed 309

I have a web app that records sound and plays music from an embed youtube player (youtube player api). For the audio, I continuously record by starting the recorder after it ends in an infinite loop (speech recognition class). But I want to also play the youtube video at the same time. On a desktop, they both don't interfere with each other (or at least with a headphone and mic). But on my android phone, everytime it starts recording, it pauses the video and then resumes it when the recording ends. Is there a way to make the video not pause?

1 Answers

You would have to break the stream into separate threads, and hope that you have enough power to handle them all.

I say "all" because while the your music stream may only be carried on one thread, the video from YouTube is still there.

In effect, you have to pretend to be the origininator and produce all of the a/v signals separately, then allow the mobile device to consume them (assuming that the signals are properly encoded to begin with).

Related