Skip to content

Commit d841f95

Browse files
committed
fix(ios): Use explicit AVAudioSession.CategoryOptions
fixes #450
1 parent f52d5fc commit d841f95

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

record_darwin/darwin/Classes/RecordConfig.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@ struct IosConfig {
7777
let options: [AVAudioSession.CategoryOptions]? = comps?.split(separator: ",").compactMap {
7878
switch $0 {
7979
case "mixWithOthers":
80-
.mixWithOthers
80+
AVAudioSession.CategoryOptions.mixWithOthers
8181
case "duckOthers":
82-
.duckOthers
82+
AVAudioSession.CategoryOptions.duckOthers
8383
case "allowBluetooth":
84-
.allowBluetooth
84+
AVAudioSession.CategoryOptions.allowBluetooth
8585
case "defaultToSpeaker":
86-
.defaultToSpeaker
86+
AVAudioSession.CategoryOptions.defaultToSpeaker
8787
case "interruptSpokenAudioAndMixWithOthers":
88-
.interruptSpokenAudioAndMixWithOthers
88+
AVAudioSession.CategoryOptions.interruptSpokenAudioAndMixWithOthers
8989
case "allowBluetoothA2DP":
90-
.allowBluetoothA2DP
90+
AVAudioSession.CategoryOptions.allowBluetoothA2DP
9191
case "allowAirPlay":
92-
.allowAirPlay
92+
AVAudioSession.CategoryOptions.allowAirPlay
9393
case "overrideMutedMicrophoneInterruption":
94-
if #available(iOS 14.5, *) { .overrideMutedMicrophoneInterruption } else { nil }
94+
if #available(iOS 14.5, *) { AVAudioSession.CategoryOptions.overrideMutedMicrophoneInterruption } else { nil }
9595
default: nil
9696
}
9797
}
@@ -103,4 +103,4 @@ struct IosConfig {
103103
struct IosConfig {
104104
init(map: [String: Any]) {}
105105
}
106-
#endif
106+
#endif

0 commit comments

Comments
 (0)