Skip to content

Conversation

Yash-Garg
Copy link
Contributor

@Yash-Garg Yash-Garg commented Aug 12, 2025

This caused an issue on Safari where tracks were not being published properly due to rid being 0 and getting parsed as an int rather than a String.

Tested on Safari, Chrome & Firefox.

[Error] TypeError: 0: type 'int' is not a subtype of type 'String?'
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 215:26  DartError
dart-sdk/lib/_internal/js_dev_runtime/private/profile.dart 117:39             throw_
dart-sdk/lib/_internal/js_dev_runtime/private/profile.dart 117:39             _asStringQ
package:dart_webrtc/src/rtc_rtp_parameters_impl.dart.js 121:2204              fromJsObject
package:dart_webrtc/src/rtc_rtp_parameters_impl.dart.js 51:74                 <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/js_array.dart 219:8             <fn>
package:dart_webrtc/src/rtc_rtp_parameters_impl.dart.js 50:26                 encodingsFromJsObject
package:dart_webrtc/src/rtc_rtp_parameters_impl.dart.js 36:480                fromJsObject
package:livekit_client/src/widgets/video_track_renderer.dart.js 10532:72      LocalVideoTrackExt$124setDegradationPreference
package:livekit_client/src/widgets/video_track_renderer.dart.js 5128:79       <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 622:19           <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 647:23           <fn>
dart-sdk/lib/async/future_impl.dart 951:44                                    handleValueCallback
dart-sdk/lib/async/future_impl.dart 980:32                                    _propagateToListeners
dart-sdk/lib/async/future_impl.dart 723:5                                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 503:7            complete
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 570:12           _asyncReturn
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 622:19           <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 647:23           <fn>
dart-sdk/lib/async/future_impl.dart 951:44                                    handleValueCallback
dart-sdk/lib/async/future_impl.dart 980:32                                    _propagateToListeners
dart-sdk/lib/async/future_impl.dart 723:5                                     <fn>
dart-sdk/lib/async/future_impl.dart 807:7                                     <fn>
dart-sdk/lib/async/schedule_microtask.dart 40:11                              _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 49:5                               _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 186:15           <fn>

This caused a TypeError on Safari where rid was "0" and being parsed as
an integer instead of a string.
@td-famedly
Copy link
Contributor

@cloudwebrtc can we get this merged please?

@cloudwebrtc cloudwebrtc merged commit 6c68043 into flutter-webrtc:main Aug 25, 2025
@Yash-Garg Yash-Garg deleted the yg/fix-rtp-params branch August 25, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants