Open source · MIT

HLS and DASH.
Everything in the box.
Half the weight.

Mattebox is a player for the web: an engine, a player element, and the accessories around them. It plays what the paid players play, in 134 KB. That is 45% of the next smallest player.

Get startedOpen the demo

Protocol
134 KBThe whole player, engine inside
95 KBThe engine with every stage
27 KBThe kernel alone
0Runtime dependencies
MITLicence

Size

Your viewers download less

A player with its interface, HLS and DASH, bundled from npm the same way for each. The repository measures this on every release, and you can run the script yourself.

  1. Mattebox playermain · + mattebox v0.21.0, full preset134.3 KB
  2. shaka player + uiv5.2.10 · the ui build, es2021295.6 KB
  3. bitmovin player, modulesv8.279.0 · HLS, DASH, MPEG-TS, DRM, its ui425.5 KB
  4. video.js 10 + hls.js + dash.jsv10.4.0 · skin, hlsjs- and dash-video501.6 KB
  5. bitmovin playerv8.279.0 · the full bundle, with its ui633.8 KB
  6. theoplayerv11.13.0 · the full bundle, with its ui721.0 KB
min+gzip · KB · each stack bundled from npm the same way, with its styles (lower is better)

The Mattebox bar is the default ES2015 build, and the Shaka Player bar its smaller ES2021 build. The THEOplayer bar leaves out the transmuxer it loads at run time for MPEG-TS. What each bar counts.

See the engines and the presets compared

Features

Small does not mean less

143 features, each with its docs. Low-latency HLS and DASH. Widevine, PlayReady and FairPlay. Subtitles and captions in six formats, IMSC1 images included. Live captions from speech, and subtitles translated on the device, in Chrome. Thumbnails, chapters and trick play. Chromecast with DRM, and TV remotes. Controls in 12 languages. Your content API through connectors, and the trackers your page adds. HLS interstitials, SCTE-35, VAST and VMAP ads.

Protocols and formats

One engine reads HLS and DASH, in the containers streams are packaged in.

  • HLS with fragmented MP4 (CMAF)
  • DASH on demand and live
  • WebM in DASH
  • Multi-period DASH
  • HLS with MPEG-TS segments
  • HEVC in MPEG-TS segments
  • Packed audio (AAC with ID3)
  • AES-128 encrypted segments
  • Codec detection from the init segment
  • Native HLS in Safari
  • Progressive MP4 and MP3
  • Safari on iPhone and iPad

Live

Sliding windows, the live edge, and wall-clock time.

  • Live HLS and live DASH
  • DVR window
  • Low-latency HLS
  • Low-latency DASH
  • Live catch-up
  • Jump to live
  • Live latency measurement
  • Program date time
  • CMAF timing

Quality

Adaptive bitrate you can constrain, pin, and read.

  • Adaptive bitrate
  • Quality capped to the player's size
  • Quality constraints and pins
  • Codec switching
  • Video tracks
  • Quality switch timing
  • HDR by capability
  • Quality menu
  • Video menu

DRM

Every major key system, in the engine or on a native session.

  • Widevine
  • PlayReady
  • FairPlay
  • WisePlay
  • ClearKey
  • License renewal
  • Custom license requests
  • License request retries
  • Concurrent stream limits
  • License servers per key system and source
  • DRM for native HLS
  • DRM badge in the controls

Subtitles and captions

The formats broadcast and streaming both use.

  • WebVTT
  • Segmented WebVTT
  • TTML
  • IMSC1 image subtitles
  • CEA-608 captions
  • CEA-708 captions
  • Forced subtitles
  • Native text tracks
  • Live captions from speech
  • Subtitle translation
  • Transcript with a search
  • Transcript search of your own
  • Subtitle size and background

Audio

Alternate soundtracks, named for a menu.

  • Alternate audio
  • Localized track names
  • Audio description and SDH labels
  • Channel layout of each track
  • Audio menu
  • Audio-only sources

Navigation in the content

What a viewer scrubs, skips and jumps with.

  • Thumbnails
  • Chapters
  • Trick play
  • Scrubbing
  • Frame previews from the stream
  • Timed metadata
  • Skip intro and credits
  • Blocked ranges
  • Chapters menu
  • Skip back and forward buttons
  • Seek preview over the bar

Network

