SCRecorder
SCRecorder copied to clipboard
SCRecorder do not record while bluetooth headset is connected
The App hangs on calling line "dispatch_sync(_sessionQueue, block);" in "- (void)record" method of SCRecorder while bluetooth headset is connected.
Wherein the method "- (BOOL)application:didFinishLaunchingWithOptions:" has the next code below:
AVAudioSession *session1 = [AVAudioSession sharedInstance]; [session1 setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionMixWithOthers|AVAudioSessionCategoryOptionDefaultToSpeaker|AVAudioSessionCategoryOptionAllowBluetooth error:nil]; [session1 setActive:YES error:nil]; [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
What could you suggest to resolve this issue?
i have same issue. :(
Upd.
+1. Has Anyone figured out how to get Bluetooth working with SCRecorder?
Fixed this issue by removing everything except:
.mixWithOthers AND .defaultSpeaker.
For some reason, adding .allowBluetooth makes it NOT work with Bluetooth. Final config:
try AVAudioSession.sharedInstance().setCategory(.playAndRecord, mode: .videoRecording, options: [.mixWithOthers, .defaultToSpeaker])