fix: resolve CldVideoPlayer fullscreen object-cover issue #433 #601
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inCldVideoPlayer.tsx
, allowing VideoJS's built-in fullscreen mechanism to work without constraint interference.Issue Ticket Number
Fixes #433
Type of change
Checklist
Files Changed
next-cloudinary/src/components/CldVideoPlayer/CldVideoPlayer.tsx
- Removed aspectRatio constraint from wrapper div