Resume Background Audio After Playing Sound With AVAudioPlayer

后端 未结 1 1879
失恋的感觉
失恋的感觉 2020-12-16 22:36

I am looking for a way to resume audio played by another application after my application plays its own sound with AVAudioPlayer. Right now, if I am listening to music and

相关标签:
1条回答
  • 2020-12-16 23:05

    You need to properly implement the AVAudioSession delegate methods. If you set the audio session to inactive, then the system will know you are done playing your sound and will resume any other audio sessions. Refer to the Audio Session Programming Guide, especially the setActive:error: method.

    0 讨论(0)
提交回复
热议问题