Skip to main content

What is Playback?

When you stream video, you need two things: a way to send video (ingest) and a way for viewers to watch it (playback). This guide focuses on the playback side, how viewers watch your stream.

The Playback Paths

There are different playback paths you can use to watch your stream:

Direct WebRTC/WHEP (Ultra-Low Latency)

Best use case is for small audiences (under 1,000 viewers), interactive streams, real-time applications.
ProsCons
Nearly instant playback (sub-second latency)Expensive at scale (each viewer needs a dedicated connection)
Great for two-way interaction (gaming, auctions, sports betting)Limited to ~1,000 concurrent viewers per stream
Not all browsers/devices support it well

Workflow Diagram

HLS/DASH via CDN (Scalable)

Best use case is for large audiences, reliable playback, broad device support
ProsCons
Scales to millions of viewersHigher latency (typically 10-30 seconds)
Works on virtually all devicesNot suitable for real-time interaction
Cost-effective for large audiences
CDN handles traffic spikes

Workflow Diagram

Livepeer Studio

Livepeer Studio supports both WebRTC and HLS protocols within a single workflow. Best use case for development and testing. Livepeer Studio can also be used on a smaller scale for production

Choosing the right playback path

CriteriaHLS PlaybackWHEP PlaybackLivepeer Studio
What It IsHTTP Live Streaming - segment-based protocolWebRTC HTTP Egress Protocol - real-time WebRTC streamingManaged video infrastructure platform
Latency6-30+ seconds< 1 second (sub-second)Both available (HLS + WebRTC)
CompatibilityNear-universal (all browsers, devices, smart TVs)Modern browsers with WebRTC supportBoth HLS and WebRTC endpoints provided
Best ForMaximum device compatibility, large-scale broadcasting, VOD contentUltra-low latency, real-time interaction, two-way communicationQuick development, MVP/prototyping, flexible infrastructure
ScaleThousands to millions of viewersHundreds to low thousands of concurrent viewersTens to low hundreds of viewers
Use CasesLive sports broadcasts, webinars, concerts, on-demand librariesLive trading platforms, multiplayer gaming, interactive Q&A, live auctionsTesting ideas, proof of concepts, projects needing both protocols
Choose WhenLatency of 10-30 seconds is acceptable and reach matters mostReal-time interaction is critical and you have modern audienceYou need to ship fast without managing infrastructure

Example Players for Playback

Eyevinn

As the SDP Offer/Answer exchange is WebRTC media server specific this WebRTC player is designed to be extended with Media Server specific adapters. You can either use one of the included media server adapters or build your own custom adapter. Visit Eyevinn Player

OvenPlayer

OvenPlayer is a JavaScript-based Player that can play Low Latency HLS (LLHLS) and WebRTC streams optimized for OvenMediaEngine. It provides various APIs, so you can build and operate your media service more easily. Visit OvenPlayer

HLS.js

HLS.js is a JavaScript library that allows you to play HLS streams in the browser. It is a port of the native HLS.js library for Node.js. Visit HLS.js

DASH.js

DASH.js is a JavaScript library that allows you to play DASH streams in the browser. It is a port of the native DASH.js library for Node.js. Visit DASH.js

Example Code

<!DOCTYPE html>
<html>
<head>
    <title>WebRTC Livestream</title>
</head>
<body>
    <video id="player" controls autoplay muted></video>
    
    <script type="module">
        import { WebRTCPlayer } from 'https://cdn.jsdelivr.net/npm/@eyevinn/webrtc-player@2/dist/webrtc-player.js';
        
        const player = new WebRTCPlayer({
            video: document.getElementById('player'),
            type: 'whep',
            statsTypeFilter: '^candidate-*|^inbound-rtp'
        });
        
        // Your WHEP playback URL from your own server
        player.load('<YOUR_WHEP_URL>');
    </script>
</body>
</html>