Skip to content

Hiroshi/render platformview#1096

Draft
hiroshihorie wants to merge 5 commits into
mainfrom
hiroshi/render-platformview
Draft

Hiroshi/render platformview#1096
hiroshihorie wants to merge 5 commits into
mainfrom
hiroshi/render-platformview

Conversation

@hiroshihorie
Copy link
Copy Markdown
Member

@hiroshihorie hiroshihorie commented May 25, 2026

  • Change default rendering mode to .auto (platform mode for iOS/macOS)

Requires flutter-webrtc/flutter-webrtc#2058 for macOS.

Comment on lines +190 to +199
double? get _rendererAspectRatio {
final renderer = _renderer;
if (renderer is rtc.RTCVideoRenderer) {
return renderer.videoValue.aspectRatio;
}
if (renderer is rtc.RTCVideoPlatformViewController) {
return renderer.value.aspectRatio;
}
return null;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes this bug:

TypeError: type 'RTCVideoPlatformViewController' is not a subtype of type 'RTCVideoRenderer?' in type cast
#0      _VideoTrackRendererState._attach.<fn>.<fn> (package:livekit_client/src/widgets/video_track_renderer.dart:192)
#1      State.setState (package:flutter/src/widgets/framework.dart:1199)
#2      _VideoTrackRendererState._attach.<fn> (package:livekit_client/src/widgets/video_track_renderer.dart:191)
#3      RTCVideoPlatformViewController.eventListener (package:flutter_webrtc/src/native/rtc_video_platform_view_controller.dart:133)
#4      _RootZone.runUnaryGuarded (dart:async/zone.dart:891)
#5      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#6      _DelayedData.perform (dart:async/stream_impl.dart:573)
#7      _PendingEvents.handleNext (dart:async/stream_impl.dart:678)
#8      _PendingEvents.schedule.<fn> (dart:async/stream_impl.dart:649)
#9      _microtaskLoop (dart:async/schedule_microtask.dart:40)
#10      _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

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.

2 participants