video-dev /hls.js

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

★ 17,053⑂ 2,780👁 303⑃ 4,766● 3,260▤ 335
TypeScriptNOASSERTIONCreated 2015-01-30hlsjs.video-dev.org/demo
Download: v1.7.4v1.7.4 ↓1.7.42026-10-28
+0
Daily
17,053
stars
2,780
forks
303
watchers
4,766
prs
3,260
issues
335
releases

README

[comment]: < ([![Sauce Test Status]&40;https://saucelabs.com/browser-matrix/robwalch.svg&41;]&40;https://saucelabs.com/u/robwalch&41;)

 !HLS.js

HLS.js is a JavaScript library that implements an [HTTP Live Streaming] client.
It relies on [HTML5 video][] and [MediaSource Extensions][] for playback, and on [Managed Media Source][] where MSE is not available (Safari on iOS 17.1+).

It streams VOD, Live, and Low-Latency HLS assets made up of fragmented MP4 (fMP4), MPEG-2 Transport Stream, or Packed Audio segments.
fMP4 segments (ISO BMFF, including CMAF) are passed through to MSE without remuxing, while MPEG-2 TS and Packed Audio (AAC, MP3, and AC-3) segments are transmuxed into fMP4.
Transmuxing is performed asynchronously using a [Web Worker] when available in the browser.

HLS.js streams media into a standard HTML  element, which handles decoding, rendering, playback, and seeking.
Control playback through the [HTMLMediaElement] API, and use HLS.js to load assets, choose quality levels and tracks, and listen for streaming events.
For assets with Interstitials, use hls.interstitialsManager to seek and track position on the integrated timeline of primary content and interstitial breaks.

HLS.js is written in [TypeScript] and transpiled using [Babel] to ECMAScript 5 syntax for the UMD bundles, and to native ES module syntax for the ESM bundles.
The [TypeScript compiler] and [API Extractor] are used for type checking and to generate the hls.d.ts type declarations.

[Rollup] is used to build the distro bundles and, in watch mode, the local development environment. Each release includes:

- full and light builds. The light build leaves out optional features such as alternate audio, subtitles, EME (DRM), CMCD, and Interstitials to reduce size (see Build tasks).
- UMD bundles (hls.js, hls.light.js) for  tags and require. They target browsers as old as Chrome 47, Firefox 51, and Safari 10, and inline the transmuxer worker.
- ESM bundles (hls.mjs, hls.light.mjs) for import and modern bundlers. They do not inline the worker; set workerPath to the published hls.worker.js to transmux off the main thread.

See Compatibility for supported browsers and runtime requirements.

[html5 video]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
[htmlmediaelement]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement
[mediasource extensions]: https://w3c.github.io/media-source/
[managed media source]: https://developer.mozilla.org/en-US/docs/Web/API/ManagedMediaSource
[http live streaming]: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis
[web worker]: https://caniuse.com/search=worker
[typescript]: https://www.typescriptlang.org/
[babel]: https://babeljs.io/
[typescript compiler]: https://www.typescriptlang.org/docs/handbook/compiler-options.html
[api extractor]: https://api-extractor.com/
[rollup]: https://rollupjs.org/

 Features

- VOD & Live playlists
  - DVR support on Live playlists
  - Low-Latency HLS (Partial Segments

Top issues

Discussions

Latest release

v1.7.4 v1.7.4 2026-10-28
Summary
HLS.js v1.7.4 includes bug fixes and improvements over the last release.

 Changes Since The Last Release
https://github.com/video-dev/hls.js/compare/v1.7.3...v1.7.4

 Bug fixes and improvements

 Low-latency HLS

- Fix skipping unloaded trailing parts at fragment boundaries (8055) @darfink
- Advance part loading once all parts of a fragment are loaded (8134, follow-up to 8055) @robwalch
- Adjust playlist position using first part start PTS (8105, fixes 8098)
- Fix repeated audio buffer flushing when setting nextAudioTrack during Low-Latency HLS part loading (8104)
- Fix 

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON