Skip to content

Repository files navigation

StamPlayer Web Banner

StamPlayer

A stateless, client-side web video player for HLS, DASH, and MP4 streams.

Live Demo License: MIT React Vite


Overview

Native web video player built with React and Shaka Player. Supports dynamic playback of HLS, DASH, and MP4 streams directly via URL parameters with zero backend required.

Live Demo: https://stamplayer.vercel.app/

Core Features

  • Adaptive Streaming: Full playback support for LIVE and VOD streams in DASH (.mpd), HLS (.m3u8), and MP4 formats.
  • Dynamic DRM Decryption: Pass Widevine License Servers or ClearKey hex keys directly via URL parameters to instantly decrypt premium content.
  • BIF Trickplay Support: Native integration for Roku's Base Index Frame (.bif) format, providing thumbnail previews when scrubbing the timeline.
  • Zero-DB Architecture: 100% stateless design. The player requires no backend or database; all configuration is parsed dynamically from the URL query string.
  • Smart Stream Detection: Automatically infers the manifest type (HLS/DASH) if not explicitly provided.
  • Advanced Playback Controls: URL parameters to clamp maximum resolution (e.g., max=1080) and force default audio tracks (e.g., aud=en).
  • Client-Side Execution: Runs entirely in the browser using React and Shaka Player, ensuring zero server costs and maximum privacy.

Screenshots

Screenshot 1 Screenshot 2

Screenshot 3 Screenshot 4

URL API

Generate playback URLs dynamically by appending parameters to https://stamplayer.vercel.app/watch:

Param Description Encoded
u Stream URL (.m3u8, .mpd, .mp4) Base64
t Type (auto, hls, dash) Text
drm DRM Type (ck, wv) Text
ck ClearKeys (kid:key,kid:key) Base64
wvSrv Widevine License URL Base64
bif Trickplay BIF URL Base64
max Max resolution height (1080) Text
aud Default Audio Lang (en) Text

Example (Node.js):

const encodedUrl = Buffer.from("https://demo.com/stream.m3u8").toString('base64');
console.log(`https://stamplayer.vercel.app/watch?u=${encodedUrl}&t=hls`);

Local Setup

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn

Quick Start

git clone https://github.com/deyvvi/stamplayer.git
cd stamplayer
npm install
npm run dev

Deploy the dist/ folder to any static host (Vercel, GitHub Pages, Cloudflare Pages). No server required.


Tech Stack

  • Framework: React 19
  • Styling: Tailwind CSS v4
  • Bundler: Vite 8
  • Video Engine: Shaka Player v5
  • Type System: TypeScript

Disclaimer

Educational Purposes Only: StamPlayer is a technical portfolio project intended for testing and debugging streaming formats. The inclusion of DRM support (ClearKey/Widevine) is strictly to demonstrate architectural capabilities. The author is not responsible for any misuse of this tool for piracy or the circumvention of digital rights.


License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.

About

Test HLS, DASH, DRM (Widevine, ClearKey) and trickplay video streams.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages