我对MPMusicPlayerController
的playbackState
属性有一些疑问。
iPhone:什么是MPMusicPlaybackStateInterrupted?它和MPMusicPlaybackStatePaused有什么区别
在文件中,MPMusicPlaybackStateInterrupted
和MPMusicPlaybackStatePaused
定义如下:
MPMusicPlaybackStateInterrupted
音乐播放器已被中断,如呼入电话。
MPMusicPlaybackStatePaused
音乐播放器暂停。
我无法检查传入的电话,因为我现在没有iPhone。
但是只有几次我在用iPod touch播放音乐时获得MPMusicPlaybackStateInterrupted
状态。
(我不知道为什么中断状态发生,除了只是播放音乐外没有来电和其他操作。
而在那段时间,MPMusicPlayerController
刚刚暂停播放音乐。
问题1
是什么MPMusicPlaybackStateInterrupted
和MPMusicPlaybackStatePaused
之间的区别?
问题2
什么时候MPMusicPlaybackStateInterrupted
发生除了来电?
问题3
当我得到MPMusicPlaybackStateInterrupted
我应该怎么办?
例如,当我得到MPMusicPlaybackStatePaused
或MPMusicPlaybackStateStopped
时,我应该更改播放/暂停按钮。