Skip to content

Fix video player overflow on /w/ page and modal view#368

Merged
ShaneIsrael merged 2 commits intodevelopfrom
copilot/fix-video-player-layout-issues
Jan 2, 2026
Merged

Fix video player overflow on /w/ page and modal view#368
ShaneIsrael merged 2 commits intodevelopfrom
copilot/fix-video-player-layout-issues

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

Video players were stretching to full browser width, forcing users to scroll to reach controls when the browser was full-screened.

Changes

  • Watch.js: Constrain video player container using viewport-relative max-width calculation
  • VideoModal.js: Apply same constraint pattern to modal video player

The fix uses CSS calc to derive max-width from available height, assuming 16:9 aspect ratio:

<Box
  sx={{
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
    maxHeight: 'calc(100vh - 64px)',
  }}
>
  <Box
    sx={{
      width: '100%',
      maxWidth: 'calc((100vh - 64px - 120px) * 16 / 9)',
    }}
  >
    <VideoJSPlayer ... />
    {/* controls, title, description */}
  </Box>
</Box>

This ensures the video player stays horizontally centered with all controls, titles, and descriptions visible within the viewport.

Original prompt

The video players on the /w/ page and the modal view player are stretching to the width of the browser which ends up forcing the user to scroll to get to the video controls if they have their browser full screened. The video player and related control / components such as titles, descriptions that appear below the player should never overflow past the viewable area.

At that point the video player should stay centered horizontally on the screen with all controls, titles, descriptions, related components that appear below it perfectly in view.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Constrain video player max-width based on viewport height to prevent overflow
- Center video player horizontally when width is constrained
- Ensure controls, titles, and descriptions remain visible without scrolling

Co-authored-by: ShaneIsrael <[email protected]>
Copilot AI changed the title [WIP] Fix video player overflow and layout issues on fullscreen Fix video player overflow on /w/ page and modal view Jan 2, 2026
Copilot AI requested a review from ShaneIsrael January 2, 2026 04:35
@ShaneIsrael ShaneIsrael marked this pull request as ready for review January 2, 2026 04:49
@ShaneIsrael ShaneIsrael merged commit ee1891a into develop Jan 2, 2026
@ShaneIsrael ShaneIsrael deleted the copilot/fix-video-player-layout-issues branch January 2, 2026 06:03
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