Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 3, 2026·3 min de lecture

Shaka Player — Adaptive Streaming Video Player by Google

An open-source JavaScript library by Google for playing DASH and HLS content with DRM support, adaptive bitrate switching, and offline storage in any modern browser.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Shaka Player Overview
Commande d'installation directe
npx -y tokrepo@latest install 3eaf1f88-7706-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Shaka Player is a JavaScript library developed by Google for adaptive media playback. It handles DASH and HLS manifest parsing, adaptive bitrate selection, and DRM decryption using Encrypted Media Extensions, providing a robust foundation for building video applications that adapt to varying network conditions.

What Shaka Player Does

  • Plays DASH (MPD) and HLS (m3u8) adaptive streaming content
  • Handles DRM-protected content via Widevine, PlayReady, and FairPlay
  • Performs automatic adaptive bitrate switching based on bandwidth
  • Supports offline storage for downloading and playing content without a network
  • Provides subtitle and caption rendering for WebVTT, TTML, and CEA-608/708

Architecture Overview

Shaka Player parses streaming manifests to build an internal representation of available periods, adaptation sets, and representations. The Adaptive Bitrate Manager monitors download throughput and buffer levels to select the optimal quality variant. Segments are fetched via the Networking Engine (which supports request filtering and retry logic), decrypted through EME if DRM is present, and fed to the browser's Media Source Extensions API for rendering. The modular plugin architecture lets developers replace the ABR algorithm, manifest parser, or networking layer.

Self-Hosting & Configuration

  • Load the compiled script from a CDN or install via npm
  • Create a Player instance and attach it to a video element
  • Call player.configure() to set ABR restrictions, preferred languages, and DRM servers
  • Use player.getNetworkingEngine().registerRequestFilter() for auth token injection
  • Enable offline storage with shaka.offline.Storage for download-and-play workflows

Key Features

  • DASH and HLS support in a single unified library
  • DRM integration with Widevine, PlayReady, and FairPlay
  • Customizable ABR algorithm with bandwidth estimation
  • Offline download and storage for mobile-first applications
  • Comprehensive subtitle support across WebVTT, TTML, and CEA formats

Comparison with Similar Tools

  • HLS.js — HLS-only; Shaka Player supports both DASH and HLS natively
  • DASH.js — DASH-only reference player; Shaka Player adds HLS, DRM, and offline
  • Video.js — UI-focused player; Shaka Player is a headless engine you pair with any UI
  • ExoPlayer — Android-native by Google; Shaka Player is the web equivalent

FAQ

Q: Does Shaka Player include a video player UI? A: It includes an optional default UI, but it is primarily a playback engine. You can build a custom UI on top of its API.

Q: Which DRM systems does it support? A: Widevine (Chrome, Android, Firefox), PlayReady (Edge, Xbox), and FairPlay (Safari) via the Encrypted Media Extensions API.

Q: Can I use it for live streaming? A: Yes. Shaka Player handles live DASH and HLS streams with low-latency modes and DVR window support.

Q: Does it work on mobile browsers? A: Yes. It works on Chrome for Android, Safari on iOS (HLS), and other MSE-capable mobile browsers.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires