hls.js is a JavaScript player library that enables HTTP Live Streaming playback in web browsers using the Media Source Extensions API. It functions as an adaptive bitrate streaming engine and a media streamer that manages the buffering and playback of video segments.
The library features specialized capabilities for low latency streaming and digital rights management, allowing it to decrypt protected content via Encrypted Media Extensions. It includes a metadata processor for handling ID3 tags and date-range elements, as well as a pluggable loader interface to replace default network request logic for peer-to-peer streaming or testing.
The project covers a broad range of playback management areas, including adaptive quality adjustment, buffer eviction, and state-based error recovery. It also handles media accessibility through caption and subtitle rendering, media track switching, and the tracking of playback metrics and frame drops.