Hooks on every request, and the CDN standards.

  • Request and response hooks
  • Retries and recovery
  • Stall recovery and gap jumping
  • Suspend and resume
  • CMCD
  • CMSD
  • Content steering
  • Preloading of the next source
  • Source fallback
  • Source switch in place

The player

A custom element and the controls you place inside it.

  • Framework-free custom element
  • Composable controls
  • Styling with parts and tokens
  • Labels in any language
  • Controls in 12 languages
  • Blocked content messages
  • Persistent viewer preferences
  • Keyboard and media keys
  • Touch controls
  • Screen reader support
  • Responsive control bar
  • Custom icons and controls
  • Menu items of your own
  • Layouts by player width
  • Fullscreen and picture in picture
  • AirPlay
  • Playback speed menu
  • 360° video
  • Stereoscopic 360° video
  • 360° video in a WebXR headset
  • 360° video split in two for a phone in a viewer
  • Headless core
  • CDN script tags

Your content and your analytics

You load a programme by its id or its data, and you add the trackers your page needs.

  • Content API connectors
  • Preloaded programme data
  • Next programme resolved ahead
  • Metadata from your API
  • Analytics trackers
  • Session and device IDs

Ads

The breaks your stream signals, and the ads your ad server returns.

  • HLS interstitials
  • DASH alternative MPD
  • SCTE-35 breaks
  • Promos, credits and chapters from SCTE-35
  • SVTA2053 ad creatives
  • VAST 2 to 4.3
  • VMAP 1.0.1
  • Scheduled ad breaks
  • Ad decisions for live cue-outs
  • Ad beacons
  • Ad controls in 12 languages
  • Ad breaks on the seek bar

Playlist

A list of items, from markup or from a script.

  • Next, previous, repeat and shuffle
  • Playlist panel
  • Up next card with a countdown
  • Next item preload
  • Lock screen and media keys
  • Failed items skipped

TV and casting

The living room: remotes, Chromecast, and 2021 TVs.

  • Samsung Tizen and LG webOS, from 2021 models
  • Remote control navigation
  • Remote seeking
  • Game controllers
  • Chromecast sender
  • DRM and signed URLs on the Chromecast
  • The player's own controls during a cast
  • The programme on the receiver
  • Chromecast receiver

Diagnostics

See what the player did, and send it to someone who can read it.

  • Stats and the engine trace
  • Trace replay
  • Quality of experience metrics
  • A diagnostics panel in the player
  • Typed events and error codes

The full table

The kit

Take the parts you need

Each part is a package with its own versions and its own docs. An engine alone, a player with no interface, or all of it.

0.21.0

Engine

The adaptive streaming engine for HLS and DASH: a kernel and the stages you add.

mattebox
0.18.0

Player

The <mattebox-player> element and its controls.

@mattebox/player
0.11.0

Player core

The headless layer under the element: sources, handlers, and the session.

@mattebox/player-core
0.6.0

Playlist

A list of items for the player: next, previous, repeat, shuffle, and an up next card.

@mattebox/player-playlist
1.2.2

Ads

Ads in the player: HLS interstitials, DASH alternative MPD, SCTE-35, VAST and VMAP, with the ad controls and the beacons.

@mattebox/player-ads
0.3.2

Preferences

The viewer's tracks, volume, rate, quality and subtitle look, kept across programmes.

@mattebox/player-preferences
0.1.2

Live captions

Captions written from the video's own speech, by the browser's speech recognition.

@mattebox/player-live-captions
0.1.0

Transcript

The subtitles of a programme as a list of lines with a search, in a panel over the player.

@mattebox/player-transcript
unreleased

Subtitle translation

The subtitles in a language the stream lacks, translated by the browser on the device.

@mattebox/player-subtitle-translation
0.3.0

360° video

A 360° video seen from inside: turned by a drag, the wheel, a game controller or the device, and shown in a VR headset.

@mattebox/player-360
0.12.2

Diagnostics

Playback stats, charts, engine state and browser support, inside the player.

@mattebox/player-diagnostics
0.4.0

TV navigation

Remote control navigation for the player on Tizen, webOS and other TVs.

@mattebox/player-spatial-nav
0.8.2

Cast sender

Chromecast from the player: the cast button and the screen shown while casting.

@mattebox/player-cast
0.4.1

Cast receiver

The bridge between Google's Cast receiver framework and the player.

@mattebox/cast-receiver

Start

Install it and write one tag

The player is a custom element. It works in plain HTML and in any framework, from npm or from a CDN.

