Skip to content

feat(video-player-v2): add buffered range visual and style gradient to scrub bar#1693

Merged
kduncanhsu merged 3 commits into
box:masterfrom
kduncanhsu:kduncanhsu/video-player-v2-ui-polish
Jul 6, 2026
Merged

feat(video-player-v2): add buffered range visual and style gradient to scrub bar#1693
kduncanhsu merged 3 commits into
box:masterfrom
kduncanhsu:kduncanhsu/video-player-v2-ui-polish

Conversation

@kduncanhsu

@kduncanhsu kduncanhsu commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add buffered range visual indicator to the v2 video player scrubber bar, matching the existing v1 behavior
  • Add a black-to-transparent gradient background behind the v2 video controls for better contrast against video content as per designs
  • Move bufferedRange into sharedProps in DashViewer so both v1 and v2 controls receive it consistently

Changes

  • TimeControlsV2.tsx: Accept bufferedRange prop, compute buffered percentage, and render a three-segment track gradient (played → buffered → unplayed) using custom color constants (rgb(127, 127, 127) for buffered,
    rgb(85, 85, 85) for unplayed)
  • VideoControlsV2.tsx: Forward bufferedRange to TimeControlsV2
  • VideoControlsV2.scss: Add linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0)) background
  • DashViewer.js: Move bufferedRange into sharedProps (removes duplicate prop on v1 VideoControls)

Screenshots

Screenshot 2026-07-06 at 1 15 16 PM

Test plan

  • Play a DASH video with the v2 player enabled and verify the scrubber shows three distinct segments: white (played), medium grey (buffered), dark grey (unplayed)
  • Verify the buffered segment grows as the video loads ahead of the playhead
  • Verify the gradient background fades from black at the bottom to transparent at the top behind controls
  • Verify the v1 player still renders its buffered range correctly
  • Run existing unit tests: TimeControlsV2, VideoControlsV2, DashViewer (all passing)

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Duncan Hsu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kduncanhsu kduncanhsu marked this pull request as ready for review July 6, 2026 20:01
@kduncanhsu kduncanhsu requested a review from a team as a code owner July 6, 2026 20:01
@kduncanhsu kduncanhsu force-pushed the kduncanhsu/video-player-v2-ui-polish branch from 4469f02 to 081178a Compare July 6, 2026 20:03
@kduncanhsu kduncanhsu changed the title feat(video-player-v2): add buffered range visual and style gradient feat(video-player-v2): add buffered range visual and style gradient to scrub bar Jul 6, 2026
@kduncanhsu kduncanhsu merged commit b84fd34 into box:master Jul 6, 2026
6 of 7 checks passed
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.

3 participants