应用程序无法继续在后台播放下一首歌曲

Posted

技术标签:

【中文标题】应用程序无法继续在后台播放下一首歌曲【英文标题】:app could not be continue with next song in background 【发布时间】:2011-08-30 10:04:36 【问题描述】:

我使用 AVAudioPlayer 为 iPad 创建了一个简单的音乐应用程序。但问题是当我按下主页按钮时,它只在后台播放当前歌曲。应用程序无法在后台播放下一首歌曲。

【问题讨论】:

【参考方案1】:

这对我有用

    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];

【讨论】:

以上是关于应用程序无法继续在后台播放下一首歌曲的主要内容,如果未能解决你的问题,请参考以下文章