SimplePlayer

A focused React video player with lazy loading, glass controls, and accessible playback interactions.

Installation

Basic

Full controls

Keyboard

Focus the player and press Space, Enter, or K to toggle playback.

The progress and volume sliders retain native keyboard behavior, including arrow, Home, and End keys.

API Reference

PropTypeDefaultDescription
srcstringVideo URL. Attached lazily as the player approaches the viewport.
aspectRatioCSSProperties['aspectRatio']"16 / 9"CSS aspect ratio used by the player shell.
controlsbooleanfalseShows volume, Picture-in-Picture, and fullscreen controls.
showTimebooleanfalseShows elapsed/remaining time, or a scrub tooltip without the control tray.
pauseOnOverlayClickbooleanfalseToggles playback when the non-control video surface is clicked.
preloadMarginstring"360px 0px"IntersectionObserver root margin for lazy source loading.
defaultVolumenumber1Initial volume from 0 to 1.
labelstring"Video player"Accessible name for the player group.
autoPlaybooleantrueStarts playback when browser autoplay policy permits it.
loopbooleantrueLoops the video.
mutedbooleantrueInitial muted state. Muted playback is required by most autoplay policies.

Credits

SimplePlayer adapts the visual language and interaction model of SimplePlayer by Grizz. The original source is MIT licensed; its copyright and permission notice are preserved in the component source.