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.
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.
- Mattebox playermain · + mattebox v0.21.0, full preset134.3 KB
- shaka player + uiv5.2.10 · the ui build, es2021295.6 KB
- bitmovin player, modulesv8.279.0 · HLS, DASH, MPEG-TS, DRM, its ui425.5 KB
- video.js 10 + hls.js + dash.jsv10.4.0 · skin, hlsjs- and dash-video501.6 KB
- bitmovin playerv8.279.0 · the full bundle, with its ui633.8 KB
- theoplayerv11.13.0 · the full bundle, with its ui721.0 KB
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.
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 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.
Engine
The adaptive streaming engine for HLS and DASH: a kernel and the stages you add.
mattebox0.18.0Player
The <mattebox-player> element and its controls.
@mattebox/player0.11.0Player core
The headless layer under the element: sources, handlers, and the session.
@mattebox/player-core0.6.0Playlist
A list of items for the player: next, previous, repeat, shuffle, and an up next card.
@mattebox/player-playlist1.2.2Ads
Ads in the player: HLS interstitials, DASH alternative MPD, SCTE-35, VAST and VMAP, with the ad controls and the beacons.
@mattebox/player-ads0.3.2Preferences
The viewer's tracks, volume, rate, quality and subtitle look, kept across programmes.
@mattebox/player-preferences0.1.2Live captions
Captions written from the video's own speech, by the browser's speech recognition.
@mattebox/player-live-captions0.1.0Transcript
The subtitles of a programme as a list of lines with a search, in a panel over the player.
@mattebox/player-transcriptunreleasedSubtitle translation
The subtitles in a language the stream lacks, translated by the browser on the device.
@mattebox/player-subtitle-translation0.3.0360° 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-3600.12.2Diagnostics
Playback stats, charts, engine state and browser support, inside the player.
@mattebox/player-diagnostics0.4.0TV navigation
Remote control navigation for the player on Tizen, webOS and other TVs.
@mattebox/player-spatial-nav0.8.2Cast sender
Chromecast from the player: the cast button and the screen shown while casting.
@mattebox/player-cast0.4.1Cast receiver
The bridge between Google's Cast receiver framework and the player.
@mattebox/cast-receiverStart
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><script src="https://cdn.jsdelivr.net/npm/mattebox@0.21.0/dist/cdn/mattebox.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/@mattebox/player@0.18.0/dist/cdn/mattebox-player.min.js" defer></script>
<mattebox-player src="https://example.com/master.m3u8"></mattebox-player>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.
Try it
Do not take our word for it
Every one of these opens in your browser and takes your own stream.
Player demo
The player with every control. Load your own stream, switch controls on and off, and copy the markup the page writes for you.
Engine playground
The engine with nothing hidden: the event log, the buffer timeline, the manifest, network faults you can inject, and a stage list you can edit.
Player editor
Restyle the player in the browser: a stylesheet, the markup, and a live preview side by side.
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.
| Protocols and formats | 0.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 | |
| Live | 0.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 | |
| Quality | 0.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 | |
| DRM | 0.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 captions | 0.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 | |
| Audio | 0.00 |
| Alternate audio, Localized track names, Audio description and SDH labels, Channel layout of each track, Audio menu, Audio-only sources | |
| Navigation in the content | 0.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 | |
| Network | 0.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 player | 0.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 analytics | 0.00 |
| Content API connectors, Preloaded programme data, Next programme resolved ahead, Metadata from your API, Analytics trackers, Session and device IDs | |
| Ads | 0.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 | |
| Playlist | 0.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 casting | 0.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 | |
| Diagnostics | 0.00 |
| Stats and the engine trace, Trace replay, Quality of experience metrics, A diagnostics panel in the player, Typed events and error codes | |
| Impressions | Unlimited |
| Domains | Unlimited |
| Seats | Unlimited |
| Licence key | None |
| Sales calls | 0 |
| Total due | 0.00 |