Skip to content

Commit 7009df5

Browse files
committed
2 parents 59c5122 + 9d42101 commit 7009df5

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# Changelog
22

33
--------------------------------------------
4-
[1.0.3] - 2022-02-07
4+
[1.0.4] - 2022-02-07
55

66
* Add restartIce.
77
* Bump version for webrtc-interface.
88

9+
[1.0.3] - 2021-12-28
10+
11+
* export media_stream_impl.dart to fix do not import impl files.
12+
913
[1.0.2] - 2021-11-27
1014

1115
* Fix the type error of minified function in release mode.

lib/dart_webrtc.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export 'package:webrtc_interface/webrtc_interface.dart'
66
export 'src/factory_impl.dart';
77
export 'src/media_devices.dart';
88
export 'src/media_recorder.dart';
9+
export 'src/media_stream_impl.dart';
910
export 'src/rtc_video_element.dart';

lib/src/rtc_peerconnection_impl.dart

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -227,18 +227,9 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
227227
}
228228

229229
@override
230-
Future<void> addCandidate(RTCIceCandidate candidate) async {
231-
try {
232-
Completer completer = Completer<void>();
233-
var success = js.allowInterop(() => completer.complete());
234-
var failure = js.allowInterop((e) => completer.completeError(e));
235-
jsutil.callMethod(
236-
_jsPc, 'addIceCandidate', [_iceToJs(candidate), success, failure]);
237-
238-
return completer.future;
239-
} catch (e) {
240-
print(e.toString());
241-
}
230+
Future<void> addCandidate(RTCIceCandidate candidate) {
231+
return jsutil.promiseToFuture<void>(
232+
jsutil.callMethod(_jsPc, 'addIceCandidate', [_iceToJs(candidate)]));
242233
}
243234

244235
@override

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_webrtc
22
description: Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
3-
version: 1.0.3
3+
version: 1.0.4
44
homepage: https://github.com/flutter-webrtc/dart-webrtc
55

66
environment:

0 commit comments

Comments
 (0)