finds.dev← search

// the find

video-dev/hls.js

★ 16,760 · TypeScript · NOASSERTION · updated Jun 2026

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.

HLS.js is the de facto standard for playing HLS streams in browsers that don't support it natively, used by Twitter, TED, Dailymotion, and dozens of other production video platforms. It transmuxes MPEG-TS to fMP4 on the fly via Web Worker and feeds it to the MSE API. If you're building a web video player that needs HLS, this is what you use.

The ABR implementation is genuinely good — EWMA bandwidth estimation with three configurable switching modes (instant, smooth, bandwidth-conservative) plus emergency quality drops when bandwidth collapses. The Web Worker transmuxer keeps the main thread clean; parsing and remuxing happen off-thread by default. DRM coverage is real: FairPlay, Widevine, and PlayReady via EME with fMP4, plus AES-128 segment decryption. The 'light' build that strips subtitles, alternate audio, DRM, and CMCD to reduce bundle size is a thoughtful tradeoff for projects that don't need all that.

iOS support before 17.1 is native-only — you still need the `canPlayType` fallback dance, and the ManagedMediaSource path on modern Safari is newer than many teams realize. SAMPLE-AES decryption only works with MPEG-TS segments, not fMP4, which will silently break streams from certain CDNs. The interstitials controller (HLS ad insertion spec) is present but the implementation is complex enough that integration bugs are common, and the spec itself is still moving. No SSR support by design — the library exports a dummy object in Node, which is fine but means server-side playlist pre-processing or SSR frameworks need separate tooling.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →