Skip to content
MultimediaInteractive playground

Player

Video and audio with controls, tracks and adaptive playback.

Preparing the playground…
Text and Markdown example
Player · Example
1<Player source={{id:"demo",src:"/truck.mp4",type:"video",title:"Kivora · In motion"}} style={{width:"100%",maxWidth:520}} />
Read documentation in Markdown

How to use it

Pass source with id and src. Use a supported media URL with CORS when necessary. Configure controls and advanced features through props.

The demo uses a local site video. DRM requires a license server; HLS/DASH sources, ads and downloads depend on service and browser configuration.

Import

React / Next.js
1import { Player } from "@kivora/nextjs";

Interactive examples run inside a component with "use client". The playground's Copy button includes the imports needed for the current example.

API reference 0.2.0

Types from the installed published version, including component properties and common HTML attributes. “Optional” does not imply a default value; omitting a property lets the component decide.

PropertyTypeDescription
sourceRequiredPlayerSourceMedia source with id, src, title and playback options.
activeQueueIdstringConfigures activeQueueId. The type describes the supported values and structure.
aria-labelstringAccessible name of the control.
autoPlaybooleanRequest automatic playback; subject to browser policies.
childrenReactNodeContent or child elements of the component.
classNamestringAdditional CSS classes to customize the element.
controllerPlayerControllerStable instance managing the session and its resources.
controlsVariant"standard" | "compact" | "cinema" | "series"Presentation of player controls.
defaultCheckedbooleanInitial selection of the control.
defaultValuestring | number | readonly string[]Initial value when the component manages its own state.
idstringElement identifier; associates labels and descriptions.
localestringLocalization in the format expected by the component.
messagesPartial<{ play: string; pause: string; seek: string; volume: string; mute: string; unmute: string; fullscreen: string; exitFullscreen: string; pip: string; settings: string; quality: string; audio: string; subtitles: string; speed: string; auto: string; off: string; live: string; goLive: string; loading: string; splash: string; ad: string; containsAds: string; skipAd: string; error: string; retry: string; download: string; cancelDownload: string; downloads: string; remove: string; playOffline: string; downloading: string; close: string; expand: string; collapse: string; exportFile: string; emptyDownloads: string; expired: string; back: string; forward: string; downloadError: string; actionError: string; upNext: string; nowPlaying: string; episodes: string; previous: string; next: string; }>Localized messages replacing the defaults.
mutedbooleanStart or keep playback muted.
onChangeChangeEventHandler<HTMLDivElement, Element>Change event. Check the type: some controls return an object, others a DOM event.
onClickMouseEventHandler<HTMLDivElement>Action performed when the element is activated.
onQueueSelect((item: PlayerQueueItem) => void)Callback for this event. The signature describes its arguments.
onSubmitSubmitEventHandler<HTMLDivElement>Form submission event.
optionsPlayerControllerOptionsComponent options or configuration. See the type structure.
overlaysPlayerOverlay[]Configures overlays. The type describes the supported values and structure.
presentation"footer" | "inline" | "sheet"Audio players can live in the footer and expand into a bottom sheet.
programPlayerProgramConfigures program. The type describes the supported values and structure.
queuePlayerQueueItem[]Configures queue. The type describes the supported values and structure.
roleAriaRoleSemantic role of the element. Keep the default role unless a change is justified.
settingsLayout"list" | "tabs"Mobile settings presentation; list preserves the previous layout.
styleCSSPropertiesReact inline styles.
tabIndexnumberKeyboard focus order and availability.
titlestringTitle or supplementary information.

TypeScript definition

Review each component's properties and published declaration. Native and accessibility attributes are inherited from the element specified by its type.

Player28 properties
Player · TypeScript
1declare function Player({ source, controller: provided, options, locale, messages, overlays, controlsVariant, program, queue, activeQueueId, onQueueSelect, presentation, autoPlay, settingsLayout, muted, className, ...props }: PlayerProps): React.JSX.Element;
API generated from @kivora/nextjs 0.2.0View package