8000 Correct initialization of binary types on iOS. · RainwayApp/flutter-webrtc@9df38d6 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 9df38d6

Browse files
committed
Correct initialization of binary types on iOS.
1 parent e59171c commit 9df38d6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ios/Classes/FlutterRTCDataChannel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
@interface RTCDataChannel (Flutter) <FlutterStreamHandler>
55
@property (nonatomic, strong) NSString *peerConnectionId;
6+
@property (nonatomic, strong) NSNumber *flutterChannelId;
67
@property (nonatomic, strong) FlutterEventSink eventSink;
78
@property (nonatomic, strong) FlutterEventChannel* eventChannel;
89
@end

ios/Classes/FlutterRTCDataChannel.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ - (void)dataChannel:(RTCDataChannel *)channel didReceiveMessageWithBuffer:(RTCDa
146146
id data;
147147
if (buffer.isBinary) {
148148
type = @"binary";
149-
data = buffer.data;
149+
data = [FlutterStandardTypedData typedDataWithBytes:buffer.data];
150150
} else {
151151
type = @"text";
152152
data = [[NSString alloc] initWithData:buffer.data

0 commit comments

Comments
 (0)
0