Quantcast
Channel: MPMoviePlayer play on when application goes Background - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by user187676 for MPMoviePlayer play on when application goes Background

$
0
0

Try to activate the audio session before initializing the player, e.g. in the app launch delegate:

- (void)applicationDidFinishLaunching:(UIApplication *)application  NSError *error = nil;  [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&error];  [[AVAudioSession sharedInstance] setActive:YES error:&error];  // other init stuff ...}

PS: You need to be on the device for audio sessions to work, Simulator won't cut it.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>