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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nomercy-entertainment/nomercy-video-player

v0.6.10

Published

Full event-driven video player without a UI.

Downloads

312

Readme

NoMercy Video Player

Plugin-Based HTML5 Video Player Built with TypeScript

Always feel like fighting video player UI choices? This one's built for developers who want complete control over their video experience.

NPM Version NPM Downloads Build Status License

TypeScript Framework Agnostic GitHub Stars

About

A lightweight, plugin-based HTML5 video player built with TypeScript. Provides comprehensive video playback capabilities without imposing any UI decisions on your application.

Powers video playback in NoMercyTV

Features

Core Video Features

  • Multi-Format Support: MP4, WebM, Ogg, and more HTML5 video formats
  • HLS Streaming: Adaptive streaming with seamless quality switching
  • Cross-Platform: Works across modern browsers and platforms
  • Hardware Acceleration: Uses native browser video acceleration

Advanced Features

  • ASS/VTT Subtitles: Full support for advanced subtitle formats via Octopus renderer
  • Plugin Architecture: Modular design for UI, controls, and functionality
  • Keyboard Shortcuts: Extendable VLC-style key bindings
  • Quality Selection: Manual and automatic quality level switching

Modern Integration

  • Framework Agnostic: Works with Vue, React, Angular, Svelte, Vanilla JS
  • TypeScript: Full type safety with comprehensive interfaces
  • Event-Driven: React to player state changes and user interactions
  • Customizable Controls: Build your own UI with complete control

Playlist & Media Management

  • Playlist Support: Multi-track playlists with metadata
  • Chapter Support: Video chapters with navigation
  • Track Management: Audio tracks, subtitles, and quality levels
  • Progress Tracking: Resume playback from saved positions

🚀 Quick Start

Installation

Choose your preferred package manager:

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

# yarn
yarn add @nomercy-entertainment/nomercy-video-player

# pnpm
pnpm add @nomercy-entertainment/nomercy-video-player

Basic Usage

import nmplayer from '@nomercy-entertainment/nomercy-video-player/src/index';
import OctopusPlugin from '@nomercy-entertainment/nomercy-video-player/src/plugins/octopusPlugin';
import KeyHandlerPlugin from '@nomercy-entertainment/nomercy-video-player/src/plugins/keyHandlerPlugin';
import type { PlayerConfig } from '@nomercy-entertainment/nomercy-video-player/src/types';

// Create player instance
const config: PlayerConfig = {
	muted: false,
	controls: false,
	preload: 'auto',
	accessToken: 'your bearer token', //(optional, can be passed in the file url as query manually)
	basePath: 'https://raw.githubusercontent.com/NoMercy-Entertainment/media/refs/heads/master/Films/Films', // Base URL for media files (optional, can use a full url for the file)
	playlist: [
		{
			title: 'Cosmos Laundromat',
			description: 'On a desolate island, a suicidal sheep named Franck meets his fate…',
			image: 'https://image.tmdb.org/t/p/w780/f2wABsgj2lIR2dkDEfBZX8p4Iyk.jpg',
			file: '/Cosmos.Laundromat.(2015)/Cosmos.Laundromat.(2015).NoMercy.m3u8',
			tracks: [
				{ label: 'Dutch (Full)', file: '/Cosmos.Laundromat.(2015)/subtitles/Cosmos.Laundromat.(2015).NoMercy.dut.full.vtt', language: 'dut', kind: 'subtitles' },
				{ label: 'English (Full)', file: '/Cosmos.Laundromat.(2015)/subtitles/Cosmos.Laundromat.(2015).NoMercy.eng.full.vtt', language: 'eng', kind: 'subtitles' },
				// Additional subtitle tracks...
			],
		},
		{
			title: 'Sintel',
			description: 'Sintel is an independently produced short film...',
			image: 'https://image.tmdb.org/t/p/w780/q2bVM5z90tCGbmXYtq2J38T5hSX.jpg',
			file: '/Sintel.(2010)/Sintel.(2010).NoMercy.m3u8',
			tracks: [
				{ label: 'Dutch (Full)', file: '/Sintel.(2010)/subtitles/Sintel.(2010).NoMercy.dut.full.vtt', language: 'dut', kind: 'subtitles' },
				{ label: 'English (Full)', file: '/Sintel.(2010)/subtitles/Sintel.(2010).NoMercy.eng.full.vtt', language: 'eng', kind: 'subtitles' },
				// Additional subtitle tracks...
			],
		},
		// Additional playlist items...
	],
	playbackRates: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
    // Additional configuration options...
};

const player = nmplayer('player') // 'player' is the ID of the div element, do not use a video tag
	.setup(config);

// Add keyboard controls
const keyHandler = new KeyHandlerPlugin();
player.registerPlugin('keyHandler', keyHandler);
player.usePlugin('keyHandler');

// Add subtitle support
const octopus = new OctopusPlugin();
player.registerPlugin('octopus', octopus);
player.usePlugin('octopus');

// Listen to events
player.on('play', () => console.log('Playback started'));
player.on('time', (timeData) => console.log(`${timeData.currentTime}s / ${timeData.duration}s`));

🎯 Plugin Development

Want to extend functionality? Create custom plugins using our simple API:

import Plugin from '@nomercy-entertainment/nomercy-video-player/src/plugin';
import { NMPlayer } from '@nomercy-entertainment/nomercy-video-player/src/types';

export interface PluginArgs {
	// Your extra config items
}

class CustomUIPlugin extends Plugin {
	player: NMPlayer<PluginArgs> = NMPlayer < PluginArgs > {};

	initialize(player: NMPlayer<PluginArgs>) {
		this.player = player;
		// Setup your plugin before use is called
	}
	
	dispose() {
		// Clean up when plugin is unmounted
	}

	use() {
		// Your plugin logic here
	}
}

export default CustomUIPlugin;

💡 Need more examples? Check out our built-in plugins:

📖 Documentation

| Section | Description | |---------|-------------| | 🏠 Wiki Home | Complete documentation hub | | ⚡ Quick Start | Get running in 5 minutes | | 📚 API Reference | Complete TypeScript API docs | | 🔧 Plugin Development | Build custom plugins | | 🎛️ Configuration | Player setup options |

🔧 Browser Support

| Feature | Chrome | Firefox | Safari | Edge | |---------|--------|---------|--------|------| | Core Audio | ✅ | ✅ | ✅ | ✅ | | Web Audio API | ✅ | ✅ | ✅ | ✅ | | Media Session | ✅ | ✅ | ✅ | ✅ | | HLS Streaming | ✅ | ✅ | ✅* | ✅ | | Spectrum Analyzer | ✅ | ✅ | ✅ | ✅ |

*Safari has native HLS support

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/NoMercy-Entertainment/NoMercyVideoPlayer.git
cd NoMercyVideoPlayer

# Install dependencies
npm install

# Start development
npm run dev
npm run build
npm run test

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🏢 About NoMercy Entertainment

NoMercy Entertainment builds open-source media tools that give developers full control over their audio and video experiences.

Our Ecosystem

Links


Built with ❤️ by the NoMercy Engineering Team

Empowering developers to create extraordinary video experiences