-
Notifications
You must be signed in to change notification settings - Fork 183
fix: tighten VideoTrackRenderer Widget #695
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
base: main
Are you sure you want to change the base?
Conversation
tests fail due to required changes in flutter-webrtc and webrtc-interface not being merged yet |
I just realized that I should probably move the sized box up the chain to |
This PR will be merged after the new flutter-webrtc is released |
I tested this PR and found that it broke the fit setting in VideoTrackRenderer. when I publish a video track from the portrait viewfinder on a mobile Original code ![]() Modification from this PR As shown in the screenshot, PR broke the centering of widgets and the rendering of the RTCVideoViewObjectFitCover mode |
oh right, I didn't test with the cover option. All my sizing should be ignored in cover option as the widget will fill up all available space anyway. I'll push a fix soon |
This allows external users to e.g. apply rounded edges. Without this patch, VideoTrackRenderer will expand to its available space with no way for parent widgets to know how large the video actually is
also, cover all paths by moving up sizing logic to build function
18c5f03
to
32b8b0a
Compare
a722a19
to
8daa6b0
Compare
Hi @cloudwebrtc what's the reason for closing this? I added the fix you requested. (Though now I see that I didn't ping you about it..) |
oh, sorry about that! I did test both options with my app, but not with the example app. I'll fix it and ping you here to reopen the PR (if I get it to work :) ) |
It works with the example app now (tested on native linux and web). The initial issue was that flutter-webrtc wraps the whole view in a center, preventing any "insights" into the actual size. My PR "removes" that Center by wrapping in a LayoutBuilder and SizedBox. |
@cloudwebrtc should I open another PR or can you reopen this one? It looks like I can't reopen it |
The build failure for android does not seem to be connected to my changes, the PR should be ready for review now |
This allows external users to e.g. apply rounded edges. Without this patch, VideoTrackRenderer will expand to its available space with no way (known to me..) for parent widgets to know how large the video actually is.
depends on flutter-webrtc/flutter-webrtc#1754 (and flutter-webrtc/webrtc-interface#30)