A real-time synchronized video watching experience powered by PubNub and Shaka Player.
Watch videos together with friends, perfectly in sync, with live chat and emoji reactions!
- 🔄 Perfect Sync - Host controls playback, viewers stay perfectly synchronized
- 💬 Live Chat - Real-time messaging with message history for late joiners
- 😂 Emoji Reactions - Send floating reactions that appear for everyone
- 👥 Presence - See who's watching with you in real-time
- 👑 Host Transfer - Pass control to another viewer
- 🎥 Custom Videos - Use any DASH (.mpd) or HLS (.m3u8) stream
- 🔑 Self-Serve - Enter your own PubNub keys via the UI
git clone https://github.com/PubNubDevelopers/shaka-watch-party.git
cd shaka-watch-partynpm installnpm run devNavigate to http://localhost:5173 and enter your PubNub keys.
- Sign up for a free account at admin.pubnub.com
- Create a new app and keyset
- Enable the following features on your keyset:
- Presence - For tracking who's online
- Message Persistence - For chat history
- App Context - For user/channel metadata
- Files (optional) - For file sharing
You can enter your keys directly in the app UI, or create a .env.local file:
VITE_PUBNUB_PUBLISH_KEY=pub-c-your-publish-key
VITE_PUBNUB_SUBSCRIBE_KEY=sub-c-your-subscribe-key- Generate a room code and share it with friends
- Control playback - play, pause, seek
- Everyone stays in sync automatically
- Enter the room code shared by the host
- Sit back and enjoy - playback syncs automatically
- Chat and react with emoji
- PubNub Shaka Player - Video sync via SyncManager
- PubNub Chat SDK - Real-time chat & presence
- Shaka Player - Adaptive video streaming
- Vite - Fast build tooling
- TypeScript - Type-safe development
shaka-watch-party/
├── src/
│ ├── components/ # UI components
│ │ ├── JoinScreen.ts
│ │ ├── VideoPlayer.ts
│ │ ├── Chat.ts
│ │ ├── Participants.ts
│ │ └── ...
│ ├── services/
│ │ └── ChatService.ts # PubNub Chat SDK integration
│ ├── config.ts # PubNub configuration
│ ├── main.ts # App entry point
│ └── style.css # Styles
├── assets/ # Screenshots
└── docs/ # Documentation
Expand "Custom Video URL" on the join screen to use your own DASH or HLS stream.
Edit src/style.css - the app uses CSS custom properties for easy theming.
- Watch Party Tutorial - Step-by-step guide
- PubNub Shaka Player Docs
- PubNub Chat SDK Docs
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.
Built with ❤️ by PubNub

