MPMoviePlayerController multitasking problem

后端 未结 3 1394
天涯浪人
天涯浪人 2021-01-06 06:22

I develop an application on iphone that uses MPMoviePlayerController to play audio file. When Application goes to background, if mpmovieplayer is playing, iphone continues t

3条回答
  •  醉梦人生
    2021-01-06 06:46

    I got it working by putting following two lines in Delegate file:

    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
    [[AVAudioSession sharedInstance] setActive: YES error: nil];
    

提交回复
热议问题