npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fleetplayer

v1.0.2

Published

High-performance, headless HLS video player engine using MSE and TypeScript.

Readme

FleetPlayer 🚀

A high-performance, framework-agnostic, and headless HLS video player engine built with TypeScript and Media Source Extensions (MSE).

FleetPlayer is designed to be lightweight and modular, providing a powerful streaming core while giving developers complete control over the UI.

✨ Features

  • HLS Support: Play .m3u8 streams using Media Source Extensions (MSE).
  • Native Fallback: Automatically switches to the browser's native HLS pipeline (e.g., Safari, iOS) for maximum compatibility.
  • Adaptive Bitrate (ABR): Real-time quality switching based on measured network throughput.
  • Headless Core: No UI dependencies. Build your own controls or use a wrapper.
  • Web Worker Powered: Bandwidth estimation and segment fetching handled off the main thread.
  • TypeScript First: Full type definitions included for a superior developer experience.
  • Framework Agnostic: Works seamlessly with React, Vue, Angular, Svelte, or Vanilla JavaScript.

📦 Installation

npm install fleetplayer

🚀 Quick Start

1. Basic Usage (Vanilla JS)

<video id="my-video" controls></video>

<script type="module">
  import { FleetPlayer } from 'fleetplayer';

  const videoElement = document.getElementById('my-video');
  const player = new FleetPlayer(videoElement, {
    autoStart: true
  });

  // Load an HLS stream
  await player.load('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8');
</script>

2. Usage in React

import React, { useEffect, useRef } from 'react';
import { FleetPlayer } from 'fleetplayer';

const VideoPlayer = () => {
  const videoRef = useRef<HTMLVideoElement>(null);
  const playerRef = useRef<FleetPlayer | null>(null);

  useEffect(() => {
    if (videoRef.current) {
      playerRef.current = new FleetPlayer(videoRef.current);
      playerRef.current.load('your-stream-url.m3u8');
    }

    return () => {
      playerRef.current?.destroy();
    };
  }, []);

  return <video ref={videoRef} controls style={{ width: '100%' }} />;
};

🛠️ API Reference

new FleetPlayer(videoElement, config?)

Initializes a new player instance.

  • videoElement: The HTMLVideoElement to attach to.
  • config: (Optional) { autoStart?: boolean }

player.load(url: string): Promise<void>

Parses the manifest and prepares the player for playback.

player.play() / player.pause()

Standard playback controls.

player.setQuality(levelIndex: number)

Manually set the quality level.

  • levelIndex: The index of the level from getStats().levels.
  • Pass -1 for Auto ABR (default).

player.getStats()

Returns an object containing real-time performance data:

{
  buffered: [{ start: number, end: number }],
  bitrate: number, // Current bitrate in bps
  level: number,   // Current quality level index
  levels: [...]    // Available quality levels
}

player.destroy()

Cleans up internal resources, stops workers, and resets the video source.

📄 License

MIT © aniketyadav