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

Bluetooth Headset Support #224

Open
Wimansha-Wibble opened this issue Jul 21, 2020 · 2 comments
Open

Bluetooth Headset Support #224

Wimansha-Wibble opened this issue Jul 21, 2020 · 2 comments

Comments

@Wimansha-Wibble
Copy link

I configured AVAudioSession to allow bluetooth audio input output. Now an error comes after recording.

@piemonte
Copy link
Contributor

piemonte commented Jul 23, 2020

hey @Wimansha-Wibble thanks for the project interest. I believe you just need to change your app's AVAudioSession to adopt the bluetooth options, maybe NL needs that change as well. would have to look into it sometime. roughly like this:

try AVAudioSession.sharedInstance().setCategory(.record, mode: .default, options: [.mixWithOthers,
                                                                                   .allowBluetooth,
                                                                                   .allowBluetoothA2DP])

@Wimansha-Wibble
Copy link
Author

Hi @piemonte , Thanks a lot for the reply.

I started by adding this. But it was not enough. So I checked the code to find a solution. Then found two more required changes.

  1. NextLevel.shared.automaticallyConfiguresApplicationAudioSession = false when setting up in CameraViewController.swift
  2. Remove bitRate value for AVEncoderBitRateKey in NextLevelConfiguration (Without this I got an error saying "Not enough video captured!" when saving the video.)

I'll send a pull with these changes.

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

No branches or pull requests

2 participants