Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Feb 7, 2022
2 parents 59c5122 + 9d42101 commit 7009df5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Changelog

--------------------------------------------
[1.0.3] - 2022-02-07
[1.0.4] - 2022-02-07

* Add restartIce.
* Bump version for webrtc-interface.

[1.0.3] - 2021-12-28

* export media_stream_impl.dart to fix do not import impl files.

[1.0.2] - 2021-11-27

* Fix the type error of minified function in release mode.
Expand Down
1 change: 1 addition & 0 deletions lib/dart_webrtc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export 'package:webrtc_interface/webrtc_interface.dart'
export 'src/factory_impl.dart';
export 'src/media_devices.dart';
export 'src/media_recorder.dart';
export 'src/media_stream_impl.dart';
export 'src/rtc_video_element.dart';
15 changes: 3 additions & 12 deletions lib/src/rtc_peerconnection_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,9 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
}

@override
Future<void> addCandidate(RTCIceCandidate candidate) async {
try {
Completer completer = Completer<void>();
var success = js.allowInterop(() => completer.complete());
var failure = js.allowInterop((e) => completer.completeError(e));
jsutil.callMethod(
_jsPc, 'addIceCandidate', [_iceToJs(candidate), success, failure]);

return completer.future;
} catch (e) {
print(e.toString());
}
Future<void> addCandidate(RTCIceCandidate candidate) {
return jsutil.promiseToFuture<void>(
jsutil.callMethod(_jsPc, 'addIceCandidate', [_iceToJs(candidate)]));
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dart_webrtc
description: Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
version: 1.0.3
version: 1.0.4
homepage: https://github.com/flutter-webrtc/dart-webrtc

environment:
Expand Down

0 comments on commit 7009df5

Please sign in to comment.