File tree Expand file tree Collapse file tree 5 files changed +7
-29
lines changed Expand file tree Collapse file tree 5 files changed +7
-29
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
--------------------------------------------
4
+ [ 1.4.1] - 2024-04-12
5
+
6
+ * remove RTCConfiguration convert.
7
+
4
8
[ 1.4.0] - 2024-04-09
5
9
6
10
* Fixed bug for RTCConfiguration convert.
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class RTCFactoryWeb extends RTCFactory {
42
42
],
43
43
};
44
44
final jsRtcPc = web.RTCPeerConnection (
45
- convertRTCConfiguration ( {...constr, ...configuration}) );
45
+ {...constr, ...configuration} as web. RTCConfiguration );
46
46
final _peerConnectionId = base64Encode (jsRtcPc.toString ().codeUnits);
47
47
return RTCPeerConnectionWeb (_peerConnectionId, jsRtcPc);
48
48
}
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ import 'rtc_dtmf_sender_impl.dart';
15
15
import 'rtc_rtp_receiver_impl.dart' ;
16
16
import 'rtc_rtp_sender_impl.dart' ;
17
17
import 'rtc_rtp_transceiver_impl.dart' ;
18
- import 'utils.dart' ;
19
18
20
19
extension on web.RTCDataChannelInit {
21
20
external set binaryType (String value);
@@ -264,7 +263,7 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
264
263
@override
265
264
Future <void > setConfiguration (Map <String , dynamic > configuration) {
266
265
_configuration.addAll (configuration);
267
- _jsPc.setConfiguration (convertRTCConfiguration ( configuration) );
266
+ _jsPc.setConfiguration (configuration as web. RTCConfiguration );
268
267
return Future .value ();
269
268
}
270
269
Original file line number Diff line number Diff line change @@ -27,28 +27,3 @@ String randomString(int length) {
27
27
}
28
28
return buf.toString ();
29
29
}
30
-
31
- web.RTCConfiguration convertRTCConfiguration (
32
- Map <String , dynamic > configuration) {
33
- final object = jsutil.newObject ();
34
- for (var key in configuration.keys) {
35
- if (key == 'iceServers' ) {
36
- final servers = configuration[key] as List <dynamic >;
37
- final jsServers = < web.RTCIceServer > [];
38
- for (var server in servers) {
39
- var iceServer = web.RTCIceServer (urls: server['urls' ]);
40
- if (server['username' ] != null ) {
41
- iceServer.username = server['username' ];
42
- }
43
- if (server['credential' ] != null ) {
44
- iceServer.credential = server['credential' ];
45
- }
46
- jsServers.add (iceServer);
47
- }
48
- jsutil.setProperty (object, key, jsServers);
49
- } else {
50
- jsutil.setProperty (object, key, configuration[key]);
51
- }
52
- }
53
- return object as web.RTCConfiguration ;
54
- }
Original file line number Diff line number Diff line change 1
1
name : dart_webrtc
2
2
description : Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
3
- version : 1.4.0
3
+ version : 1.4.1
4
4
homepage : https://github.com/flutter-webrtc/dart-webrtc
5
5
6
6
environment :
You can’t perform that action at this time.
0 commit comments