Skip to content
jukefrPublic

About

A free, no-account shared queue for watching YouTube and listening to SoundCloud together. Start a room, share one link, and everyone adds to the same queue.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Katebox

A collaborative YouTube and SoundCloud queue for you and your friends. Start a room, share one link, and everyone adds videos or tracks. The host's player runs through the queue automatically — no accounts, no downloads, just a link.

Katebox landing page

What it does

  • Rooms — create a room in one click and get a short shareable code (/r/ABC123).
  • One shared queue — anyone with the link can paste a YouTube URL or SoundCloud track. Titles and artwork are fetched from YouTube and SoundCloud oEmbed (no API key).
  • Drag to reorder — drag the grip (or the artwork) to move anything up or down. The focused grip also responds to ↑ / ↓ for keyboard users. The new order is synced to everyone.
  • Shuffle mode — toggle shuffle in the queue header. It randomises the upcoming queue and remembers the pre-shuffle order; switching it off restores that order. New items added while shuffled join the restored queue at the end. Dragging manually exits shuffle mode and keeps your order.
  • Scan to join — a QR code near the top of the queue points at the room URL. Tap it for a large version that’s easy to scan from across the room.
  • Automatic playback — the room creator is the host. Their player starts the first video or track and auto-advances when it ends. Guests stay in sync (play, pause, seek and drift correction).
  • Video and audio — YouTube videos use the familiar video stage; SoundCloud tracks get an artwork stage with a custom transport, clean progress bar and a link back to the source. Hover the volume icon for a per-device volume slider; your level is remembered.
  • Host controls — play/pause, seek, skip, play now, and remove any item. Guests can remove items they added.
  • Presence — see who is in the room. If the host disappears, playback pauses and anyone can take over.
  • Shared sound — everyone controls their own audio. Browsers block autoplay with sound, so players start muted and show a one-tap prompt.
  • Persistence — rooms survive server restarts and expire after 48 hours of inactivity.

Katebox room with a video playing

Katebox playing a SoundCloud track

Arcade

Click Arcade in the room’s top bar. The arcade opens automatically on the host’s screen as an overlay over the current cover/clip, and anyone already in the room can press Arcade on their own device to join. No QR code, no game code.

Asteroid Beat turns the room’s music into a five-zone rhythm game. Every pilot gets an equal slice of the ring — capped at just under half the circle so even a solo player stays readable — with five zones: far left / left / centre / right / far right. Notes ride the beat outward from the central core — slide into the matching zone before they land. Being settled in the right zone scores PERFECT; a last-moment slide scores GOOD. Combos multiply your score, and the highest score after 60 seconds wins.

On this keyboard:

  • Blue: A / D — press either key to join; slide one zone left / right
  • Pink: ← / → — press either key to join; slide one zone left / right
  • Mint: F / G — press either key to join mid-round
  • Lavender: J / L — press either key to join mid-round

Start from the room

The room’s Arcade button is the whole invite. Anyone in the room can press it; the arcade opens automatically on the host’s screen, over the current cover/clip. Everyone else just presses Arcade to join. Your device is detected automatically:

  • Phone/tablet: notes fall from the top of the screen down to a line about 90vh below; tap the orb when it reaches the line. The phone shows only your own notes and five zones.
  • Computer: use ← / → or A / D (or a mouse swipe) to slide the five-zone bar.

Phone charts ignore the five-zone travel-time limit — notes can jump to opposite zones because you’re tapping rather than sliding. Phone peaks are topped up to about three notes per second; computer/slide charts keep the reaction-time + movement budget so they stay reachable.

Some notes are holds: the orb grows a tail, and you keep the matching zone until the tail drains. Some holds are zigzag slides — a path shows the turns, and on a phone you keep your thumb down and drag through the zones in order. Slides are deliberately slow (about 2.2 seconds) and stay in the inner lanes so following them never turns into a fast edge swipe. On a keyboard, slide through the same zones in order. Lifting early, skipping a turn, or leaving the path breaks the hold and resets your combo. Finishing it adds a hold bonus.

