如何使用 AVPlayer 立即开始下一首歌曲?我有从 iPod 库中选择的歌曲集MPMediaItemCollection
。
现在我如何使用 AVPlayer 来一一播放歌曲列表?
如何使用 AVPlayer 立即开始下一首歌曲?我有从 iPod 库中选择的歌曲集MPMediaItemCollection
。
现在我如何使用 AVPlayer 来一一播放歌曲列表?
要回答您的第一个问题,您可以使用 Notification 与
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(songFinished:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[yourAVPlayer currentItem]];
-(void)songFinished:(NSNotification *)notification
{
//Do your next stuff here;
}