FilterCam icon indicating copy to clipboard operation
FilterCam copied to clipboard

Doesn't work with bluetooth headphones

Open shalins opened this issue 4 years ago • 1 comments

Doesn't record when you have bluetooth headphones (like airpods or beats) connected. Keeps printing out "Could not write audio data, recording aborted" from the didFailToRecord delegate method. Do you have any idea how I can include support for airpods or other bluetooth devices?

I am currently using this in an app and would love to use it in production, but I can't release it until this is fixed.

Thank you so much, any help is appreciated!

shalins avatar Sep 12 '19 15:09 shalins

Replace "try AVAudioSession.sharedInstance().setCategory(.playAndRecord, mode: .videoRecording, options: [.mixWithOthers, .defaultToSpeaker, .allowBluetooth, .allowAirPlay, .allowBluetoothA2DP])" this line with "try AVAudioSession.sharedInstance().setCategory(.playAndRecord, mode: .videoRecording, options: [])"

In Capture.swift file.

Dhavalbhimani007 avatar Aug 27 '20 06:08 Dhavalbhimani007