Skip to content

fix: resolve CldVideoPlayer fullscreen object-cover issue #433 - #601

Merged
strausr merged 1 commit into
cloudinary-community:mainfrom
ArjunCodess:fix/cldvideoplayer-fullscreen-object-cover
Oct 21, 2025
Merged

strausr merged 1 commit into
cloudinary-community:mainfrom
ArjunCodess:fix/cldvideoplayer-fullscreen-object-cover

Conversation

@ArjunCodess

Copy link
Copy Markdown
Contributor

fixes #433.

Description

Fixes the full-screen object-cover issue with CldVideoPlayer, where videos wouldn't properly fill the screen in full-screen mode. The wrapper div's aspectRatio constraint was interfering with VideoJS's fullscreen implementation, preventing videos from scaling correctly while poster images worked as expected.

Root Cause: VideoJS handles aspect ratios internally through its own classes and styling system. The wrapper div's aspectRatio CSS property was creating a constraint conflict when VideoJS attempted to move the video element to fullscreen (position: fixed).

Solution: Removed the redundant aspectRatio property from the wrapper div styling in CldVideoPlayer.tsx, allowing VideoJS's built-in fullscreen mechanism to work without constraint interference.

Issue Ticket Number

Fixes #433

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the contributing guidelines of this project as mentioned in CONTRIBUTING.md
  • I have created an issue ticket for this PR
  • I have checked to ensure there aren't other open Pull Requests for the same update/change?
  • I have performed a self-review of my own code
  • I have run tests locally to ensure they all pass
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes needed to the documentation

Files Changed

  • next-cloudinary/src/components/CldVideoPlayer/CldVideoPlayer.tsx - Removed aspectRatio constraint from wrapper div

   - Remove aspectRatio constraint from wrapper div
   - Allows VideoJS fullscreen to work properly
   - Fixes issue where videos wouldn't fill screen in fullscreen mode

   Fixes #433
@vercel

vercel Bot commented Oct 2, 2025

Copy link
Copy Markdown

@ArjunCodess is attempting to deploy a commit to the Cloudinary DevX Team on Vercel.

A member of the Team first needs to authorize it.

@ArjunCodess

Copy link
Copy Markdown
Contributor Author

@eportis-cloudinary just a follow-up.

@devpatocld

Copy link
Copy Markdown
Contributor

@ArjunCodess Your PR is still under review. Please be patient, we have several PRs to review! Thank you :)

@eportis-cloudinary
eportis-cloudinary requested review from strausr and removed request for eportis-cloudinary October 20, 2025 16:47

@strausr strausr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice catch and clean fix — thanks for contributing! 🎉

@strausr
strausr merged commit 1a85cd1 into cloudinary-community:main Oct 21, 2025
1 check failed
@strausr

strausr commented Oct 21, 2025

Copy link
Copy Markdown
Collaborator

@all-contributors Please add @ArjunCodess for code

@allcontributors

Copy link
Copy Markdown
Contributor

@strausr

@ArjunCodess already contributed before to code

@jlooper-cloudinary

Copy link
Copy Markdown
Collaborator

I've sent Arjun a swag invitation via Discord, all set

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.16.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CldVideoPlayer fullscreen object-cover issue

4 participants