-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Partially rebuild RTCVideoView when renderVideo value changes #1406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partially rebuild RTCVideoView when renderVideo value changes #1406
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be 8000 displayed to describe this comment to others. Learn more.
lgtm
This PR seems to cause flutter Windows (win 10) to not work correctly. To reproduce the steps, run getUserMedia or LoopBack Sample in the example, the randomness of the video rendering component cannot be displayed, use vs2022 debugging, flutter_video_renderer.cc::onFrame is called, but CopyPixelBuffer is not called by flutter, It seems that Texture is not rendering correctly in flutter UI. |
Integrating. I've tried to investigate in this direction, but technically, this PR only introduced reaction to |
I have no ideas, I tried some modifications, and only by reverting these changes and the Windows app can work, so I need to temporarily revert this PR until the issue with Windows rendering is resolved. |
I understand. Unfortunately, I don't have access to a Windows system at the moment. As soon as I obtain access, I will investigate the issue and work on implementing the necessary modification. |
…anges (flutter-webrtc#1406)" (flutter-webrtc#1418) This reverts commit 99f8182.
When the
srcObject
value changes (and as a consequence, therenderVideo
value ofvideoRenderer
changes) in a place not related to the widget without asetState
call (for example within a bloc), the associatedRTCVideoView
widget does not rebuild. As a result, it continues to display a placeholder or Container widget, even ifRTCVideoRenderer.renderVideo
istrue
.In this pull request, I expand the usage of the
ValueListenableBuilder
widget, which already exists withinRTCVideoView
widget. This allows the actualrenderVideo
value to be respected and triggers a partial rebuild of theRTCVideoView
widget when the value changes.By the way in
RTCVideoView
for web this done by_onRendererListener
callback that callsetState
.