RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
235 stars 28 forks source link

iOS error with AVAudioSession #501

Closed Gabriel-CVR closed 3 years ago

Gabriel-CVR commented 3 years ago

Hey there!

I'm going to copy what I wrote on NatCorder forum post at Unity:

I have a problem with simultaneously playing a video (through AVProVideo plugin), and recording the screen + microphone audio through NatCorder.

The app will then throw:

AVAudioSession.mm:997:-[AVAudioSession setActive:withOptions:error:]: Deactivating an audio session that has running I/O. All I/O should be stopped or paused prior to deactivating the audio session.

And stop playing the video.

It will not crash, I can exit and enter the video screen again, but same thing will happen. I've googled the problem but it's related to native code so I'm not sure if it's fixable from my end.

This only happens on iOS.

NatCorder guys told me to contact you insted, because:

NatCorder does not interfere with the audio session (or microphone) in any way. You'll probably want to report this to the AVPro developers.

Do you have any ideas what might be the cause?

Gabriel-CVR commented 3 years ago

Allright, so I spend some time doing more research here and found this topic

https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/164

I can confirm that checking "prepare for recording" fixed my issue.