SCRecorder icon indicating copy to clipboard operation
SCRecorder copied to clipboard

SCRecorder do not record while bluetooth headset is connected

Open JoniStep opened this issue 8 years ago • 4 comments

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?

JoniStep avatar Aug 04 '16 11:08 JoniStep

i have same issue. :(

vfa-nhannv avatar Feb 07 '17 08:02 vfa-nhannv

Upd.

d-litvinenko avatar Dec 12 '17 09:12 d-litvinenko

+1. Has Anyone figured out how to get Bluetooth working with SCRecorder?

jlindberg-oss avatar Dec 20 '17 16:12 jlindberg-oss

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])

monurcevik avatar Aug 09 '20 23:08 monurcevik