Phone charts are built for two thumbs: a hold or slide claims that thumb, nearby taps are removed, and no other notes are scheduled during it or immediately after.

The game starts automatically on the first movement or tap. Rounds and track changes transition automatically; there is no host start button to wait for. Inactive controllers are dropped after about 30 seconds, and the session stays open for everyone else. If the host screen has no connected players and no input for 30 seconds, the arcade closes itself so it stops covering the room.

There is no player cap, and nobody on the host keyboard is forced to play. The host can just watch; press A/D, ←/→, F/G or J/L to drop a local ship in whenever you want. Any number of phones or extra computers can join alongside them. The ring gets crowded, but that’s part of the deal.

P pauses, Space manually starts/resumes, T taps the beat, Esc closes. Local pilots need a hardware keyboard; phones use touch.

Beatmaps

Mapped charts are currently SoundCloud-only: YouTube blocks server-side downloads without a login, so YouTube rooms use the estimated beat grid. For SoundCloud, the server reads the audio with yt-dlp, decodes it with ffmpeg, and caches a beatmap under data/beatmaps/.

The analyser runs three passes:

  • Drum transcription — the optional ADTOF Frame-RNN model recognises kick, snare, toms, hi-hat and cymbals on the full mix. It is small (about 2 MB), runs on CPU through ONNX Runtime, and turns drum hits into note events.
  • Long-note transcription — the optional Basic Pitch model (about 230 KB, Apache-2.0) finds sustained pitched notes in vocals, bass, synth and pads. Long notes become occasional hold notes; some are turned into one-zone slides. They are capped and spread out so the chart does not turn into a wall of holds, and phone charts keep taps away from them.
  • Structure and pulse — a pure-JS spectral pass finds tempo, beats, downbeats, loudness, onset density and section boundaries. Sections are labelled intro / verse / build / peak / break / groove / outro from the track’s own dynamics, not a fixed loudness threshold.

That structure drives the chart: peaks get denser phrases, more chords and wider phone jumps; breaks thin out to kicks and accents; builds ramp up. Drum class also affects lanes — kicks favour the centre, snares the body, hats the edges — so the pattern follows the kit instead of sprinkling notes evenly.

The models are optional. npm install pulls in onnxruntime-node; if the runtime or model files are missing, the worker falls back to a DSP drum classifier and the arcade still works. The ADTOF weights are CC BY-NC-SA 4.0 (non-commercial), with attribution in models/NOTICE-adtof.md. Basic Pitch is Apache-2.0 (commercial use permitted), with attribution in models/NOTICE-basic-pitch.md. Run npm run models:fetch to restore the model files, or delete them for a DSP-only setup.

If a track feels slightly early or late, tap T a few times on the ready screen to nudge the chart’s audio offset. The chart follows the actual song. The first read takes a few seconds; later rounds reuse the cached map. If analysis is unavailable, tap T (or Tap the beat) along with the music to lock the BPM and phase. On the landing page, where there is no room track, it runs a 120 BPM practice chart. If the music pauses mid-round the game waits, and if the track ends or changes the round ends with final scores.

For SoundCloud-mapped charts the server needs yt-dlp and ffmpeg; ONNX Runtime is optional. Without them the arcade still runs, using the estimated beat grid. The analyser only uses the current room track and caches the result; it does not keep copies of the audio.

Asteroid Beat with phone players

Phone controller

Mapped SoundCloud chart

Run it

Requires Node.js 20 or newer.

npm install
npm start

Open http://localhost:3000.

For development, npm run dev restarts the server when server files change. The static frontend is plain HTML/CSS/JS and needs no build step.

For audio-mapped arcade charts, install ffmpeg and yt-dlp on the server:

# Debian / Ubuntu
sudo apt install ffmpeg
sudo curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp
sudo chmod +x /usr/local/bin/yt-dlp

Without them the arcade still runs, using its estimated beat grid.

Environment

Variable Default Purpose
PORT 3000 HTTP port
ROOMS_FILE data/rooms.json Where rooms are persisted

