Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用一个AVPlayerItem来播放音乐流。当电话打进来时暂停流并在通话结束时恢复流的最佳方法是什么?
AVPlayerItem
我认为,您使用AVAudioPlayer.
AVAudioPlayer
所以AVAudioPlayer有方法 - 播放/暂停。
示例代码:
AVAudioPlayer *thePlayer; [thePlayer pause];