From d841f9530459b2c68e424619f0c471bfb9ef6150 Mon Sep 17 00:00:00 2001 From: llfbandit Date: Mon, 23 Dec 2024 16:01:22 +0100 Subject: [PATCH] fix(ios): Use explicit AVAudioSession.CategoryOptions fixes #450 --- .../darwin/Classes/RecordConfig.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/record_darwin/darwin/Classes/RecordConfig.swift b/record_darwin/darwin/Classes/RecordConfig.swift index 646d6cde..3d70a7a9 100644 --- a/record_darwin/darwin/Classes/RecordConfig.swift +++ b/record_darwin/darwin/Classes/RecordConfig.swift @@ -77,21 +77,21 @@ struct IosConfig { let options: [AVAudioSession.CategoryOptions]? = comps?.split(separator: ",").compactMap { switch $0 { case "mixWithOthers": - .mixWithOthers + AVAudioSession.CategoryOptions.mixWithOthers case "duckOthers": - .duckOthers + AVAudioSession.CategoryOptions.duckOthers case "allowBluetooth": - .allowBluetooth + AVAudioSession.CategoryOptions.allowBluetooth case "defaultToSpeaker": - .defaultToSpeaker + AVAudioSession.CategoryOptions.defaultToSpeaker case "interruptSpokenAudioAndMixWithOthers": - .interruptSpokenAudioAndMixWithOthers + AVAudioSession.CategoryOptions.interruptSpokenAudioAndMixWithOthers case "allowBluetoothA2DP": - .allowBluetoothA2DP + AVAudioSession.CategoryOptions.allowBluetoothA2DP case "allowAirPlay": - .allowAirPlay + AVAudioSession.CategoryOptions.allowAirPlay case "overrideMutedMicrophoneInterruption": - if #available(iOS 14.5, *) { .overrideMutedMicrophoneInterruption } else { nil } + if #available(iOS 14.5, *) { AVAudioSession.CategoryOptions.overrideMutedMicrophoneInterruption } else { nil } default: nil } } @@ -103,4 +103,4 @@ struct IosConfig { struct IosConfig { init(map: [String: Any]) {} } -#endif \ No newline at end of file +#endif