Skip to content

Commit cebe07a

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 cebe07a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/rtc_rtp_parameters_impl.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class RTCRtpEncodingWeb {
8181
'scaleResolutionDownBy': object
8282
.getProperty<JSNumber?>('scaleResolutionDownBy'.toJS)
8383
?.toDartDouble,
84-
'ssrc': object.getProperty<JSString?>('ssrc'.toJS)?.toDart
84+
'ssrc': int.tryParse(
85+
object.getProperty<JSString?>('ssrc'.toJS)?.toDart ?? '0',
86+
)
8587
});
8688
}
8789
}

0 commit comments

Comments
 (0)