I'm playing iTunes music in the background. I started my app which plays "Video" using the following code:
NSString* videoPath = [[NSBundle mainBundle] pathForResource:@"video" ofType:@"m4v"];
if (player) {
[player release];
player = nil;
}
player = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:videoPath]];
[self presentModalViewController:player animated:YES];
I'm setting the audio session as follows:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance] setActive: YES error:nil];
When my video starts playing, iPod music playing in the background will be stopped. How can I resume the background music when my video completes?
This kind of option to continue must from ipod is not possible.