开发者

app could not be continue with next song in background

开发者 https://www.devze.com 2023-03-31 13:06 出处:网络
I\'ve created a simple music App for iPad using AVAudioPlayer. But the problem is that when I pressed home button it only plays current song in background. The application could not continue with 开发

I've created a simple music App for iPad using AVAudioPlayer. But the problem is that when I pressed home button it only plays current song in background. The application could not continue with 开发者_如何学编程next song in background.


this works for me

    here musicPlayer is MPMusicPlayerController 

    [self setMusicPlayer: [MPMusicPlayerController applicationMusicPlayer]];

    // By default, an application music player takes on the shuffle and repeat modes

    //      of the built-in iPod app. Here they are both turned off.

    [musicPlayer setShuffleMode: MPMusicShuffleModeOff];

    [musicPlayer setRepeatMode: MPMusicRepeatModeNone];
0

精彩评论

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