Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with bluetooth headphones #16

Open
shalins opened this issue Sep 12, 2019 · 1 comment
Open

Doesn't work with bluetooth headphones #16

shalins opened this issue Sep 12, 2019 · 1 comment

Comments

@shalins
Copy link

shalins commented Sep 12, 2019

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!

@Dhavalbhimani007
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants