Open Tejas-narola opened 8 years ago
see my answer here: https://github.com/rFlex/SCRecorder/issues/331 Two key parts. One is timing. I was going to play and record on view did appear of my camera and going to ambient on view will disappear. Second key part seems to be setting the audio session active=NO before making a category change and active=YES after the category change
@Tejas-narola I come to the same issue. When opening the SCRecoder view, will stop the background music automatically. But when close SCRecorder view, the background music can't be resumed. Have you fixed this problem? I tried reset the AVAudioSession after SCRecoder closed, but it's not work for me.
AVAudioSession` *audioSession=[AVAudioSession sharedInstance]; if (audioSession) { [audioSession setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil]; }
@aprato I tried your code too, before SCRecorder setup. it can't resume the background music too after SCRecorder disappear.
I want continue playing background music as camera initialised and after capturing photo or recording video, i come back to camera screen , the background music should be resume .
I have set automaticallyConfiguresApplicationAudioSession = NO in - (id)init method of SCRecorder.m file for playing background music when camera initialised but after capturing image or recording video ,i again came back to camera screen at that background music is not resuming.
I have set category in appDelegate.m file.
`- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
`
please help me to handle audio session manually.