8000 Use pre-compiled WebRTC for macOS. (#717) · shivanshtalwar0/flutter-webrtc@c47593c · GitHub
[go: up one dir, main page]

Skip to content

Commit c47593c

Browse files
authored
Use pre-compiled WebRTC for macOS. (flutter-webrtc#717)
* Use pre-compiled WebRTC for macOS. * update. * Update WebRTC-SDK(92.4515.10) for macOS. * fix: Fix addIceCandidate method Deprecated. * chore: dart format.
1 parent 7d1f18a commit c47593c

File tree

86 files changed

+13
-3968
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+13
-3968
lines changed

common/darwin/Classes/FlutterRTCPeerConnection.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,15 @@ -(void) peerConnectionAddICECandidate:(RTCIceCandidate*)candidate
164164
peerConnection:(RTCPeerConnection *)peerConnection
165165
result:(FlutterResult)result
166166
{
167-
[peerConnection addIceCandidate:candidate];
168-
result(nil);
169-
//NSLog(@"addICECandidateresult: %@", candidate);
167+
[peerConnection addIceCandidate:candidate completionHandler:^(NSError *_Nullable error){
168+
if (error) {
169+
result([FlutterError errorWithCode:@"AddIceCandidateFailed"
170+
message:[NSString stringWithFormat:@"Error %@", error.localizedDescription]
171+
details:nil]);
172+
} else {
173+
result(nil);
174+
}
175+
}];
170176
}
171177

172178
-(void) peerConnectionClose:(RTCPeerConnection *)peerConnection

common/darwin/Classes/FlutterWebRTCPlugin.m

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -751,11 +751,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
751751
details:nil]);
752752
return;
753753
}
754-
#if TARGET_OS_IPHONE
755754
[transcevier setDirection:[self stringToTransceiverDirection:direction] error:nil];
756-
#elif TARGET_OS_MAC
757-
[transcevier setDirection:[self stringToTransceiverDirection:direction]];
758-
#endif
759755
result(nil);
760756
} else if ([@"rtpTransceiverGetCurrentDirection" isEqualToString:call.method] || [@"rtpTransceiverGetDirection" isEqualToString:call.method]){
761757
NSDictionary* argsMap = call.arguments;
@@ -804,11 +800,7 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
804800
details:nil]);
805801
return;
806802
}
807-
#if TARGET_OS_IPHONE
808-
[transcevier stopInternal];
809-
#elif TARGET_OS_MAC
810-
[transcevier stop];
811-
#endif
803+
[transcevier stopInternal];
812804
result(nil);
813805
} else if ([@"rtpSenderSetParameters" isEqualToString:call.method]){
814806
NSDictionary* argsMap = call.arguments;

lib/src/native/rtc_peerconnection_impl.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ class RTCPeerConnectionNative extends RTCPeerConnection {
411411
Future<RTCDataChannel> createDataChannel(
412412
String label, RTCDataChannelInit dataChannelDict) async {
413413
try {
414-
final response = await WebRTC.invokeMethod('createDataChannel', <String, dynamic>{
414+
final response =
415+
await WebRTC.invokeMethod('createDataChannel', <String, dynamic>{
415416
'peerConnectionId': _peerConnectionId,
416417
'label': label,
417418
'dataChannelDict': dataChannelDict.toMap()

macos/WebRTC.framework/Headers/RTCAudioSource.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

macos/WebRTC.framework/Headers/RTCAudioTrack.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

macos/WebRTC.framework/Headers/RTCCVPixelBuffer.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

macos/WebRTC.framework/Headers/RTCCallbackLogger.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

macos/WebRTC.framework/Headers/RTCCameraVideoCapturer.h

Lines changed: 0 additions & 56 deletions
This file was deleted.

macos/WebRTC.framework/Headers/RTCCertificate.h

Lines changed: 0 additions & 44 deletions
This file was deleted.

macos/WebRTC.framework/Headers/RTCCodecSpecificInfo.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0