Skip to content

Commit

Permalink
Merge pull request #32 from flutter-webrtc/fix/dc-data-parse
Browse files Browse the repository at this point in the history
Fix DC data parse.
  • Loading branch information
cloudwebrtc authored Apr 9, 2024
2 parents a3edbd5 + ce00dde commit 8446e95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

--------------------------------------------
[1.3.3] - 2024-04-09

* Fix DC data parse.

[1.3.2] - 2024-04-09

* Fix error when constructing RTCDataChannelInit.
Expand Down
8 changes: 3 additions & 5 deletions lib/src/rtc_data_channel_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ class RTCDataChannelWeb extends RTCDataChannel {
return RTCDataChannelMessage(data);
}
dynamic arrayBuffer;
if (data is web.Blob) {
// This should never happen actually
arrayBuffer = await jsutil
.promiseToFuture(jsutil.callMethod(data, 'arrayBuffer', []));
if (data is JSArrayBuffer) {
arrayBuffer = data.toDart;
} else {
arrayBuffer = data;
arrayBuffer = data.toString();
}
return RTCDataChannelMessage.fromBinary(arrayBuffer.asUint8List());
}
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.3.2
version: 1.3.3
homepage: https://github.com/flutter-webrtc/dart-webrtc

environment:
Expand Down

0 comments on commit 8446e95

Please sign in to comment.