Video props reference
Configure Rixl React video IDs, playback, controls, captions, events, and analytics.
Import the shipped type instead of maintaining a separate interface:
import type {VideoProps} from "@rixl/media-react/video";
export const playerProps = {
id: "YOUR_VIDEO_ID",
muted: true,
autoPlay: false,
theme: "default",
} satisfies VideoProps;Media and playback
Provide id to load a Rixl video. Published components resolve the ID through the SDK; direct src and videoData overrides are not production media sources.
| Prop | Type | Default | Purpose |
|---|---|---|---|
id | string | — | Rixl video ID |
autoPlay | boolean | false | Request automatic playback |
muted | boolean | false | Initial mute preference |
volume | number | 1 | Initial volume from 0 to 1 |
loop | boolean | false | Repeat playback |
playsInline | boolean | true | Prefer inline mobile playback |
poster | string | "" | Poster URL override |
thumbhash | string | "" | Placeholder data |
resumeProgress | boolean | true | Restore saved playback progress |
Browser autoplay policy still applies. Set muted explicitly for autoplay experiences. Effective mute can also depend on shared preferences and user interaction.
Player UI
| Prop | Type | Default | Purpose |
|---|---|---|---|
theme | VideoTheme | "default" | Player presentation |
controls | boolean | true | Built-in player controls |
progressBar | boolean | true | Seek bar |
chapters | boolean | true | Chapter UI |
heatmap | boolean | true | Heatmap visualization |
hotSegments | boolean | false | Hot-segment indicators |
allowPlayPause | boolean | true | Play/pause interactions |
allowFullscreen | boolean | true | Fullscreen control |
allowPictureInPicture | boolean | true | Picture-in-picture control |
soundDisabled | boolean | false | Disable sound controls |
autoHideMs | number | 3000 | Controls hide delay |
lang | string | "" | Player language override |
Use theme="hideUI" with scoped hooks for custom controls. Browser support and available media metadata determine which features can be used.
Analytics and layout
analytics defaults to true; analyticsPage defaults to "standalone". feedId, postId, userId, and userProperties supply context when appropriate.
className, style, and data-* attributes configure the custom-element host. Set dimensions explicitly. Host CSS does not select the internal shadow-DOM controls.
<Video id="YOUR_VIDEO_ID" style={{display: "block", width: "100%", aspectRatio: "16 / 9"}} />Callbacks and refs
| Callback | Argument |
|---|---|
onPausedChange | Paused boolean |
onLoadingChange | Loading boolean |
onRixlAnalytics | Custom event; payload at event.detail.event |
onPlay, onPause, onEnded, onTimeUpdate | Forwarded DOM event |
onLoadedMetadata, onVolumeChange, onRateChange, onQualityChange, onError | Forwarded DOM event |
A ref receives the underlying RixlVideo element. React manages the player scope; use VideoPlayer to associate detached custom controls with one video rather than supplying a public playerId.