hls.js
A strong pick. 1st of 11 video and audio players.
hls.js is the standard JavaScript engine for HLS streams in browsers that have MSE. It is actively maintained and other players such as Video.js 10, Mux Player and Vidstack build on it, which makes it the strongest pick for HLS playback with your own UI. It has no UI and plays only HLS, and two of its canary builds on npm were flagged as malicious in April 2026.
Best for: Teams that stream HLS (live, low-latency or VoD) and want a lean, well-maintained engine under their own player or UI.
Scores
Overall8.2
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 8.0, likely 7.0 to 8.5
For HLS playback it is the default engine, with strong depth, active maintenance and growing use through the players built on it. It is not a complete player and does not do DASH, and the April 2026 malicious canary builds call for pinned stable versions and a careful look at lockfiles. Pick Shaka Player when you need DASH or offline DRM, and Video.js or Vidstack when you want a ready-made UI.
- npm downloadsLast4Weeks: Fast growth, well above the median.
- osv.dev/vulnerability/MAL-2026-3019: Supply-chain incident affecting canary builds.
- blog.blazingcdn.com/en-us/shaka-player-vs-videojs-vs-hls-js-choosing-a-web-player: Recommended for HLS-only work.
GPT-6.2 Sol: 8.4, likely 7.3 to 9.3
hls.js is a leading choice for new projects that need a configurable HLS engine under their own controls. Detailed playback APIs, regular fixes, above-baseline download growth, and use by established players support the recommendation. Video.js suits projects that want a ready-made player interface, and Shaka Player covers HLS and DASH in one engine. Browser-specific behavior and the unresolved canary advisory widen the range.
- github.com/video-dev/hls.js/releases/tag/v1.7.4: Current stable release fixes low-latency playback and fragment loading.
- videojs.org/docs/framework/html/reference/components/mux-video: Video.js offers an hls.js integration and documents when to choose it.
- github.com/shaka-project/shaka-player: Shaka supports both HLS and DASH.
- docs.jwplayer.com/players/docs/jw8-changelog: JW Player documents recent use and playback fixes.
- github.com/github/advisory-database/issues/7495: The cause of the two canary takedowns remains disputed.
Needed by many4.5
How many developers need a tool for this job?
Claude Opus 5.5: 4.5, likely 3.5 to 5.5
Adaptive HLS streaming is a clear but sizable niche: video platforms, live streaming, OTT, and e-learning. Most web apps just embed a file or a hosted player and never call an HLS engine directly. Many developers still use it indirectly through players that wrap it.
- blog.blazingcdn.com/en-us/shaka-player-vs-videojs-vs-hls-js-choosing-a-web-player: Positions hls.js as the HLS-only engine with no UI.
- github description: Plays HLS in browsers that support MSE.
GPT-6.2 Sol: 4.5, likely 3.4 to 5.6
Adaptive HLS matters to teams building live and on-demand streaming sites, and hls.js works across JavaScript frameworks. Its scope is one streaming format, while ordinary audio and video files can play through HTML media elements. Industry surveys cover streaming teams, which leaves the share of all JavaScript and TypeScript projects uncertain.
- github.com/video-dev/hls.js/blob/v1.7.4/README.md: HLS-only engine with a standard media element and documented native fallback.
- bitmovin.com/blog/four-shifts-shaping-the-video-stack-2026-2027-vdr: 2026 survey covers 486 streaming-industry respondents across 94 countries.
- github.com/shaka-project/shaka-player: Shaka covers both HLS and MPEG-DASH.
Helps a lot8.7
How well does it do the job for those who need it?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
It is the most complete and widely tested HLS engine in JavaScript. It covers LL-HLS, interstitials, I-frame playlists, CMCD v2, ABR tuning and EME DRM, ships strict TypeScript types, and has zero dependencies. It has no UI and no DASH support, and Safari and iOS edge cases still come up, which keeps it below the top score.
- github.com/video-dev/hls.js/releases: v1.7.0 added I-frame playlists, CMCD v2 and stricter types; later patches fix LL-HLS and DRM.
- blog.blazingcdn.com/en-us/shaka-player-vs-videojs-vs-hls-js-choosing-a-web-player: Nov 2026 comparison recommends it for HLS-only live or VoD with a custom UI.
- dev.to/masonwritescode/playing-hls-through-managed-media-source-on-iphone-with-hlsjs-3cn8: iOS needs ManagedMediaSource, and it can fall back to native HLS without notice.
- npm hasTypes / dependencies: Ships its own types and has zero dependencies.
GPT-6.2 Sol: 8.8, likely 7.7 to 9.7
Stable 1.7.4 gives teams fine control over adaptive quality, live latency, tracks, interstitials, and error recovery. Typed events and documented setup examples give developers and coding agents a clear starting point. A current user report documents a TTML subtitle parsing failure, and the independent playback benchmark predates 1.7.4.
- github.com/video-dev/hls.js/blob/v1.7.4/README.md: Documents supported HLS features, TypeScript declarations, and browser setup.
- github.com/video-dev/hls.js/blob/master/docs/API.md?plain=1: Documents error events, buffer stalls, live-edge behavior, and recovery options.
- github.com/video-dev/hls.js/issues/8148: User reports that namespace-prefixed TTML captions fail in 1.7.4.
- reznik.org/papers/MHV2023_Low_Latency.pdf: Older independent LTE tests found high bitrate with the default settings and longer live delay.
Holds up over time8.4
Will it still be a good choice in two years?
Claude Opus 5.5: 8.5, likely 7.5 to 9.0
Maintenance is active: 499 commits and 15 releases in the last year, a push four days before the data was read, and fixes backported to the 1.6 line. 407 contributors work on it under the video-dev organization, and the ecosystem is moving towards it now that Video.js 10 and Mux build on it. Most of the work still rests on a small core team, which keeps the range open.
- github commitsLastYear / releasesLastYear: 499 commits and 15 releases in the last year.
- github closedIssues / openIssues: 3168 issues closed against 100 open.
- mux.com/blog/video-js-v10-is-ready-for-your-mux-videos: Video.js v10 with Mux uses hls.js under the hood.
GPT-6.2 Sol: 8.2, likely 7.0 to 9.2
The repository logged 499 commits and 15 GitHub releases in a year, and 1.7.4 closes several reported playback bugs. The 1.7 upgrade changed some TypeScript signatures and MPEG-TS timing, with a migration guide and a maintainer response to timing complaints. Funding and release authority are unclear, and Video.js plans to switch the default engine for its Mux video component.
- github commitsLastYear, releasesLastYear, latestRelease: 499 commits, 15 releases, and a stable release on October 28, 2026.
- github.com/video-dev/hls.js/releases/tag/v1.7.4: Patch fixes reported playback issues and credits 18 contributors.
- github.com/video-dev/hls.js/blob/master/MIGRATING.md: Documents tighter types and changes to MPEG-TS timestamps.
- github.com/video-dev/hls.js/issues/8102: A user reported changed start times and received a maintainer response the same day.
- videojs.org/docs/framework/html/reference/components/mux-video: The Mux component plans to default to SPF and retain an explicit hls.js option.
Used widely7.3
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It had 58M downloads in the last 4 weeks, up from 8.2M a year earlier. That ratio of about 7.1 is well above the 4.1 median. Much of the volume is transitive, through Media Chrome, Mux Player, Vidstack and Video.js 10. Still, 3915 dependent repos and 695 dependent packages put it among the leaders of the category.
- npm downloadsLast4Weeks: 58.35M now against 8.23M a year ago, a ratio of about 7.1.
- dependents: 3915 repos and 695 packages; Video.js has 9270 repos and Shaka 3643.
- github stars: 17k stars.
GPT-6.2 Sol: 6.6, likely 5.3 to 8.0
Four-week npm downloads grew from 8.23 million to 58.35 million, a 7.1× ratio above the 4.1× catalog median. Ecosyste.ms found 3,915 dependent repositories, slightly ahead of Shaka Player and well behind Video.js, alongside 695 dependent npm packages. ReactPlayer and downstream video components bring in indirect installs, while CDN use escapes npm counts. The indirect share is uncertain, and six Bluesky posts give a limited check on the trend.
- npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: Downloads grew 7.1× against the 4.1× catalog baseline.
- dependents repos, dependents packages, peers dependentRepos: 3,915 repositories and 695 packages, versus 3,643 repositories for Shaka and 9,270 for Video.js.
- github stars, bluesky posts, peers blueskyPosts: 17,062 stars and six Bluesky links, with sparse activity across the peer set.
- github.com/cookpete/react-player: ReactPlayer documents hls.js as its HLS engine.
- jsdelivr.com/package/npm/hls.js?tab=files: jsDelivr distributes hls.js for direct use in web pages.
Vouched for8.3
Who stands behind it being good?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
Several independent, current players use it as their HLS engine: Mux Player, Media Chrome, Vidstack and Video.js 10. Independent 2026 comparisons recommend it for HLS-only work. Survey data for a tool this specialized is missing.
- mux.com/blog/video-js-v10-is-ready-for-your-mux-videos: Mux and Video.js v10 rely on hls.js in production.
- videojs.org/docs/framework/react/reference/hlsjs-video: Video.js 10 ships an hls.js-based video element.
- blog.blazingcdn.com/en-us/shaka-player-vs-videojs-vs-hls-js-choosing-a-web-player: Third-party comparison recommends it.
GPT-6.2 Sol: 8.6, likely 7.5 to 9.6
JW Player documents shipping hls.js in 2026, Kaltura uses it for HLS in its player, and Cloudflare Stream lists it as an HLS reference player. Video.js still recommends it for low-latency Mux streams and detailed playback analytics. These deployments show practical trust, while independent performance tests on the current release and project-specific satisfaction data remain limited.
- docs.jwplayer.com/players/docs/jw8-changelog: 2026 releases document a bundled hls.js upgrade and playback fixes.
- knowledge.kaltura.com/help/pdfexport/id/6310680daf85a972fa16a2d5: Kaltura identifies hls.js as its HLS playback engine.
- developers.cloudflare.com/stream/viewing-videos/using-own-player/web: Cloudflare Stream lists hls.js as an HLS reference player.
- videojs.org/docs/framework/html/reference/components/mux-video: Documents choosing hls.js for low latency, rendition limits, and detailed analytics.
- reznik.org/papers/MHV2023_Low_Latency.pdf: Independent comparison measured bitrate, latency, and buffering on older versions.
Safe6.7
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 4.5 to 7.5
It has zero dependencies, an Apache-2.0 licence, and an OpenSSF Scorecard of 7.1 with strong SAST and workflow checks. However, OSV advisory MAL-2026-3019 (GHSA-pq9g-f2rr-m4hw) flags two 1.7.0-alpha canary builds published in April 2026 as malicious. The advisory also lists a broad 1.* range with no fix. Releases are unsigned and code review scores 5 of 10, so how npm releases are published is a real open concern until the incident is clearly explained.
- osv.dev/vulnerability/MAL-2026-3019: Flags canary builds 11764 and 11765 as malicious; no withdrawal and no fixed version listed.
- scorecard: Score 7.1; Signed-Releases 0, Code-Review 5, Pinned-Dependencies 6.
- npm dependencies / license: Zero dependencies, Apache-2.0.
GPT-6.2 Sol: 7.4, likely 5.8 to 8.7
The package has zero npm runtime dependencies, a permissive Apache-2.0 license, and a release workflow configured for npm trusted publishing. The April malware advisory names two removed canary builds only, leaving stable 1.7.4 outside its listed scope. GitHub reported removing the builds and revoking publishing tokens, while JFrog and the maintainers disputed the detection, so the public record leaves the cause unresolved. OpenSSF scores it 7.1, with gaps in code review, dependency pinning, fuzzing, and signed releases.
- npm dependencies, npm license, scorecard score, scorecard checks: Zero runtime dependencies and Apache-2.0, with review at 5, pinning at 6, and fuzzing and signed releases at 0.
- api.osv.dev/v1/vulns/MAL-2026-3019: Machine-readable affected versions name only canary builds 11764 and 11765.
- github.com/github/advisory-database/issues/7495: Records JFrog's challenge and GitHub Trust & Safety's reported takedown and token revocation.
- github.com/video-dev/hls.js/issues/7816: Maintainers mapped both builds to CI runs and reported that later builds continued publishing.
- github.com/video-dev/hls.js/blob/v1.7.4/.github/workflows/build.yml: Stable release workflow configures OIDC for npm publishing.
Good
- It has the most complete HLS support in JavaScript: LL-HLS, interstitials, I-frame playlists, CMCD v2, and EME DRM for Widevine, PlayReady and FairPlay.
- It has zero runtime dependencies, ships its own TypeScript types, and is far smaller than Shaka Player.
- Releases come often (15 in the last year), and the 1.7 release added features with no breaking changes.
- Video.js 10, Mux Player, Media Chrome and Vidstack use it as their HLS engine.
Bad
- It has no UI or controls, so you must add your own or use a player that wraps it.
- It plays only HLS; for DASH or Smooth Streaming you need Shaka Player or dash.js.
- Two canary pre-release builds on npm were flagged as malicious in April 2026, and npm releases are not signed.
- Playback on iOS needs ManagedMediaSource (iOS 17.1+), and Safari edge cases keep showing up in the issue tracker.
The numbers
- npm downloads, 4 weeks
- 58M ×7.1 in a year
- GitHub stars
- 17k
- Commits, 12 months
- 499
- npm version
- 1.7.4 Oct 2026
- Versions, 12 months
- 9
- Advisories, 24 months
- 1 of 1 ever
- OpenSSF Scorecard
- 7.1 out of 10, Nov 2026
- Licence
- Apache-2.0
Read on 21 November 2026 from GitHub (video-dev/hls.js), npm (hls.js), OSV and the OpenSSF Scorecard.
Video and audio players
- 8.2hls.js
- 8.1Video.js
- 7.9Shaka Player
- 7.5wavesurfer.js
- 6.9dash.js
- 6.2Tone.js
- 5.9howler.js
- 5.6ReactPlayer
- 5.3Media Chrome
- 2.8Vidstack
- 2.4Plyr