File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -378,6 +378,16 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
378
378
audioSource.volume = [volume doubleValue ];
379
379
}
380
380
result (nil );
381
+ } else if ([@" setMicrophoneMute" isEqualToString: call.method]) {
382
+ NSDictionary * argsMap = call.arguments ;
383
+ NSString * trackId = argsMap[@" trackId" ];
384
+ NSNumber * mute = argsMap[@" mute" ];
385
+ RTCMediaStreamTrack *track = self.localTracks [trackId];
386
+ if (track != nil && [track isKindOfClass: [RTCAudioTrack class ]]) {
387
+ RTCAudioTrack *audioTrack = (RTCAudioTrack *)track;
388
+ audioTrack.isEnabled = !mute.boolValue ;
389
+ }
390
+ result (nil );
381
391
}else if ([@" getLocalDescription" isEqualToString: call.method]) {
382
392
NSDictionary * argsMap = call.arguments ;
383
393
NSString * peerConnectionId = argsMap[@" peerConnectionId" ];
You can’t perform that action at this time.
0 commit comments