API Reference

Props

Every VideoCard / VideoPlayer prop, with types and defaults.

Accepted by VideoCard and VideoPlayer, and by each entry in VideoStage's playlist.

Source & presentation

PropTypeDefaultDescription
srcstring-Required. Video URL or platform URI - the platform is auto-detected
labelstring''Video label, shown on the placeholder and used as the accessible name
posterstring''Poster image URL
aspectRatiostring'16:9'e.g. '16:9', '9:16', '4:3'
tracksCaptionTrackDef[]-WebVTT tracks: { src, kind?, srclang?, label?, default? } - native path only, see captions
payloadobject | string{}Arbitrary data attached to every state-change event. A JSON string is accepted too, since a custom-element attribute arrives as one
captionLinenumber-Pins rendered cues to this line on the native caption layer - use it to lift captions clear of your own HUD. Native sources only

Playback

PropTypeDefaultDescription
autoplaybooleanfalseAutoplay on mount - always starts muted, since browsers block unmuted gesture-less playback
mutedboolean-Force a starting mute state; unset follows the shared audio preference
volumenumber-Force a starting volume (0-1); unset follows the shared preference
playbackRatenumber1Initial playback rate
qualitynumber | null-A target height in pixels (the 720 in 720p); the nearest level the source offers is selected once its levels are known. null forces Auto; unset restores the height the viewer last picked on another video, or leaves Auto if they never picked one. One-way: a level the viewer picks stands until the prop changes. See quality
loopbooleanfalseStart with looping on. Reactive - flipping it later is the same as calling toggleLoop()
preload'none' | 'metadata' | 'auto'-The native <video preload> attribute; unset leaves the browser default. 'none' defers loading for MP4 and HLS alike (hls.js is held back until the first play), but not for DASH. 'metadata'/'auto' leave HLS loading as normal, since hls.js buffers ahead regardless of the attribute. Embed platforms ignore it
lazybooleantrueVideoCard only: show a placeholder until clicked
playInViewbooleanfalseAuto-play once at least half visible (or playInViewRatio), and again each time it scrolls back in, unless the viewer paused it or it ended. Implies muted unless muted is set. Works with the lazy placeholder. (Auto-pause below 10% visible is always on, playInView or not)
playInViewRationumber0.5How much of a playInView player (above 0, up to 1) must be on screen before it plays. 1 waits for all of it; a player too big to fit plays once it fills as much of the screen as it can
pinPinCorner-Once scrolled out of view while playing, pin to that corner instead of auto-pausing: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
autoStagebooleanfalseVideoCard only: send this video to the VideoStage on mount
deepLinkboolean | stringfalseAnswer a page URL that points at a moment (#ml-t=42,52): scroll into view, seek to the start, highlight the range. A string is this player's id, for links with &ml-player=<id>. See deep links
deepLinkEnd'pause' | 'loop' | 'continue''pause'What happens at the end of a deep-linked range

UI

PropTypeDefaultDescription
controlsbooleantruefalse renders a bare <video> with no HUD - drive it via methods or headless controls. setControls() on the handle overrides it for a while
nativeUibooleanfalseUse the platform's own controls (YouTube, Vimeo, Dailymotion only)
actionPlayerActionnullExtra HUD button - a built-in ('mute' | 'loop' | 'autoplay') or { icon, label, onClick }
disableTapCapturebooleanfalseDisables the full-video tap-to-reveal-controls overlay
disableKeyboardShortcutsbooleanfalseDisables the Space/k/arrows/m/f/c/0-9/Home/End hotkeys while the player has focus

Ads

PropTypeDefaultDescription
adTagUrlstring''VAST or VMAP ad tag URL
adMacroParamsRecord<string, string>-Fills {macro} tokens in whichever ad tag ends up in use, including an auto-discovered one
headerBiddingHeaderBiddingConfig-{ adUnit, params?, timeoutMs? } - runs a Prebid.js auction before the ad, see header bidding
If several playInView players are visible at once, a shared debounce lets only the last one to cross the threshold play.
munsonlabs · MIT licensed · © 2026