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.useVideoPlayer(
videoRef: RefObject<HTMLVideoElement | null>,
media: VideoMedia | undefined,
options: UseVideoPlayerOptions
): VideoPlayerHandle| Name | Type | Description |
|---|---|---|
videoRef* | RefObject<HTMLVideoElement | null> | Ref to the |
media* | VideoMedia | undefined | Video handle from useVideo. |
options | UseVideoPlayerOptions | Auto-play toggle. |