2

I am recording video in my application with use of this code.Video recording is working fine no issues with that. My problem is when i am playing music in default music player and trying to record video in my app music player audio play getting stop. I don't want to stop music player audio. All popular application doing this.

I updated following code in PBJVision.m in this method - (id)init

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord
withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil];

NSError *error;

[[AVAudioSession sharedInstance] setPreferredInputNumberOfChannels:2 error:&error];
if(error)
{
    NSLog(@"error doing outputaudioportoverride - %@", [error localizedDescription]);
}

it is working for ios 7 but not working for ios 8.

Anyone having soultion for this problem ?

Viral Narshana
  • 1,855
  • 2
  • 21
  • 45
  • Hey Viral check below link. It worked perfectly for ios8. http://stackoverflow.com/questions/21869802/avcapturesession-and-background-audio-ios-7 – Shreya Jul 09 '15 at 10:58

0 Answers0