From a47043540f173dc92519a3a3cc54d4257bd50c83 Mon Sep 17 00:00:00 2001 From: Yash Garg Date: Tue, 12 Aug 2025 22:23:53 +0530 Subject: [PATCH] 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. --- lib/src/rtc_rtp_parameters_impl.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/rtc_rtp_parameters_impl.dart b/lib/src/rtc_rtp_parameters_impl.dart index 54c7881..f1a0b59 100644 --- a/lib/src/rtc_rtp_parameters_impl.dart +++ b/lib/src/rtc_rtp_parameters_impl.dart @@ -70,7 +70,7 @@ class RTCHeaderExtensionWeb { class RTCRtpEncodingWeb { static RTCRtpEncoding fromJsObject(web.RTCRtpEncodingParameters object) { return RTCRtpEncoding.fromMap({ - 'rid': object.getProperty('rid'.toJS)?.toDart, + 'rid': object.getProperty('rid'.toJS).dartify(), 'active': object.active, 'maxBitrate': object.getProperty('maxBitrate'.toJS)?.toDartInt, 'maxFramerate': @@ -81,7 +81,7 @@ class RTCRtpEncodingWeb { 'scaleResolutionDownBy': object .getProperty('scaleResolutionDownBy'.toJS) ?.toDartDouble, - 'ssrc': object.getProperty('ssrc'.toJS)?.toDart + 'ssrc': object.getProperty('ssrc'.toJS)?.toDartInt }); } }