Video: Standard Video Player
Complete guide to the standard video player with built-in Rixl controls and analytics
The standard video player provides a complete, professional media experience using the Rixl video player with adaptive HLS streaming. This is the most common implementation for content platforms, educational sites, and any application requiring full video playback capabilities.
Before you start
Connect the SDK before mounting media. Replace the placeholder IDs in the implementation below with IDs from your Rixl project.
Complete Implementation
import {Video} from "@rixl/media-react";
function StandardVideoPlayer() {
return (
<div className="w-full aspect-video rounded-lg overflow-hidden">
<Video
id="your-video-id"
className="w-full h-full"
analyticsPage="standalone"
controls
theme="default"
onRixlAnalytics={(e) => console.log(e.detail.event)}
/>
</div>
);
}Core Features
Playback
The Video component provides adaptive video playback. It loads the HLS manifest returned by the Rixl API and falls back to hls.js where native HLS support is missing. Use controls, theme, progressBar, allowFullscreen, allowPictureInPicture, chapters, heatmap, and other UI props to configure the built-in player.
Analytics
With analytics enabled by default, the component tracks:
content_viewsstart,watch, andendevents- Interaction events:
play,pause,seek,mute,volume_change,fullscreen,picture_in_picture,quality_change,settings_open - Error events for load and API failures
Provide analyticsPage, feedId, and postId to attribute events correctly:
<Video id="your-video-id" analyticsPage="feed" feedId="my-feed" postId="post-123" onRixlAnalytics={(e) => console.log(e.detail.event)} />Common Configurations
Content Platform
<Video id="content-video" className="w-full max-w-4xl mx-auto rounded-lg shadow-lg" analyticsPage="standalone" controls />Educational Platform
<Video id="tutorial-video" className="w-full h-auto" analyticsPage="standalone" autoPlay={false} controls />Marketing/Landing Page
<Video id="promo-video" className="w-full max-w-5xl mx-auto rounded-2xl shadow-2xl" analyticsPage="standalone" controls />Responsive Design
Make your video player adapt to different screen sizes:
function ResponsivePlayer() {
return (
<div className="w-full max-w-6xl mx-auto px-4">
<div className="aspect-video w-full rounded-lg overflow-hidden">
<Video id="your-video-id" className="w-full h-full" controls />
</div>
</div>
);
}Best Practices
Default Settings: Start with analyticsPage="standalone" for dedicated player pages and analyticsPage="feed" for posts inside <Feed>.
Autoplay Policy: Set muted={true} when requesting autoplay; browser playback policy still applies. Use autoPlay={true} and muted= {true} for background videos.
Player UI: theme, controls, progressBar, allowFullscreen, heatmap, chapters, resumeProgress, and volume are all
supported on the Video component. See the Props Reference for the full list.