Skip to content

Commit a470435

Browse files
committed
fix: parse rid and ssrc to proper types
This caused a TypeError on Safari where rid was "0" and being parsed as an integer instead of a string.
1 parent 7b57464 commit a470435

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/rtc_rtp_parameters_impl.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class RTCHeaderExtensionWeb {
7070
class RTCRtpEncodingWeb {
7171
static RTCRtpEncoding fromJsObject(web.RTCRtpEncodingParameters object) {
7272
return RTCRtpEncoding.fromMap({
73-
'rid': object.getProperty<JSString?>('rid'.toJS)?.toDart,
73+
'rid': object.getProperty<JSString?>('rid'.toJS).dartify(),
7474
'active': object.active,
7575
'maxBitrate': object.getProperty<JSNumber?>('maxBitrate'.toJS)?.toDartInt,
7676
'maxFramerate':
@@ -81,7 +81,7 @@ class RTCRtpEncodingWeb {
8181
'scaleResolutionDownBy': object
8282
.getProperty<JSNumber?>('scaleResolutionDownBy'.toJS)
8383
?.toDartDouble,
84-
'ssrc': object.getProperty<JSString?>('ssrc'.toJS)?.toDart
84+
'ssrc': object.getProperty<JSNumber?>('ssrc'.toJS)?.toDartInt
8585
});
8686
}
8787
}

0 commit comments

Comments
 (0)