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

[Bug] Fix CldVideoPlayer aspect ratio jump on load #206

Closed
colbyfayock opened this issue Apr 11, 2024 · 1 comment · Fixed by #209
Closed

[Bug] Fix CldVideoPlayer aspect ratio jump on load #206

colbyfayock opened this issue Apr 11, 2024 · 1 comment · Fixed by #209
Labels
bug Something isn't working
Milestone

Comments

@colbyfayock
Copy link
Collaborator

When the CldVideoPlayer loads, the initial player size may be different from the videos if it is not 16:9, which is in the case at a minimum for some of the demo videos we use.

To fix this, we can define a width, height, and aspectRatio on the player initialization config:

        width,
        height,
        aspectRatio: `${width}:${height}`,

Which can be taken straight from the props.

https://github.com/cloudinary-community/next-cloudinary/pull/461/files#diff-a55bcf836522ca3b2611e1c71bf0dd0ac5ea8a13832d57f433ac9bd75f487515R168

When updating this, you'll need to update the @cloudinary-util/types package to at least 1.0.2 to pull in i think just the aspectRatio.

@colbyfayock colbyfayock added the bug Something isn't working label Apr 11, 2024
@Baroshem
Copy link
Collaborator

Hey @colbyfayock

Thank for raising this issue, I plan to include a fix for it in the upcoming 3.0.0 version :)

@Baroshem Baroshem added this to the 3.0.0 milestone Apr 22, 2024
@Baroshem Baroshem mentioned this issue May 9, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants