YouTube Party is a full-stack web application that lets any number of users stream YouTube videos in sync using the Socket.IO library and the YouTube iFrame API.
In order to support synchronous message passing between multiple clients and a server, YouTube Party uses the WebSocket API, which enables two-way communication between each server and client. Notably, each client may receive messages from the server without having to regularly poll the server.
Every time a client sends a message across the channel to the server, the server will then broadcast that message out to all connected channels. This allows all clients to share a single source of truth that is updated in real time.
The high-level architecture layout of YouTube Party is as follows:
YouTube Party is written entirely in JavaScript. The server runs on Node.js while the client is built using React.
Both the server and client use Socket.IO to form the network connection but only the client calls the YouTube iFrame API for its embedded video player.
To start the server, run:
$ cd server
$ node index.js
To start the client, run:
$ cd client
$ yarn start
YouTube Party is no longer in active development and is currently in maintence mode.