useVideoPlayer(
videoRef: RefObject<HTMLVideoElement | null>,
media: VideoMedia | undefined,
options: UseVideoPlayerOptions| Name | Type | Description |
|---|---|---|
videoRef* | RefObject<HTMLVideoElement | null> | |
media* | VideoMedia | undefined | |
options | UseVideoPlayerOptions |
Bind a VideoMedia handle to a caller-owned <video> element.
<video ref={videoRef}> and styles it however
they like; the hook never injects DOM nor overrides layout.message-finish, the underlying blob URL is minted and assigned
as video.src. Progressive playback of streamed container video
(fragmented mp4 / webm via MSE) is out of scope for this version;
status stays in "buffering" until the blob resolves.play / pause / ended / timeupdate /
loadedmetadata / error) are translated into the shared
PlayerStatus enum.media.revoke() is called to free the object URL.Ref to the <video> element the caller renders.
Video handle from useVideo.
Auto-play toggle.