Skip to content

Commit

Permalink
fix(ios): Use explicit AVAudioSession.CategoryOptions
Browse files Browse the repository at this point in the history
fixes #450
  • Loading branch information
llfbandit committed Dec 23, 2024
1 parent f52d5fc commit d841f95
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions record_darwin/darwin/Classes/RecordConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand All @@ -103,4 +103,4 @@ struct IosConfig {
struct IosConfig {
init(map: [String: Any]) {}
}
#endif
#endif

0 comments on commit d841f95

Please sign in to comment.