开发者

MPMoviePlayerViewController and background audio

开发者 https://www.devze.com 2023-01-24 20:02 出处:网络
I am having trouble playing audio inside a MPMoviePlayerViewCon开发者_C百科troller in the background. I can point it to mp3\'s just fine and listen to the audio, but when I go into the background, I d

I am having trouble playing audio inside a MPMoviePlayerViewCon开发者_C百科troller in the background. I can point it to mp3's just fine and listen to the audio, but when I go into the background, I don't hear audio anymore.

I set the plist entry to keep playing audio and set the audio session toAVAudioSessionCategoryPlayback. When I hit the home button, wait a few seconds, and go back to the app, the audio advanced as if it had kept playing, I just can't hear a thing when the app is in the background.

Any idea what causes this?

Thanks!


I just tested in the simulator, and it fails there. It does work fine on the device though. Must be a bug in the simulator.

0

精彩评论

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