Skip to content

Conversation

ArjunCodess
Copy link

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 cloudinary-community#433
Copy link

vercel bot commented Oct 2, 2025

@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
Author

@eportis-cloudinary just a follow-up.

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
2 participants