Navigate:
All Reposhls.js
~$HLSJS0.1%

HLS.js: HTTP Live Streaming client for browsers

JavaScript HLS client with MPEG-TS to MP4 transmuxing.

LIVE RANKINGS • 09:14 AM • STEADY
OVERALL
#191
40
FRONTEND
#18
9
30 DAY RANKING TREND
ovr#191
·Front#18
STARS
16.4K
FORKS
2.7K
DOWNLOADS
2.1M
7D STARS
+9
7D FORKS
+1
See Repo:
Share:

Learn more about hls.js

HLS.js is a JavaScript library that implements an HTTP Live Streaming client for web browsers. It works by transmuxing MPEG-2 Transport Stream and AAC/MP3 audio into ISO BMFF (MP4) fragments, with transmuxing performed asynchronously using Web Workers when available. The library is written in ECMAScript6 and TypeScript, then transpiled to ES5 using Babel and the TypeScript compiler. It supports both VOD and live playlists with features including adaptive bitrate streaming, multiple audio tracks, CEA-608/708 captions, WebVTT subtitles, and DRM via Encrypted Media Extensions.

hls.js

1

Asynchronous transmuxing

Uses Web Workers to perform MPEG-2 TS to MP4 fragment conversion off the main thread, reducing blocking operations during playback.

2

Multiple container support

Handles MPEG-2 TS, fragmented MP4, AAC, and MPEG Audio containers with support for H.264, H.265, AAC, MP3, AC-3, and ID3 metadata streams.

3

Granular quality control

Provides three distinct adaptive bitrate switching modes (instant, smooth, and bandwidth-conservative) with level capping based on resolution, dropped frames, and HDCP support.


npm install hls.js

vv1.6.14

Bug-fix release resolving two Interstitial-related exceptions on legacy platforms and with DRM setMediaKeys calls.

  • Fixes exception when calling setMediaKeys with Interstitial preroll (#7608).
  • Fixes exception on legacy platforms where media.play() does not return a Promise with Interstitials (#7581).
vv1.7.0-alpha.0

Alpha release branching v1.6.x for LTS maintenance; merges v1.7.0 milestone changes into master for development.

  • Release notes do not specify breaking changes, new requirements, or migration steps for this alpha.
  • Consult the roadmap and project board for planned v1.7.0 features; canary builds available on deployments page.
vv1.6.13

Fixes three regressions from v1.6.6 and v1.6.11: live seeking with timestamp wrapping, FairPlay parsing errors, and Widevine key ID extraction.

  • Upgrade to resolve fragParsingError when seeking backward in live streams with wrapped timestamps (regression from v1.6.6).
  • Apply this patch if you hit FairPlay or Widevine key parsing failures introduced in v1.6.11 when KEYID attributes are missing.


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers