Skip to content

Commit

Permalink
feat: add .mixWithOthers when setting audio session's category (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
wamynobe committed Feb 27, 2024
1 parent 86cf1ce commit 5a95799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speech_to_text/ios/Classes/SwiftSpeechToTextPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public class SwiftSpeechToTextPlugin: NSObject, FlutterPlugin {
}
rememberedAudioCategory = self.audioSession.category
rememberedAudioCategoryOptions = self.audioSession.categoryOptions
try self.audioSession.setCategory(AVAudioSession.Category.playAndRecord, options: [.defaultToSpeaker,.allowBluetooth,.allowBluetoothA2DP])
try self.audioSession.setCategory(AVAudioSession.Category.playAndRecord, options: [.defaultToSpeaker,.allowBluetooth,.allowBluetoothA2DP,.mixWithOthers])
// try self.audioSession.setMode(AVAudioSession.Mode.measurement)
if ( sampleRate > 0 ) {
try self.audioSession.setPreferredSampleRate(Double(sampleRate))
Expand Down

0 comments on commit 5a95799

Please sign in to comment.