Dash.js and hls.js

An adaptive stream is a manifest (.mpd for MPEG-DASH, .m3u8 for HTTP Live Streaming) listing renditions and their segments. A player library reads it, measures throughput, picks a rendition, feeds MSE and handles EME.

Open-source adaptive streaming players (npm 2,036 , September 2026)
Library Formats Version, licence Notes
hls.js 16,957 HLS 1.7.3, Apache-2.0 Transmuxes MPEG-TS to fMP4 in a worker
dash.js 5,548 DASH 5.2.1, BSD-3-Clause DASH Industry Forum reference player
Shaka Player 8,234 DASH, HLS 5.2.10, Apache-2.0 Offline storage in IndexedDB

With hls.js (https://github.com/video-dev/hls.js 16,957 ) (npm i hls.js), call hls.loadSource(url) and hls.attachMedia(video) after checking Hls.isSupported(), but let Safari 10 play HLS natively when video.canPlayType('application/vnd.apple.mpegurl') succeeds. With dash.js (https://github.com/Dash-Industry-Forum/dash.js 5,548 ) (npm i dashjs), dashjs.MediaPlayer().create().initialize(video, 'https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd 217 ', true) starts Big Buck Bunny with autoplay.