8000 chore: bump version. · dontcryme/flutter-webrtc@05d7c3f · GitHub
[go: up one dir, main page]

Skip to content

Commit 05d7c3f

Browse files
committed
chore: bump version.
1 parent 8829a40 commit 05d7c3f

File tree

7 files changed

+48
-4
lines changed

7 files changed

+48
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33
--------------------------------------------
4+
[0.8.2] - 2022-02-08
5+
6+
* [Android/iOS/macOS/Web] Add restartIce.
7+
48
[0.8.1] - 2021-12-29
59

610
* [Android/iOS] Bump webrtc-sdk version to 93.4577.01.

android/src/main/java/com/cloudwebrtc/webrtc/MethodCallHandlerImpl.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,12 @@ public void onMethodCall(MethodCall call, @NonNull Result notSafeResult) {
375375
result.success(null);
376376
break;
377377
}
378+
case "restartIce": {
379+
String peerConnectionId = call.argument("peerConnectionId");
380+
restartIce(peerConnectionId);
381+
result.success(null);
382+
break;
383+
}
378384
case "peerConnectionClose": {
379385
String peerConnectionId = call.argument("peerConnectionId");
380386
peerConnectionClose(peerConnectionId);
@@ -1458,6 +1464,15 @@ public void peerConnectionGetStats(String trackId, String id, final Result resul
14581464
}
14591465
}
14601466

1467+
public void restartIce(final String id) {
1468+
PeerConnectionObserver pco = mPeerConnectionObservers.get(id);
1469+
if (pco == null || pco.getPeerConnection() == null) {
1470+
Log.d(TAG, "restartIce() peerConnection is null");
1471+
} else {
1472+
pco.restartIce();
1473+
}
1474+
}
1475+
14611476
public void peerConnectionClose(final String id) {
14621477
PeerConnectionObserver pco = mPeerConnectionObservers.get(id);
14631478
if (pco == null || pco.getPeerConnection() == null) {

android/src/main/java/com/cloudwebrtc/webrtc/PeerConnectionObserver.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ void setPeerConnection(PeerConnection peerConnection) {
8080
this.peerConnection = peerConnection;
8181
}
8282

83+
void restartIce() {
84+
peerConnection.restartIce();
85+
}
86+
8387
void close() {
8488
peerConnection.close();
8589
remoteStreams.clear();

common/darwin/Classes/FlutterWebRTCPlugin.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,16 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult) result
441441
NSString* trackId = argsMap[@"trackId"];
442442
[self.localTracks removeObjectForKey:trackId];
443443
result(nil);
444+
} else if ([@"restartIce" isEqualToString:call.method]){
445+
NSDictionary* argsMap = call.arguments;
446+
NSString* peerConnectionId = argsMap[@"peerConnectionId"];
447+
RTCPeerConnection *peerConnection = self.peerConnections[peerConnectionId];
448+
if (!peerConnection) {
449+
result([FlutterError errorWithCode:@"restartIce: peerConnection is nil" message:nil details:nil]);
450+
} else {
451+
[peerConnection restartIce];
452+
result(nil);
453+
}
444454
} else if ([@"peerConnectionClose" isEqualToString:call.method] || [@"peerConnectionDispose" isEqualToString:call.method]){
445455
NSDictionary* argsMap = call.arguments;
446456
NSString* peerConnectionId = argsMap[@"peerConnectionId"];

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
flutter_webrtc:
1616
path: ../
1717
# Required for MediaRecorder example
18-
path_provider: ^2.0.1
18+
path_provider: ^2.0.2
1919

2020
dev_dependencies:
2121
flutter_test:

lib/src/native/rtc_peerconnection_impl.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,17 @@ class RTCPeerConnectionNative extends RTCPeerConnection {
420420
return RTCDTMFSenderNative(_peerConnectionId, '');
421421
}
422422

423+
@override
424+
Future<void> restartIce() async {
425+
try {
426+
await WebRTC.invokeMethod('restartIce', <String, dynamic>{
427+
'peerConnectionId': _peerConnectionId,
428+
});
429+
} on PlatformException catch (e) {
430+
throw 'Unable to RTCPeerConnection::resartIce: ${e.message}';
431+
}
432+
}
433+
423434
@override
424435
Future<void> close() async {
425436
try {

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
name: flutter_webrtc
22
description: Flutter WebRTC plugin for iOS/Android/Destkop/Web, based on GoogleWebRTC.
3-
version: 0.8.1
3+
version: 0.8.2
44
homepage: https://github.com/cloudwebrtc/flutter-webrtc
55
environment:
66
sdk: '>=2.12.0 <3.0.0'
77
flutter: '>=1.22.0'
88

99
dependencies:
10-
dart_webrtc: ^1.0.1
10+
dart_webrtc: ^1.0.4
1111
flutter:
1212
sdk: flutter
1313
path_provider: ^2.0.2
14-
webrtc_interface: ^1.0.1
14+
webrtc_interface: ^1.0.2
1515

1616
dev_dependencies:
1717
flutter_test:

0 commit comments

Comments
 (0)
0