Skip to content

audiohacking/beatsync-p2p

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

693 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Beatsync P2P Fork

Ephemeral Synchronized multi-device audio playback in the browser โ€” now 100% p2p using Trystero.

Create a room, upload tracks and play in sync. No backend, no cloud storage, no audio leaks.

Live demo

https://audiohacking.github.io/beatsync-p2p

Open the link, join or create a 6-digit room, and share the URL with others in the same session.

Demo is hosted on github pages without any backend ๐ŸŽ‰

Use Cases

  • Party Mode: Sync all your machines to play in perfect sync all over the place
  • Play Mode: Share and play your demos/mixes safely while chatting (audio/text)
  • Your Mode: Just do whatever you want with it, in perfect sync.

Why P2P?

This fork is built around a serverless room model:

  • Your audio stays on your devices. Uploads are stored in the browser (IndexedDB) and sent directly to peers over WebRTC. Unlike the original Beatsync, files are never uploaded to a central server, so there is no server-side copy that could be retained, scanned, or leaked.
  • No account or backend room host. Peers coordinate playback, queue, chat, and clock sync among themselves. Signaling uses public WebRTC relays only to establish connections โ€” not to host your music.
  • Same sync goals as the original. Scheduled play/pause, NTP-style clock alignment, spatial audio, and queue controls โ€” without tying playback to a single datacenter.

Trade-offs: you need at least one peer online who has a given track for others to fetch it.

Quickstart (local dev)

bun install
bun dev    # http://localhost:3000

Upload audio from the queue panel. Files stay local and replicate to other peers in the room when they connect.

How it works

Piece Role
apps/client Next.js app โ€” UI, Trystero rooms, per-peer room state
packages/shared Zod schemas for room messages and P2P envelopes
  • Room id: beatsync-p2p-v1-{6-digit-code} (Trystero)
  • Track ids: p2p://{trackId} โ€” blobs in IndexedDB, transferred via Trystero audio-track actions
  • Sync: NTP-style probes between peers; play/pause scheduled against a shared clock

Repository

Source and issues: github.com/audiohacking/beatsync-p2p

Credits

This is a fork of https://github.com/freeman-jiang/beatsync under the same LICENSE

About

๐Ÿ”Š High-precision web player for multi-device audio playback and spatial audio. P2P Fork w/o Server-side components.,

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages