开发者

store multiple song in mpplayer that are being fetch from database having song persistent id

i am trying to store multiple song in mpplayer that are being fetch from database having song persistent id..but only single song is being added .here is what i am doing

MPMediaQuery *query = [MPMediaQuery songsQuery开发者_JAVA百科]; MPMediaPropertyPredicate *predicate = [MPMediaPropertyPredicate predicateWithValue:persistentId forProperty:MPMediaItemPropertyPersistentID]; [query addFilterPredicate:predicate]; NSArray *mediaItems = [query items]; //this array will consist of song with given persistentId. add it to collection and play it MPMediaItemCollection *col = [[MPMediaItemCollection alloc] initWithItems:mediaItems]; ///.... [col release];

thanks in advance

Regards devon smith


Are you sure that the PersistentID represents more that 1 track? I use a Persistent ID for each separate track in the album.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