Bluetooth device with speaker and mic not working

Description
I have an bluetooth device that is a speaker/mic combo and I have it connected to my iPhone. When I join a session, both the speaker and mic do not produce any sound nor does it pick up my voice. There is no audio coming the phone because I assume it is routing all audio to the bluetooth device. I have verified that the bluetooth device works as it works properly with the official Zoom app.

I have tested with the sample app provided with the VideoSDK and it also does not work. I have also included both bluetooth permissions “NSBluetoothPeripheralUsageDescription”, " NSBluetoothAlwaysUsageDescription" in the info.plist. I am curious what the purpose of these permissions are as I am never prompted with a dialog to allow these permissions from my device.

Without this bluetooth device connected, the phone’s speakers and mic work properly during a session.

Is there any additional configuration for audio required to get this to work?

Which iOS Video SDK version?
1.5.2

Smartphone (please complete the following information):

  • iPhone SE iOS15

Hi @curtis.forsta,

Video SDK as a SDK not care the audio output.
Just provide the session audio.
So, you can adjust the device audio output yourself by ‘AVAudioSession’.
Please be careful of the availability version of AV api usage.

- (BOOL)overrideOutputAudioPort:(AVAudioSessionPortOverride)portOverride
						  error:(NSError **)outError
	API_AVAILABLE(ios(6.0), watchos(2.0), tvos(9.0)) API_UNAVAILABLE(macOS);
extern OSStatus
AudioSessionSetProperty(AudioSessionPropertyID  inID,
						UInt32  inDataSize,
						const void  *inData)                    
API_DEPRECATED("no longer supported", ios(2.0, 7.0), macCatalyst(14.0, 14.0)) API_UNAVAILABLE(macos) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;

@curtis.forsta
It is working normally for me … what I do is to set the audio session as shown:

let avs = AVAudioSession.sharedInstance()
try? avs.setCategory(.playAndRecord, mode: .videoChat, options: .allowBluetooth)
try? avs.setActive(true)

Even if the docs are mentioning that mode: .videoChat should enable options: .allowBluetooth by default … I noticed in an early beta of iOS 16 that was not working so I’ve added it explicitly - that fixed the issue.

docs reference:

/** Only valid with kAudioSessionCategory_PlayAndRecord. Reduces the number of allowable audio
 routes to be only those that are appropriate for video chat applications. May engage appropriate
 system-supplied signal processing.  Has the side effect of setting
 AVAudioSessionCategoryOptionAllowBluetooth and AVAudioSessionCategoryOptionDefaultToSpeaker. */
@available(iOS 7.0, *)
public static let videoChat: AVAudioSession.Mode

Hi @rokgregoric ,
Thanks for your sharing.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.