hls.js

github.com ↗

HLS playback with live DVR and low-latency features

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about hls.js

Answers use saved listing facts and recorded sources.

What it does

hls.js implements HLS playback for compatible browser environments, including live playlists, DVR and low-latency HLS features.

Load the library, check Hls.isSupported(), create an Hls instance, load the .m3u8 URL and attach it to a video element. The sample falls back to native HLS when the library is unsupported and the browser can play HLS. Stream resources need CORS headers allowing GET requests. Its feature list includes live DVR and low-latency HLS, but advanced video and audio codecs remain dependent on the browser runtime. A JavaScript player does not supply a missing system decoder.

Choose the build deliberately. UMD bundles suit script tags, while ESM bundles suit imports and modern bundlers; ESM requires a separate worker path for off-main-thread transmuxing. Light builds omit features including alternate audio, subtitles and DRM, so a smaller download can remove functions the stream needs.

Strengths

  • The repository documents live DVR and low-latency HLS features.

Watch out for

  • Codec playback depends on the browser runtime.

Sources