0
我使用AVAudioPlayer为iPad创建了一个简单的音乐应用程序。但问题是,当我按下home键时,它只能在背景中播放当前歌曲。应用程序无法在后台继续播放下一首歌曲。应用程序无法继续播放背景中的下一首歌曲
我使用AVAudioPlayer为iPad创建了一个简单的音乐应用程序。但问题是,当我按下home键时,它只能在背景中播放当前歌曲。应用程序无法在后台继续播放下一首歌曲。应用程序无法继续播放背景中的下一首歌曲
这对我的作品
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];