View a Stream
Play video streams using manifest URLs.
What is a Manifest Player?
A Manifest Player plays video streams using manifest URLs (HLS .m3u8, FLV .flv, or DASH .mpd) rather than connecting directly to a WebRTC call. This is commonly used for:
- Transcoded broadcasts with multiple quality levels
- Archived/recorded streams (VOD - Video on Demand)
- CDN-delivered content
- Scenarios where ultra-low latency isn't required
A Manifest Player plays video streams using a manifest URL (HLS .m3u8, FLV .flv, or DASH .mpd) rather than connecting directly to a WebRTC call. This is commonly used for:
- Transcoded broadcasts with multiple quality levels
- Archived/recorded streams (VOD)
- CDN-delivered content
- Scenarios where ultra-low latency isn't required
Codec Support and the Snapshot Fallback
All live browser formats are encoded as H.264 video with AAC audio — there are no VP9 or AV1 live renditions. Every mainstream browser plays H.264, so this rarely matters in practice, but on a browser or device without H.264 support the player has no playable format.
When that happens the player degrades gracefully and automatically: it emits noDrivers, and shows the stream's live snapshot image as a poster, refreshed on the manifest polling interval — so the viewer still sees a periodically-updating picture of the live stream. This requires nothing from your client code:
- The manifest carries a
jpegformat (formats.jpeg.encodings[]at several resolutions) and apreviewImgURL; the player picks the best fit and sets it as the video poster (displayPosteroption, on by default). - The images come from the platform's snapshot service, so they are only available while the stream is live and producing snapshots.
Subscribe to noDrivers and the manifest event (see Player Events & Liveness) if you want to detect this state and adjust your UI.
Each tab below hands the player a manifestUrl. Get it from the stream-detail response: the manifestUrl field is a complete URL ending in <streamId>.json — treat it as opaque and pass it to the playback SDK verbatim, never constructing or modifying it yourself. The same response also carries vfManifestUrl, the video-foundation manifest for that stream; this guide uses manifestUrl only. See Manifests.
Player components
The React Native SDK, @video/react-native-sdk, ships two player components. Both take the manifestUrl from the stream-detail response and a session from getSession. Install the SDK and its pinned peer packages first, as described in the React Native tab of Installation.
VideoPlayer
VideoPlayer plays HLS only, with no WebRTC path, and adds live DVR: it switches between live and DVR modes on its own, and its ref exposes rewind, seekTo, goLive, and refetch. Use it when you want dependable HLS playback and the extra latency of HLS is acceptable.
import React, { useRef } from 'react';
import { View, Button } from 'react-native';
import { VideoPlayer, VideoPlayerMethods, getSession } from '@video/react-native-sdk';
export default function HlsPlayer({ manifestUrl }: { manifestUrl: string }) {
const videoRef = useRef<VideoPlayerMethods>(null);
const session = getSession({
backendEndpoint: '<your backend endpoint>',
displayName: 'Viewer',
streamName: 'viewer',
});
return (
<View style={{ flex: 1 }}>
<VideoPlayer
ref={videoRef}
manifestUrl={manifestUrl}
session={session}
autoplay
style={{ width: '100%', height: 200 }}
onLoad={() => console.log('Video loaded')}
onError={(error) => console.error('Video error:', error)}
/>
<View style={{ flexDirection: 'row', justifyContent: 'space-around', marginTop: 10 }}>
<Button title="Rewind 10s" onPress={() => videoRef.current?.rewind(10)} />
<Button title="Go live" onPress={() => videoRef.current?.goLive()} />
</View>
</View>
);
}
ManifestPlayer
ManifestPlayer plays WebRTC and falls back to HLS on its own. It is a render-prop component: it hands you the manifestPlayer instance and you draw it with ManifestPlayerVideo, which renders the video and, when you ask for them, play/pause and quality controls.
import React from 'react';
import { ManifestPlayer, ManifestPlayerVideo, getSession } from '@video/react-native-sdk';
export default function LowLatencyPlayer({ manifestUrl }: { manifestUrl: string }) {
const session = getSession({
backendEndpoint: '<your backend endpoint>',
displayName: 'Viewer',
streamName: 'viewer',
});
return (
<ManifestPlayer manifestUrl={manifestUrl} session={session} autoplay muted={false}>
{({ manifestPlayer }) => (
<ManifestPlayerVideo manifestPlayer={manifestPlayer} showControls showQualitySelect />
)}
</ManifestPlayer>
);
}
To overlay your own UI on the video, swap ManifestPlayerVideo for ManifestPlayerVideoCustomControls and pass your controls as children.
Choosing a player
- Use
VideoPlayerfor HLS-only playback with DVR controls and the lower overhead of a single driver. - Use
ManifestPlayerwhen viewers need WebRTC latency and you want the SDK to fall back to HLS without extra code.
Component reference
VideoPlayer props
| Prop | Type | Default | Description |
|---|---|---|---|
manifestUrl | string | - | Required. Manifest URL for streaming |
session | Session | - | Required. User session for authentication |
autoplay | boolean | false | Start playback automatically when ready |
muted | boolean | false | Start with audio muted |
preferredScoreLevel | TranscodeScoreLevel | SourceScoreLevel | - | Preferred quality level |
videoClientOptions | VideoClientOptions | - | Additional video client configuration options |
debounceInitTime | number | 500 | Debounce time for initialization in milliseconds |
delegate | VideoPlayerDelegate | - | Delegate for handling player events |
style | ViewStyle | - | Style object for the video container |
children | ReactNode | - | Custom UI elements to overlay on the video |
key | string | number | - | React key prop |
progressUpdateInterval | number | - | Progress updates interval in milliseconds |
resizeMode | ResizeMode | - | Video resize mode (contain, cover, stretch) |
preventsDisplaySleepDuringVideoPlayback | boolean | true | Prevents the device screen sleeping during playback |
allowsExternalPlayback | boolean | true | Allows video to be played on external devices |
paused | boolean | false | Controls video playback state |
rate | number | 1.0 | Playback speed rate |
onProgress | function | - | Callback for playback progress updates |
onLoad | function | - | Callback called when the video loads |
onEnd | function | - | Callback called when the video ends |
onError | function | - | Callback called on a video error |
onFullscreenPlayerDidDismiss | function | - | Callback when the fullscreen player is dismissed |
onPlaybackStateChanged | function | - | Callback when the playback state changes |
onLiveDvrStateChange | function | - | Callback when transitioning between live and DVR modes |
ref | RefObject<VideoPlayerMethods> | - | Ref object for the methods below |
The VideoPlayer ref exposes four methods:
rewind(seconds: number): void;
seekTo(seek: number): void;
goLive(): void;
refetch(): void;
ManifestPlayer props
| Prop | Type | Default | Description |
|---|---|---|---|
manifestUrl | string | - | Required. Manifest URL for streaming |
session | Session | - | Required. User session for authentication |
players | ('webrtc' | 'native-hls')[] | [{ id: 'webrtc' }] | Array of player drivers to use |
autoplay | boolean | false | Start playback automatically when ready |
muted | boolean | false | Start with audio muted |
preferredScoreLevel | TranscodeScoreLevel | SourceScoreLevel | - | Preferred quality level |
videoClientOptions | VideoClientOptions | - | Additional video client configuration options |
debounceInitTime | number | 500 | Debounce time for initialization in milliseconds |
delegate | ManifestPlayerDelegate | - | Delegate for handling player events |
children | function | - | Render prop receiving the manifestPlayer instance |
ManifestPlayerVideo props
| Prop | Type | Default | Description |
|---|---|---|---|
manifestPlayer | ManifestPlayer | - | Required. Player instance from the render prop |
style | ViewStyle | - | Style object for the video container |
showControls | boolean | false | Show play/pause/refresh controls (WebRTC only) |
showDriver | boolean | false | Show the current driver |
showQualitySelect | boolean | false | Show the quality selection dropdown |
ManifestPlayerVideoCustomControls props
| Prop | Type | Default | Description |
|---|---|---|---|
manifestPlayer | ManifestPlayer | - | Required. Player instance from the render prop |
style | ViewStyle | - | Style object for the video container |
key | string | number | - | React key prop |
children | ReactNode | - | Custom UI elements to overlay on the video |
ref | RefObject<any> | - | Ref object for the video element methods |
progressUpdateInterval | number | - | Progress updates interval in milliseconds |
resizeMode | ResizeMode | - | Video resize mode (contain, cover, stretch) |
preventsDisplaySleepDuringVideoPlayback | boolean | true | Prevents the device screen sleeping during playback |
allowsExternalPlayback | boolean | true | Allows video to be played on external devices |
paused | boolean | false | Controls video playback state |
muted | boolean | false | Start with audio muted |
rate | number | 1.0 | Playback speed rate |
onProgress | function | - | Callback for playback progress updates |
onLoad | function | - | Callback called when the video loads |
onEnd | function | - | Callback called when the video ends |
onError | function | - | Callback called on a video error |
onFullscreenPlayerDidDismiss | function | - | Callback when the fullscreen player is dismissed |
onPlaybackStateChanged | function | - | Callback when the playback state changes |
getSession
getSession creates and returns the Session object every component takes. It accepts one options object:
| Parameter | Type | Required | Description |
|---|---|---|---|
backendEndpoint | string | Yes | Your backend endpoint URL |
displayName | string | Yes | Display name for the session |
streamName | string | Yes | Unique stream identifier |
debug | boolean | No | Enable debug mode (default false) |
supportWebRTC | boolean | No | Enable WebRTC support (default true) |
Encoder, the broadcasting component, takes a single session prop; the Quickstart React Native tab shows it in use.
Requirements and permissions
The SDK needs React Native 0.78.0 or later, React 18.2.0 or later, iOS 15.1 or later, and Android API 24 or later. Playback needs the INTERNET permission on Android; an app that also broadcasts needs camera and microphone permissions too, as shown in the Quickstart.
If the player stays blank, check that the manifest URL is correct and reachable from the device, and that the network permission is declared. Check these first. If both are fine, check viewer authorization (see Private Stream Viewer Auth).
Key Concepts
Player
The Player instance manages video playback:
- Loads and parses manifest files
- Handles adaptive bitrate streaming (automatically switches quality based on network conditions)
- Provides playback control methods (
play(),pause(),mute(),unmute()) - Manages audio and video state
Manifest URL
A manifest file contains information about available video streams:
- HLS (.m3u8): Apple's HTTP Live Streaming format, widely supported
- DASH (.mpd): MPEG-DASH format, ISO standard for adaptive streaming
- FLV (.flv): Flash Video format, used for low-latency streaming
- JSON: Native Frame's multi-format manifest containing all available options
Adaptive Bitrate Streaming
The player automatically adjusts video quality based on:
- Available bandwidth
- Device capabilities
- Buffer health
- Network conditions
This ensures smooth playback with minimal buffering.
Player Properties
Key properties for controlling playback:
localVideoPaused: Check if video is pausedlocalAudioMuted: Check if audio is mutedlocalAudioVolume: Get/set volume (0-1 range)
Manifest Player vs WebRTC Player
| Feature | Manifest Player | WebRTC Player |
|---|---|---|
| Connection | HLS/FLV/DASH URLs | Direct to live calls |
| Authentication | None for a public manifest; a private stream passes auth: authClient (contexts manifest / manifest-headers) | Required |
| Adaptive Bitrate | Supported | N/A |
| Latency | Higher (3-30 seconds) | Ultra-low (sub-second) |
| Best For | VOD, CDN-delivered content | Real-time interaction |
A public manifest plays with no credential. For a private stream, pass auth: authClient in the requestPlayer options — the auth client attaches your token to the manifest request (manifest context) or to its request headers (manifest-headers context), and the same option covers the WebRTC driver. See Private Viewer for the full pattern.
Next Steps
To learn more about the video-client-core library and advanced features:
- Explore creating a call stream for low-latency viewing