ios – Expo AV Audio Recording with Youtube Video In Background Audio Stability Challenge – React Native


I’ve acquired a very distinctive use case that I have been scuffling with. I have been utilizing Audio expo-av and a react-native-youtube-iframe or webview to play a video and file audio on the similar time. You’re most likely all pondering… why would somebody want this, however I’ve a very distinctive use case. I’ve tried all of the completely different configurations of the expo audio participant (see commented traces 21, 22, 23 in expo snack).

If I take advantage of ‘InterruptionModeIOS.DoNotMix’, the movies play full quantity however then in the event you take note of the console.log, the audio stops capturing (durationMillis) get 0’ed out as quickly because the video performs.

If I take advantage of ‘InterruptionModeIOS.MixWithOthers’, the movies play and the microphone data however a few of them have the quantity lowered so low that you just can’t hear them in any respect.

You will discover that the expo-av ‘Video’ instance within the expo snack remains to be loud sufficient to listen to, however the random reddit video performed within the net view is pretty dim. These are just a few examples.

I am wanting to determine the way to steadiness these two higher (or by no means). I would love the microphone to operate fully regular, however set the video quantity manually w/ code (say 50% as an example). I do not need the audio participant to take management.

Basically I am searching for an ‘InterruptionMode.NonExistent’ in order that each the video performs in full quantity and the microphone data at full capability. I do perceive that this may result in some audio distortion, however I consider I can handle that with quantity settings, and so forth.

See expo-snack right here:
https://snack.expo.dev/@christophergabba/audio-balance-example

Thanks a lot upfront to your assist!

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles