No description
  • JavaScript 41.7%
  • TypeScript 31.8%
  • CSS 14.6%
  • HTML 11.7%
  • Dockerfile 0.2%
Find a file
2026-03-26 19:06:54 -04:00
public ANOTHER FIX 2026-03-26 19:06:54 -04:00
src issues 2026-03-26 18:52:50 -04:00
.env.example fix some issues and add multi srs support 2026-03-07 10:46:00 -05:00
.gitattributes first commit 2025-06-08 17:17:18 -04:00
.gitignore first commit 2025-06-08 17:17:18 -04:00
.gitlab-ci.yml remake the watch.js to be like srs, update biome, fix chat offscreen 2025-07-06 11:40:42 -04:00
biome.json issues 2026-03-26 18:52:50 -04:00
compose.yml add docker, add viewers route and types 2025-07-20 15:37:45 -04:00
Dockerfile add docker, add viewers route and types 2025-07-20 15:37:45 -04:00
LICENSE first commit 2025-06-08 17:17:18 -04:00
logger.json first commit 2025-06-08 17:17:18 -04:00
package.json issues 2026-03-26 18:52:50 -04:00
README.md readme 2026-03-05 07:17:37 -05:00
tsconfig.json issues 2026-03-26 18:52:50 -04:00

SRS Viewer

A real-time streaming viewer application for SRS (Simple Realtime Server) with multi-stream support, live viewer tracking, chat, and Discord Activity integration.

Features

  • Individual stream viewing with real-time stats
  • Multi-stream dashboard with customizable grid layouts (1x2, 2x1, 2x2, 3x2, 3x3, auto)
  • WebSocket-based live viewer counting
  • HLS and HTTP-FLV streaming support
  • On-demand stream transcoding (720p, 480p, 360p)
  • Live chat with moderation (bans, slow mode, message deletion)
  • User authentication with stream keys
  • Stream preview thumbnails
  • Stats and analytics dashboard
  • Discord Activity integration (embedded app)
  • Theatre mode for individual streams
  • Privacy policy and Terms of Service pages

Requirements

  • Bun runtime
  • SRS server instance
  • PostgreSQL (if authentication is enabled)
  • Redis (if chat is enabled)

Environment Variables

Create a .env file in the root directory. See .env.example for all available options.

Required

Variable Description
HOST Bind address (default: 0.0.0.0)
PORT Server port (default: 6600)
SRS_URL URL to your SRS API (e.g. http://srs:1985)

Stream Previews

Variable Description
PREVIEWS_ENABLED Enable stream preview thumbnails (true/false)
PREVIEW_URL Preview URL template with {SRS_URL} and {STREAM_KEY} placeholders

Authentication

Variable Description
ENABLE_AUTHENTICATION_API Enable user auth system (true/false)
POSTGRES_URL PostgreSQL connection string (required if auth enabled)
JWT_SECRET Secret for signing JWT tokens (required if auth enabled)
JWT_EXPIRES_IN Token expiry duration (default: 24h)

Chat

Variable Description
ENABLE_CHAT Enable live chat (true/false, requires auth enabled)
REDIS_URL Redis connection string (required if chat enabled)

Transcoding

Variable Description
ENABLE_TRANSCODE Enable on-demand transcoding (true/false)
TRANSCODE_QUALITIES Comma-separated quality list (default: 720p,480p,360p)
TRANSCODER_URL URL of the transcoder sidecar

Discord Activity

Variable Description
DISCORD_CLIENT_ID Discord application client ID
DISCORD_CLIENT_SECRET Discord application client secret

Other

Variable Description
TRUST_PROXY Trust proxy headers for real IP (true/false)
NODE_ENV Set to development for dev mode

Development Setup

  1. Install dependencies:
bun install
  1. Start development server:
bun run dev

The application will be available at http://localhost:6600

Production

bun run start

Docker

  1. Build image:
docker build -t srs-viewer .
  1. Docker Compose:
docker compose up -d

Routes

Path Description
/ Main dashboard showing all active streams
/watch/{stream} Individual stream viewer
/group Multi-stream grid viewer
/stats Statistics dashboard
/analytics Analytics dashboard
/help Streaming setup guide
/chat Chat WebSocket endpoint
/tos Terms of Service
/privacy Privacy Policy
/activity Discord Activity entry point

License

BSD 3-Clause