
Grid Tunnel
WebGL
A minimal branded video player with play, pause, mute, scrubbing and fullscreen controls for demos, case-study videos, and product proof.
Custom Video Player gives product demos and case-study videos branded controls without making playback harder.
Use it when a video section needs a poster and branded controls: a centre play/pause button and a bottom bar with play/pause, elapsed time, a scrub bar, duration, mute and fullscreen. The controls fade out after 1.8 seconds without pointer movement (hideControlsDelay) and return on mouse move or touch. The default export plays a built-in showreel and poster, so using your own video means editing those sources in the file. The page job is watched proof: the player should make the demo easier to trust and operate.
The thing to watch is inaccessible media chrome. The play, mute and fullscreen buttons are labelled and keyboard-focusable, but the scrub bar is a pointer-only div, there are no keyboard shortcuts beyond Escape to leave fullscreen, there is no captions track or control, and there is no loading or buffering state. Add those before using it for proof that must be accessible.
import VideoPlayer from "@/components/effects/video-player"; export default function Page() { return ( <> <div className="aspect-video h-[27vw] w-[43vw] max-md:h-auto max-md:w-full"> <VideoPlayer /> </div> </> );} A product demo page can use Custom Video Player when the video is a proof asset: the poster shows straight away, the video preloads only metadata, and the main controls are labelled buttons. If the video needs captions or keyboard seeking, add a captions track and a focusable seek control first.
Not for videos that need native reliability more than branded chrome, or for pages where captions, controls, or fallback playback cannot be verified.
The player sets a poster and preload="metadata", but autoPlay is on by default, so the video starts downloading as soon as it mounts. If the file is heavy, turn autoPlay off or mount the player only when the section is likely to be used.
The play/pause, mute and fullscreen controls are real buttons with aria-labels that change with state. The scrub bar has no focus or keyboard support, captions are not supported, and the controls hide by opacity after 1.8 seconds even while a button has keyboard focus. On touch screens a tap anywhere on the player brings the controls back, and the video uses playsInline so it plays inline on iOS.
| Prop | Type | Default | Description |
|---|---|---|---|
autoPlay | boolean | true | Starts playback automatically when allowed. |
startMuted | boolean | true | Initial muted state. |
showCloseButton | boolean | true | Shows the close button on the player. |
rounded | boolean | false | Rounds the player frame when not fullscreen. |
preserveAspectRatio | boolean | true | Uses object-contain instead of object-cover for the video. |
hideControlsDelay | number | 1800 | Delay before controls auto-hide, in milliseconds. |
It controls actual media. Playback, captions, focus, and loading behavior matter more than the animation around the controls.
The buttons already have accessible names that switch with state (Play video, Pause video, Mute video, Unmute video, Open fullscreen, Exit fullscreen). You still need to add a keyboard-operable seek control, captions through a track element, and a way to keep the controls visible while one has focus.
It autoplays muted by default (autoPlay and startMuted are both true) and does not check prefers-reduced-motion. Keep that only when the video is muted and non-essential; otherwise set autoPlay={false}.
Yes. A custom version should define content structure, accessibility behavior, motion rules, reduced-motion behavior, source handoff, and implementation notes for the specific page job.
Need a custom effect? Tell us what to create.