File tree 3 files changed +11
-8
lines changed
3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
--------------------------------------------
4
+ [ 1.5.3+hotfix.2] - 2025-04-25
5
+
6
+ * fix bug for dc.onMessage.
7
+
4
8
[ 1.5.3+hotfix.1] - 2025-04-25
5
9
6
10
* add getter override for dc.bufferedAmountLowThreshold.
Original file line number Diff line number Diff line change 1
1
import 'dart:async' ;
2
2
import 'dart:js_interop' ;
3
+ import 'dart:typed_data' ;
3
4
4
5
import 'package:web/web.dart' as web;
5
6
import 'package:webrtc_interface/webrtc_interface.dart' ;
@@ -70,15 +71,13 @@ class RTCDataChannelWeb extends RTCDataChannel {
70
71
if (data is String ) {
71
72
return RTCDataChannelMessage (data);
72
73
}
73
- dynamic arrayBuffer;
74
- if (data is JSArrayBuffer ) {
75
- arrayBuffer = data.toDart;
74
+ if (data is ByteBuffer ) {
75
+ return RTCDataChannelMessage .fromBinary (data.asUint8List ());
76
76
} else if (data is web.Blob ) {
77
- arrayBuffer = await data.arrayBuffer ().toDart;
78
- } else {
79
- arrayBuffer = data.toDart;
77
+ final arrayBuffer = await data.arrayBuffer ().toDart;
78
+ return RTCDataChannelMessage .fromBinary (arrayBuffer.toDart.asUint8List ());
80
79
}
81
- return RTCDataChannelMessage .fromBinary (arrayBuffer. asUint8List ( ));
80
+ return RTCDataChannelMessage .fromBinary (Uint8List ( 0 ));
82
81
}
83
82
84
83
@override
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.5.3+hotfix.1
3
+ version : 1.5.3+hotfix.2
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