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

@nomercy-entertainment/nomercy-video-player

v1.2.7

Published

Headless, event-driven HTML5 video player with HLS streaming, subtitle rendering (VTT/ASS/SSA), and a plugin system. No UI — you build your own.

Downloads

1,244

Readme

NoMercy Video Player

A headless, plugin-based HTML5 video player engine built with TypeScript. No UI included — you build your own.

NPM Version NPM Downloads Build Status Tests License TypeScript

Why?

Most video players force their UI on you. This one doesn't. NoMercy Video Player handles video playback, HLS streaming, subtitle rendering, playlists, and state management — then gets out of the way. You control every pixel of the interface through the plugin system.

Install

npm install @nomercy-entertainment/nomercy-video-player

Quick Example

import nmplayer, { KeyHandlerPlugin } from '@nomercy-entertainment/nomercy-video-player';
import type { PlayerConfig } from '@nomercy-entertainment/nomercy-video-player';

const config: PlayerConfig = {
	basePath:      'https://raw.githubusercontent.com/NoMercy-Entertainment/media/master/Films/Films',
	imageBasePath: 'https://image.tmdb.org/t/p',
	playlist: [
		{
			id:          'sintel',
			title:       'Sintel',
			description: 'A short fantasy film by the Blender Foundation',
			file:        '/Sintel.(2010)/Sintel.(2010).NoMercy.m3u8',
			image:       '/w780/q2bVM5z90tCGbmXYtq2J38T5hSX.jpg',
			duration:    '14:48',
			tracks: [
				{ id: 0, label: 'English', file: '/Sintel.(2010)/subtitles/Sintel.(2010).NoMercy.eng.full.vtt', language: 'eng', kind: 'subtitles' },
				{ id: 1, file: '/Sintel.(2010)/chapters.vtt', kind: 'chapters' },
			],
		},
	],
};

const player = nmplayer('player').setup(config);

// Add keyboard shortcuts (Space, arrows, F, M, etc.)
const keyHandler = new KeyHandlerPlugin();
player.registerPlugin('keyHandler', keyHandler);
player.usePlugin('keyHandler');

// React to player state
player.on('play', () => console.log('Playing'));
player.on('time', data => console.log(`${data.currentTimeHuman} / ${data.durationHuman}`));

The 'player' argument is the ID of a <div> element — never use a <video> tag. The player creates its own video element internally.

What You Get

Playback engine — MP4, WebM, HLS adaptive streaming with automatic quality switching

Subtitle engine — VTT subtitles built-in, ASS/SSA via the included OctopusPlugin

State management — CSS classes on the container (playing, paused, buffering, active, inactive, error) so your UI can react with pure CSS or JavaScript

Event system — 50+ typed events for playback, tracks, playlists, volume, quality, and more

Plugin architecture — Build your entire UI as a plugin with full access to the player API

Playlist & tracks — Multi-item playlists, audio track switching, quality levels, chapters, thumbnail sprites

Building Your UI

The player adds CSS classes to the container div that reflect its state. Use these to drive your UI:

| Class | When applied | | --------------- | ----------------------------------------------- | | nomercyplayer | Always present | | playing | Video is playing | | paused | Video is paused | | buffering | Video is buffering | | active | User is interacting (mouse/keyboard activity) | | inactive | User stopped interacting (controls should hide) | | error | Playback error occurred |

With plain CSS — target the state classes on the container:

.nomercyplayer.paused .controls {
	opacity: 1;
}
.nomercyplayer.playing .controls {
	opacity: 0;
}
.nomercyplayer.active .controls {
	opacity: 1;
}
.nomercyplayer.buffering .spinner {
	display: flex;
}

With Tailwind CSS — add group to the container (the player does this automatically) and use the group-[&.class] modifier:

<!-- Show controls when paused or active -->
<div class="opacity-0 group-[&.paused]:opacity-100 group-[&.active]:opacity-100 transition-opacity">
	<!-- your controls -->
</div>

<!-- Show spinner only when buffering -->
<div class="hidden group-[&.buffering]:flex">
	<!-- spinner -->
</div>

<!-- Hide an element during playback -->
<button class="flex group-[&.playing]:hidden">
	<!-- big play button -->
</button>

You can chain multiple states: group-[&.nomercyplayer:not(.buffering).paused]:bg-black/50 targets a paused, non-buffering player.

Create a plugin to build your controls:

import { Plugin } from '@nomercy-entertainment/nomercy-video-player';
import type { NMPlayer } from '@nomercy-entertainment/nomercy-video-player';

class MyUIPlugin extends Plugin {
	declare player: NMPlayer;

	initialize(player: NMPlayer) {
		this.player = player;
	}

	use() {
		// Build your UI using player.container, player.overlay, etc.
		// Listen to events: this.player.on('time', ...)
		// Call methods: this.player.play(), this.player.seek(30), etc.
	}

	dispose() {
		// Clean up DOM elements and event listeners
	}
}

See the Plugin Development Guide for complete examples.

Documentation

| Guide | Description | | ------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | Getting Started | Installation, setup, and first plugin | | Configuration | All PlayerConfig options | | Plugin Development | Extending the player with plugins | | Building a Player UI | 10-step tutorial from scratch | | API Reference | Types and interfaces | | Methods | All NMPlayer methods | | Events | All events with data types | | Framework Integration | Vue, React, Svelte, Angular, Vanilla JS |

Browser Support

| Feature | Chrome | Firefox | Safari | Edge | | ------------- | ------ | ------- | ------ | ---- | | Core Playback | Yes | Yes | Yes | Yes | | HLS Streaming | Yes | Yes | Native | Yes | | ASS Subtitles | Yes | Yes | Yes | Yes | | Plugin System | Yes | Yes | Yes | Yes |

Contributing

git clone https://github.com/NoMercy-Entertainment/nomercy-video-player.git
cd nomercy-video-player
npm install
npm run dev
npm run build

License

Apache-2.0

About

Built by the NoMercy Entertainment team. Powers video playback in NoMercyTV.

See also: NoMercy MusicPlayer | NoMercy MediaServer