How to control playback state function on MPMusicPlayer
how to control 开发者_如何学运维playback state function in MPMusicPlayer....for example i want open
ipod playlist file when the no item available at the end of next track...
how it is possible on iphone.....please help me.....
Here's a bit of my code that does that:
MPMediaQuery *everything = [MPMediaQuery songsQuery];
[everything setGroupingType: MPMediaGroupingPlaylist];
self.playlists = [NSMutableArray arrayWithArray:[everything collections]];
....
NSArray *songsList = [[self.playlists objectAtIndex: currentPlayListIndex] items];
int nowIndex = [songsList indexOfObject:nowPlayingViewController.nowPlayingItem];
if(++nowIndex >= [songsList count])
nowIndex = 0;
if(![self playItem: [songsList objectAtIndex:nowIndex]])
精彩评论