Skip to content

Commit

Permalink
Merge pull request #409 from AAkira/fix/restore-speaker-settings
Browse files Browse the repository at this point in the history
Restore allowBluetoothA2DP settings
  • Loading branch information
hiennguyen92 committed Jan 5, 2024
2 parents 2e3e9b8 + faee099 commit 1afaee1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/Classes/SwiftFlutterCallkitIncomingPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,11 @@ public class SwiftFlutterCallkitIncomingPlugin: NSObject, FlutterPlugin, CXProvi
if data?.configureAudioSession != false {
let session = AVAudioSession.sharedInstance()
do{
try session.setCategory(AVAudioSession.Category.playAndRecord, options: [.duckOthers,.allowBluetooth])
try session.setCategory(AVAudioSession.Category.playAndRecord, options: [
.allowBluetoothA2DP,
.duckOthers,
.allowBluetooth,
])
try session.setMode(self.getAudioSessionMode(data?.audioSessionMode))
try session.setActive(data?.audioSessionActive ?? true)
try session.setPreferredSampleRate(data?.audioSessionPreferredSampleRate ?? 44100.0)
Expand Down

0 comments on commit 1afaee1

Please sign in to comment.