File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 11# Changelog  
22
33-------------------------------------------- 
4+ [ 1.5.3+hotfix.2]  - 2025-04-25
5+ 
6+ *  fix bug for dc.onMessage.
7+ 
48[ 1.5.3+hotfix.1]  - 2025-04-25
59
610*  add getter override for dc.bufferedAmountLowThreshold.
Original file line number Diff line number Diff line change 11import  'dart:async' ;
22import  'dart:js_interop' ;
3+ import  'dart:typed_data' ;
34
45import  'package:web/web.dart'  as  web;
56import  'package:webrtc_interface/webrtc_interface.dart' ;
@@ -70,15 +71,13 @@ class RTCDataChannelWeb extends RTCDataChannel {
7071    if  (data is  String ) {
7172      return  RTCDataChannelMessage (data);
7273    }
73-     dynamic  arrayBuffer;
74-     if  (data is  JSArrayBuffer ) {
75-       arrayBuffer =  data.toDart;
74+     if  (data is  ByteBuffer ) {
75+       return  RTCDataChannelMessage .fromBinary (data.asUint8List ());
7676    } 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 ());
8079    }
81-     return  RTCDataChannelMessage .fromBinary (arrayBuffer. asUint8List ( ));
80+     return  RTCDataChannelMessage .fromBinary (Uint8List ( 0 ));
8281  }
8382
8483  @override 
Original file line number Diff line number Diff line change 11name : dart_webrtc 
22description : 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  
44homepage : https://github.com/flutter-webrtc/dart-webrtc 
55
66environment :
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments