File tree 1 file changed +9
-0
lines changed 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,15 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
388
388
audioTrack.isEnabled = !mute.boolValue ;
389
389
}
390
390
result (nil );
391
+ } else if ([@" enableSpeakerphone" isEqualToString: call.method]) {
392
+ NSDictionary * argsMap = call.arguments ;
393
+ NSNumber * enable = argsMap[@" enable" ];
394
+ AVAudioSession *audioSession = [AVAudioSession sharedInstance ];
395
+ [audioSession setCategory: AVAudioSessionCategoryPlayAndRecord
396
+ withOptions: enable.boolValue ? AVAudioSessionCategoryOptionDefaultToSpeaker : 0
397
+ error: nil ];
398
+ [audioSession setActive: YES error: nil ];
399
+ result (nil );
391
400
}else if ([@" getLocalDescription" isEqualToString: call.method]) {
392
401
NSDictionary * argsMap = call.arguments ;
393
402
NSString * peerConnectionId = argsMap[@" peerConnectionId" ];
You can’t perform that action at this time.
0 commit comments