Skip to main content

VideoPlayer

Video.js-powered player with automatic format handling. Includes custom play/pause overlay and imperative controls via ref (for advanced scenarios like synchronized playback). Video.js handles codec support, adaptive streaming, and disposal lifecycle automatically.

string
required

The video source URL

Anchor to autoplay
autoplay
boolean

Whether the video should autoplay

Anchor to format
format
string

The format/MIME type of the video (default: 'video/mp4')

Anchor to height
height
number

Video height in pixels

boolean

Whether the video should loop

Anchor to muted
muted
boolean

Whether the video should be muted

Anchor to onEnded
onEnded
() => void

Callback when video ends

Anchor to onPause
onPause
() => void

Callback when video is paused

Anchor to onPlay
onPlay
() => void

Callback when video starts playing

Anchor to onReady
onReady
() => void

Callback when video player is ready

Anchor to playButtonComponent
playButtonComponent
React.ReactNode

Custom play button component

Anchor to poster
poster
string

URL for the poster image shown before playback

Anchor to preload
preload
'none' | 'metadata' | 'auto'

Preload behavior: 'none', 'metadata', or 'auto'

Anchor to width
width
number

Video width in pixels


Was this page helpful?