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.
Anchor to propsProps
- Anchor to srcsrcsrcstringstringrequiredrequired
The video source URL
- Anchor to autoplayautoplayautoplaybooleanboolean
Whether the video should autoplay
- Anchor to formatformatformatstringstring
The format/MIME type of the video (default: 'video/mp4')
- Anchor to heightheightheightnumbernumber
Video height in pixels
- Anchor to looplooploopbooleanboolean
Whether the video should loop
- Anchor to mutedmutedmutedbooleanboolean
Whether the video should be muted
- Anchor to onEndedonEndedonEnded() => void() => void
Callback when video ends
- Anchor to onPauseonPauseonPause() => void() => void
Callback when video is paused
- Anchor to onPlayonPlayonPlay() => void() => void
Callback when video starts playing
- Anchor to onReadyonReadyonReady() => void() => void
Callback when video player is ready
- React.ReactNodeReact.ReactNode
Custom play button component
- Anchor to posterposterposterstringstring
URL for the poster image shown before playback
- Anchor to preloadpreloadpreload'none' | 'metadata' | 'auto''none' | 'metadata' | 'auto'
Preload behavior: 'none', 'metadata', or 'auto'
- Anchor to widthwidthwidthnumbernumber
Video width in pixels
Was this page helpful?