macOS 14+ · Notarized · MIT · v0.1.0

System audio in any browser

A tiny notarized macOS menubar app that streams whatever's playing on your Mac to the browser — bit-perfect, including Safari and Firefox, where the web can't capture system audio at all. The way Zoom does it. Not a hack.

Pairs with sj-audio — one line of browser code.

Why it exists

Browsers deliberately can't capture system audio. getDisplayMedia is Chromium-desktop only, grabs tab not system audio on macOS, and is often DSP-mangled. Safari and Firefox drop the audio entirely. DRM streams read as silence.

Zoom, Webex and Teams don't work around the sandbox — their desktop clients are native apps using an OS audio API. SJAudioBridge does exactly that, then hands the audio to the browser over a WebSocket. The page just reads a socket, so it works everywhere, at full fidelity, DRM included.

┌─ SJAudioBridge.app (Swift, macOS 14+) ──────┐ │ ScreenCaptureKit │ │ → Float32 mono PCM (1024-sample blocks) │ │ → WebSocket 127.0.0.1 + per-launch tok │ └───────────────────────┬──────────────────────┘ │ ws://127.0.0.1:17653 │ JSON handshake + binary PCM ┌────────────────────────▼──────────────────────┐ │ Any browser — sj-audio │ │ createNativeBridgeSource({ token }) │ │ → AudioWorklet → analyzer → AudioFrame │ │ → your visualizer │ └────────────────────────────────────────────────┘

Running in 60 seconds

  1. Download the latest zip, unzip, drag SJAudioBridge.app to /Applications, open it.
  2. Approve the Screen Recording prompt, then quit & relaunch (macOS applies the grant on relaunch).
  3. The menubar waveform icon reads capturing — <dBFS> · <N> blk/s.
  4. Menubar → Copy Connection Token.
  5. Paste it into your sj-audio app, connect, play music anywhere.
Why does an audio tool ask for Screen Recording? ScreenCaptureKit is permission-gated under Screen Recording even for audio-only capture. SJAudioBridge requests nothing else, captures no video (a 2×2 dummy surface that's never read), and never records its own output.

One line in the browser

sj-audio injects the PCM into the same analysis pipeline every other source uses — so any sj-audio visualizer works with system audio for free.

import { createNativeBridgeSource } from
  'https://cdn.jsdelivr.net/gh/jayvee6/sj-audio@v0.2.0/dist/sj-audio.esm.js';

const source = createNativeBridgeSource({ token });   // from the menubar
source.onFrame((f) => drawBars(f.magnitudesSmooth)); // 32 mel bands
await source.start();

Trustworthy by construction

It's a local audio tap — so trust is the whole point.

More

sj-audio

The cross-browser web audio capture + analysis library. Four other sources (mic, media element, display, file) need no helper at all.

github.com/jayvee6/sj-audio →

Wire protocol v1

A tiny, documented, cross-platform protocol: JSON hello → token authready → binary Float32 PCM.

Read the spec →

Roadmap

macOS shipped (ScreenCaptureKit). Windows next — a WASAPI-loopback helper speaking the same protocol unchanged.