API and Development
Import from @prepared911/ui/video-player.
| Name | Default | Description |
|---|---|---|
src | Media URL. A change resets load state. | |
copy | Required labels. LocalizedMessage from @prepared911/tool-localization. Includes seekValueText and timeSeparator. | |
controls | true | Custom bar. false uses native controls. |
playing | Controlled playback. | |
playerId | Opaque id. When set, this player joins the single-active registry. | |
activePlayerId | Controlled id of the player that should be the only one playing. | |
volume | 0 to 1. The bar opens it in a popover. | |
muted | Mutes the element. | |
playbackRate | 1 is real time. | |
pip | Requests Picture-in-Picture. | |
preload | VideoPreload. | |
tracks | Captions and other text tracks. | |
showTimeStamps | true | Clock in the bar. |
timeDisplayMode | Combined | TimeDisplayMode. |
blur | Enables blur. true starts blurred. | |
onBlurChange | (blurred: boolean) => void. | |
hideBlurButton | false | Hides the toggle and still applies blur. |
fullscreen | Shows the fullscreen control. | |
onSnapshot | Receives a JPEG data URL. Omitted, the button is hidden. Disabled while blurred. | |
showPlayOverlay | false | Large play control before the first start. |
disableContextMenu | false | Cancels the video context menu. |
onPlayingChange | Play or pause through media-core, including the single-active registry. | |
className | Classes on the root. |
Video takes copy with label, errorTitle, and retry, plus the media props above except the bar-only ones.
VideoRef exposes getInternalPlayer, getCurrentTime, getDuration, seekTo, play, pause, setVolume, setMuted, and toggleMuted. Times are seconds. The playback methods take an optional change-details argument.
copy is required and now includes seekValueText and timeSeparator. width and height strings are gone. Volume is a popover. Snapshot and Picture-in-Picture refuse while the frame is blurred. playerId joins the shared single-active registry. The full list is in the component contract.