How the sync works

  • The server is the source of truth for the queue and an anchor for playback: { playing, position, at }.
  • The host reports playback changes and a heartbeat every few seconds. Guests calculate the expected position from the anchor and correct drift when it exceeds a couple of seconds.
  • When a video or track ends for the host, the server advances the queue and every player loads the next item.
  • If the host disconnects, the server freezes playback at that moment. The new host's Take over click resumes from the frozen position.
  • Playback is driven by the host, but every browser plays its own copy of the media so remote friends can watch or listen together.
  • SoundCloud playback runs through the official Widget API. The widget is kept out of the layout so the room can show its own artwork stage; the source link provides attribution.
  • Asteroid Beat asks the server for a beatmap of the current track. The server downloads it temporarily, analyses it in a separate process, caches the onsets/tempo, then deletes the audio.

Host / guest rules

Action Host Guest
Add links yes yes
Reorder the queue yes yes
Toggle shuffle yes yes
Remove own items yes yes
Remove anyone's items yes no
Play a queued item now yes no
Skip current item yes no
Seek yes no
Take over when host is offline — yes

The host role is tied to the browser's local identity. It transfers automatically after 30 seconds if the host is offline and other people are in the room, or immediately when someone taps Take over.

Tech

  • Node.js, Express 5, Socket.IO
  • Vanilla HTML, CSS and JavaScript (ES modules)
  • YouTube IFrame Player API and SoundCloud Widget API
  • A dependency-free HTML canvas rhythm arcade
  • SortableJS (vendored, MIT) for mouse and touch drag-and-drop
  • qrcode-generator (vendored, MIT) for the invite QR
  • Public oEmbed metadata from both providers (no API keys)
  • Atomic JSON persistence (data/rooms.json), no database required

Project layout

server/
  index.js       HTTP API, Socket.IO events, presence, host transfer
  rooms.js       Room state, queue logic, persistence
  media.js       Unified parsing/metadata for YouTube + SoundCloud
  youtube.js     YouTube URL parsing and oEmbed metadata
  soundcloud.js  SoundCloud URLs, short links, oEmbed and embed URLs
public/
  index.html     Landing page
  room.html      Room page
  css/styles.css
  js/            Frontend modules, including the rhythm arcade
  vendor/        Vendored SortableJS and qrcode-generator + licenses
scripts/
  smoke.mjs      Backend integration test

Tests

With the server running:

npm run smoke

The smoke test creates a room, connects a host and a guest, adds YouTube and SoundCloud items, checks permissions and duplicates, reorders and shuffles the queue, skips tracks, verifies host disconnect handling, and promotes the guest to host.

Support

If Katebox is useful to you, you can support it on Ko-fi. There’s also a Support button in the site header and in the room footer.

Notes and limitations

  • Media must allow embedded playback; items that can't play are skipped automatically with a notice.
  • SoundCloud playlists/sets are not supported yet — paste an individual track URL. Set links are rejected with a clear message.
  • SoundCloud sometimes needs one tap before the browser lets the audio start. The room shows a Tap to play / Tap for sound prompt; after that, playback continues hands-free.
  • YouTube's embedded player still shows some of its own chrome on mobile. Guests can't interact with the iframe itself (controls=0 and pointer events are disabled).
  • The host's tab must stay open to keep the party going. If it closes, playback pauses and anyone can take over.
  • Users can add 15 links per minute per room. Rooms hold up to 100 items and expire after 48 hours of inactivity.
  • No accounts or moderation beyond the host role — anyone with the link can join. Treat the link like a party invite.
  • The QR code encodes the room page’s current origin. If you’re testing on localhost, phones can’t reach that address — use your machine’s network address or the public deployment URL.
  • Put the app behind HTTPS in production so the clipboard API works everywhere. WebSocket support must be enabled in your reverse proxy.
  • If you add your own Content-Security-Policy in a proxy, keep the app's provider allowances: w.soundcloud.com for the SoundCloud script/frame and *.sndcdn.com for artwork.

About

A free, no-account shared queue for watching YouTube and listening to SoundCloud together. Start a room, share one link, and everyone adds to the same queue.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages