Skip to content

Commit a0eafe1

Browse files
committed
support older swift vers
1 parent 7a8c7b4 commit a0eafe1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ios/LiveKitReactNativeModule.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ public class LivekitReactNativeModule: RCTEventEmitter {
2929
super.init()
3030
let config = RTCAudioSessionConfiguration()
3131
config.category = AVAudioSession.Category.playAndRecord.rawValue
32+
#if swift(>=6.2)
3233
config.categoryOptions = [.allowAirPlay, .allowBluetoothHFP, .allowBluetoothA2DP, .defaultToSpeaker]
34+
#else
35+
config.categoryOptions = [.allowAirPlay, .allowBluetooth, .allowBluetoothA2DP, .defaultToSpeaker]
36+
#endif
3337
config.mode = AVAudioSession.Mode.videoChat.rawValue
3438

3539
RTCAudioSessionConfiguration.setWebRTC(config)

0 commit comments

Comments
 (0)