npm install @mattebox/player mattebox
<mattebox-player src="https://example.com/master.m3u8"></mattebox-player>

<script type="module">
  import '@mattebox/player';
</script>

Read the getting started chapter

Runs on

Browsers
Chrome, Edge, Firefox and Safari, desktop and mobile.
Safari
HLS goes to the browser where that is better, with FairPlay and AirPlay.
TVs
Samsung Tizen and LG webOS from 2021 models. The floor is Chromium 76.
Chromecast
A sender in the player, and a receiver you host.

Pricing

Here is the invoice

A commercial player bills you by the impression, by the domain, or by the feature. Mattebox is MIT licensed. You get all of it, and you owe nothing.

Get startedCompare the players

MatteboxInvoice 0000
What Mattebox costs
Protocols and formats0.00
HLS with fragmented MP4 (CMAF), DASH on demand and live, WebM in DASH, Multi-period DASH, HLS with MPEG-TS segments, HEVC in MPEG-TS segments, Packed audio (AAC with ID3), AES-128 encrypted segments, Codec detection from the init segment, Native HLS in Safari, Progressive MP4 and MP3, Safari on iPhone and iPad
Live0.00
Live HLS and live DASH, DVR window, Low-latency HLS, Low-latency DASH, Live catch-up, Jump to live, Live latency measurement, Program date time, CMAF timing
Quality0.00
Adaptive bitrate, Quality capped to the player's size, Quality constraints and pins, Codec switching, Video tracks, Quality switch timing, HDR by capability, Quality menu, Video menu
DRM0.00
Widevine, PlayReady, FairPlay, WisePlay, ClearKey, License renewal, Custom license requests, License request retries, Concurrent stream limits, License servers per key system and source, DRM for native HLS, DRM badge in the controls
Subtitles and captions0.00
WebVTT, Segmented WebVTT, TTML, IMSC1 image subtitles, CEA-608 captions, CEA-708 captions, Forced subtitles, Native text tracks, Live captions from speech, Subtitle translation, Transcript with a search, Transcript search of your own, Subtitle size and background
Audio0.00
Alternate audio, Localized track names, Audio description and SDH labels, Channel layout of each track, Audio menu, Audio-only sources
Navigation in the content0.00
Thumbnails, Chapters, Trick play, Scrubbing, Frame previews from the stream, Timed metadata, Skip intro and credits, Blocked ranges, Chapters menu, Skip back and forward buttons, Seek preview over the bar
Network0.00
Request and response hooks, Retries and recovery, Stall recovery and gap jumping, Suspend and resume, CMCD, CMSD, Content steering, Preloading of the next source, Source fallback, Source switch in place
The player0.00
Framework-free custom element, Composable controls, Styling with parts and tokens, Labels in any language, Controls in 12 languages, Blocked content messages, Persistent viewer preferences, Keyboard and media keys, Touch controls, Screen reader support, Responsive control bar, Custom icons and controls, Menu items of your own, Layouts by player width, Fullscreen and picture in picture, AirPlay, Playback speed menu, 360° video, Stereoscopic 360° video, 360° video in a WebXR headset, 360° video split in two for a phone in a viewer, Headless core, CDN script tags
Your content and your analytics0.00
Content API connectors, Preloaded programme data, Next programme resolved ahead, Metadata from your API, Analytics trackers, Session and device IDs
Ads0.00
HLS interstitials, DASH alternative MPD, SCTE-35 breaks, Promos, credits and chapters from SCTE-35, SVTA2053 ad creatives, VAST 2 to 4.3, VMAP 1.0.1, Scheduled ad breaks, Ad decisions for live cue-outs, Ad beacons, Ad controls in 12 languages, Ad breaks on the seek bar
Playlist0.00
Next, previous, repeat and shuffle, Playlist panel, Up next card with a countdown, Next item preload, Lock screen and media keys, Failed items skipped
TV and casting0.00
Samsung Tizen and LG webOS, from 2021 models, Remote control navigation, Remote seeking, Game controllers, Chromecast sender, DRM and signed URLs on the Chromecast, The player's own controls during a cast, The programme on the receiver, Chromecast receiver
Diagnostics0.00
Stats and the engine trace, Trace replay, Quality of experience metrics, A diagnostics panel in the player, Typed events and error codes
ImpressionsUnlimited
DomainsUnlimited
SeatsUnlimited
Licence keyNone
Sales calls0
Total due0.00