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

@lightbird/player

v0.12.0

Published

Framework-agnostic <lightbird-player> Web Component. Drop-in video player for Vue, Svelte, Angular, Solid, or plain HTML — powered by @lightbird/core.

Downloads

137

Readme

@lightbird/player

A framework-agnostic <lightbird-player> Web Component — the LightBird video player as a standard custom element. Use it in Vue, Svelte, Angular, Solid, or plain HTML with no framework wrapper.

It is built on @lightbird/core: MP4/WebM play natively, while HLS streams and MKV files lazy-load the core engine (and FFmpeg.wasm, for MKV) only the first time they are needed.

Install

npm install @lightbird/player

Usage

Importing the package once registers the <lightbird-player> element:

import '@lightbird/player';
<lightbird-player
  src="https://example.com/video.mp4"
  controls
  poster="cover.jpg"
></lightbird-player>

That is the whole API surface for a basic player. For HLS or MKV, just point src at a .m3u8 or .mkv URL — the element loads the right engine itself.

Attributes & properties

| Attribute / property | Type | Description | |---|---|---| | src | string | Video URL. .m3u8 → HLS, .mkv → MKV (via core), anything else → native. | | sources | PlaylistItem[] | Playlist of videos as a JSON array of { src, title?, poster? }. When set with 2+ entries it drives playback (overriding src) and the bar shows prev/next + a playlist menu; the player auto-advances on ended. | | controls | boolean | allow-list | Show LightBird's styled control bar — play/pause, scrubber, volume, time, an audio-track picker (multi-track MKV/HLS), a subtitle (CC) track picker, picture-in-picture, a settings menu (playback-speed presets + brightness/contrast/saturation/hue), and fullscreen. A bare controls enables every feature; pass a space-separated allow-list to choose, e.g. controls="play seek volume fullscreen". Features: play seek volume time audio subtitles pip settings fullscreen playlist. | | nativecontrols | boolean | With controls, use the browser's built-in <video> controls instead of the styled bar. | | autoplay | boolean | Autoplay once ready (pair with muted). | | muted | boolean | Start muted. | | poster | string | Poster image shown before playback. | | subtitles | SubtitleSource[] | Subtitle tracks. As an attribute, pass a JSON array. |

SubtitleSource is { src, label?, srclang?, default? }. .vtt files are used directly; .srt files are converted to VTT automatically.

The styled control bar is themeable via the --lb-accent CSS custom property and exposes a controls CSS part, e.g.:

lightbird-player { --lb-accent: #e91e63; }
lightbird-player::part(controls) { padding-bottom: 16px; }

Read-only / live properties: duration, paused, ended. Read-write: currentTime, volume, playbackRate. mediaElement exposes the underlying <video>. Methods: play(), pause().

Events

The element re-dispatches the standard media events as CustomEvents: loadedmetadata, canplay, play, playing, pause, timeupdate, seeking, seeked, waiting, ended, ratechange, volumechange, durationchange, and error.

Each event's detail carries a snapshot: { currentTime, duration, paused, volume, muted, playbackRate }. The error event additionally includes an error message string.

const player = document.querySelector('lightbird-player');
player.addEventListener('timeupdate', (e) => {
  console.log(e.detail.currentTime, '/', e.detail.duration);
});

Styling

The player uses Shadow DOM for style encapsulation. Style the inner video via the video part:

lightbird-player::part(video) {
  border-radius: 12px;
}

Framework examples

Working examples live in examples/: plain HTML, Vue, and Svelte. Custom elements are first-class in every modern framework — bind attributes and listen for events exactly as you would for a <video>.

License

MIT