Inspiration
We were inspired by the idea of watching movies with friends no matter where they are. With streaming services often lagging or limiting group interactions, we envisioned a more personal, synchronized viewing experience built on peer-to-peer technology. This led us to create a platform where users can directly share their favorite movies and have a fully synced experience across all participants.
What it does
Peer Stream is a peer-to-peer video streaming platform that allows the host to stream a video directly from their computer to connected peers. Users can watch together with synchronized play, pause, and seek actions across the group, ensuring a unified viewing experience without the need for centralized servers.
How we built it
We built Peer Stream using Svelte for the frontend, TypeScript for scalable logic, MongoDB for storing session information like the number of active sessions being brokered and their IDs, Tailwind CSS for a sleek UI, and Peer.js to manage peer-to-peer connections. Peer.js enables the host to send video data and synchronize playback actions seamlessly between connected users.
Challenges we ran into
Initially, we attempted to follow Peer.js's traditional approach of sending messages by modifying it to stream video bytes. However, due to the video size, we ran into issues where the video would not load properly across peers. We pivoted to sending JSON data that contained the action (play, pause, seek) and the corresponding video bytes. This allowed for better performance and control, but required significant adjustments to the initial architecture.
Accomplishments that we're proud of
One of our proudest moments was when, after overcoming technical hurdles, we successfully synchronized a playback across all peers. Hearing Adele's song play in perfect harmony across all devices confirmed that our synchronization logic was working perfectly—a major victory for our team.
What we learned
We learned the complexities of handling large video files in real-time peer-to-peer systems and the importance of precise synchronization across multiple clients. Our team also gained deeper insight into optimizing data flow and efficiently structuring communication protocols.
What's next for Peer Stream
Next, we plan to improve the overall performance by implementing more efficient compression. We also aim to introduce new features like chat and timestamped reactions to create a richer, more interactive experience for users.
Built With
- bun
- mongodb
- peerjs
- svelte
- tailwind
- typescript


Log in or sign up for Devpost to join the conversation.