Skip to content
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

Fix aspect ratio in VideoTextureViewRenderer when frame dimensions change #46

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

DanielNovak
Copy link
Contributor

We need to call requestLayout() when the frame dimensions change in VideoTextureViewRender. If we don't do this then setLayoutAspectRatio(..) in onLayout() is not called and the EglRenderer will then not properly draw the content because the frame size and aspect ratio are out of sync (aspect ratio is not updated).

We found this error thanks to the issue report in GetStream/stream-video-android#679 - changing the scaling type with VideoTextureViewRenderer.setScalingType(..) would not have an effect.

I tested this change with our Video SDK demo app.

Copy link
Member

@skydoves skydoves left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@skydoves skydoves merged commit facd90c into main Aug 7, 2023
1 check passed
@skydoves skydoves deleted the fix_aspect_ratio branch August 7, 2023 11:57
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