Skip to content
Nat Lee

Keyboard shortcuts

Turn these off if they get in the way of a screen reader or voice control. The setting is saved in this browser.

1
Home
2
Work
3
Projects
4
About
5
Experience
/
Search projects
?
Show this panel

Web Application

Streaming Player

Song requests, from chat to OBS

Twitch, YouTube live chat and chat bots share one song queue. A Rust backend keeps the OBS player, overlay and moderator dashboard in sync.

Role
Creator & Maintainer
Period
2023.01 – 2026.11
Status
Completed
Categories
Web apps & extensions
Stack
  • Rust
  • axum
  • React
  • Tailwind CSS
  • WebSocket
  • Docker
Streaming Player, screenshot 1

Overview

Streaming Player 2.0 is a self-hosted song request system rebuilt with Rust and React. Viewers request songs from Twitch, YouTube live chat or an HTTP API; moderators manage the same queue from a dashboard. Dedicated OBS browser sources provide playback and a transparent now-playing overlay. It replaces the earlier Flask players.

What it's good for

For a streamer taking requests from Twitch, YouTube and a chat bot at once: one queue, one set of rules, run from chat or the dashboard. When the queue runs dry, your starred songs take over, so dead air stops being part of the show.

Diagrams

Main paths only. The edge cases stayed in the code.

Version two has three fewer things that can break mid-stream.

Point at a box to see what it connects to.

  1. Viewer types !sr and a link → Where was it typed?
  2. Where was it typed? → Twitch: Arrives over EventSub → YouTube: Polled from live chat → chat bot: Bot calls the HTTP API
  3. Arrives over EventSub(level from chat badges) → Split into who, command, words
  4. Polled from live chat(old first page skipped) → Split into who, command, words
  5. Bot calls the HTTP API(level from query or header) → Split into who, command, words
  6. Split into who, command, words(invisible characters stripped) → Allowed and off cooldown?
  7. Allowed and off cooldown?(enabled, level, per-person cooldown) → yes: Look up title and length → no: Reply in chat
  8. Look up title and length(skipped for songs it knows) → Passes the queue rules?
  9. Passes the queue rules?(length, limits, block list) → yes: Join the queue → no: Reply in chat
  10. Join the queue(every page updates over WebSocket) → tell chat: Reply in chat → wait its turn: Leader player plays it
  11. Reply in chat(place and wait, or why not)
  12. Leader player plays it(other pages follow its clock) → Anything left in the queue?
  13. Anything left in the queue? → yes: Leader player plays it → no: Play a random starred song → no, autoplay off: Wait for the next request
  14. Play a random starred song(the one just played comes last) → Leader player plays it
  15. Wait for the next request(dead air, by choice)

Features

  • Twitch, YouTube live chat and HTTP chat-bot requests
  • Queue limits, cooldowns, voting and block lists
  • OBS player and transparent now-playing overlay
  • Roles, permission points and personal API tokens
  • Settings backups and song-library export

Results

  • Version 2.0.0 released with a Rust backend and React dashboard
  • One Docker image for self-hosted deployment
The OBS player with the now-playing overlay and a pop-up for a new request
The OBS player with the now-playing overlay and a pop-up for a new request

What I learned

  • SQLite's plain BEGIN starts as a reader, so a read-then-write queue update could fail with "database is locked" at once; writes now use BEGIN IMMEDIATE.
  • Since 2025 YouTube's embedded player shows error 153 when the page sends no Referer, so a proxy's no-referrer "security" preset quietly breaks playback.
  • The first page of YouTube live chat is old chat. It is skipped, or every restart would replay old !sr requests.
  • Dashboard: the song on air, playback controls, the request box, queue and activity
    Dashboard: the song on air, playback controls, the request box, queue and activity
  • Viewer page: what is playing, your own requests, and how long each song still waits
    Viewer page: what is playing, your own requests, and how long each song still waits
  • Users and roles, where the last account that manages users cannot demote itself
    Users and roles, where the last account that manages users cannot demote itself
  • Web apps & extensions11 stars on GitHub

    Gantt Studio

    Drag a schedule into place, draw dependencies and see the critical path. Switch to Mermaid text without losing the plan. Everything stays in your browser.

    2026Completed
  • Web apps & extensions33 stars on GitHub

    MorphKit

    Converts and edits images, audio, video, PDFs and documents entirely in the browser. Nothing gets uploaded, mostly because there is nowhere to upload it to.

    2026Active
  • Web apps & extensions11 stars on GitHub

    Stock Trading Simulator

    A trading simulator with a price-time matching engine, bot traders and a live order book. You can lose money here without losing any money.

    2026Active