开发者

How to control playback state function on MPMusicPlayer

开发者 https://www.devze.com 2023-01-28 03:35 出处:网络
how to control 开发者_如何学运维playback state function in MPMusicPlayer....for example i want open

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]])
0

精彩评论

暂无评论...
验证码 换一张
取 消