Skip to content

danieljcohen/beat-torrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 BeatTorrent — Distributed Peer-to-Peer Music Streaming

BeatTorrent is a distributed, peer-to-peer music streaming system, following the use case of Spotify Jam but the implementation of BitTorrent (pun intended). One user acts as the Host, and all other connected Peers collaboratively stream audio chunks from one another using WebRTC — not from a centralized server. Only control signals are broadcast through the backend.

Live App: https://beat-torrent.fly.dev/

WebSocket Endpoint: wss://beat-torrent.fly.dev/ws/jam1

MVP Features

  • Single room (jam1) session
  • Host-only playback control
  • Real-time PLAY/PAUSE broadcast
  • Peer discovery + swarm updates
  • WebRTC P2P chunk exchange
  • Distributed playback using MSE
  • Periodic viewer synchronization to host
  • TURN server as a fallback to STUN/NAT

Future Work

  • Functionality to multiple rooms
  • More viewer interacitivty with room (view song, vote on next, etc)
  • Compatibility across web browsers/devices
  • Visualization of chunk spread
  • Polish UI
  • Modularize codebase

AI Attribution

  • P2P Graph Creation and Integration
  • HTML/CSS Template Creation

Notes

Local use: activate venv, uvicorn app:app --reload --port 8000, open frontend/index.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •