A React-based web application that allows you to watch multiple YouTube videos simultaneously with synchronized playback controls. Features cross-window synchronization, master control system, and shareable video setups.
- Multi-Video Layout: Display multiple YouTube videos in a responsive grid
- Synchronized Playback: Play, pause, and seek all videos simultaneously
- Cross-Window Sync: Open videos in separate windows with real-time synchronization
- Master Control: First video acts as master controller for all others
- Loop Functionality: Enable/disable looping for all videos
- Time Synchronization: Sync all videos to start (0:00) or to current time
- Shareable URLs: Generate links to share your synchronized video setup
- Responsive Design: Works on desktop and mobile devices
- Quality Control: Default 144p quality for better performance
- Node.js (v14 or higher)
- npm
- Clone the repository:
git clone https://github.com/yourusername/viewsync.git
cd viewsync- Install dependencies:
# Install root dependencies
npm install
# Install client dependencies
cd client
npm install
cd ..- Start the application:
# Start backend server (port 5000)
npm run server
# In another terminal, start frontend (port 3000)
cd client
npm startOr use the convenience scripts:
# Windows
install.bat
start.bat- Add Videos: Enter YouTube URLs and click "Add Video"
- Synchronize: Use the control bar at the bottom
- โถ Play All: Start all videos simultaneously
- โธ Pause All: Pause all videos
- ๐ Loop: Enable/disable looping
- โฎ Reset: Reset all videos to start
- ๐ Sync: Open videos in separate synchronized windows
- Master Control: The first video (marked with ๐) controls all others
- Cross-Window Sync: Click "Open All in Sync Windows" to open each video in a separate window
- Time Sync: Use "Sync to Start" or "Sync to Current Time" to align videos
- Share: Copy the URL to share your video setup with others
- React 18 with TypeScript for type safety
- YouTube Player API for video playback control
- BroadcastChannel API for cross-window communication
- localStorage fallback for synchronization
- Responsive CSS Grid for multi-video layout
- Express.js server for API endpoints
- CORS enabled for cross-origin requests
- Static file serving for production builds
App.tsx- Main application logic and state managementYouTubePlayer.tsx- YouTube Player API wrapper- Cross-window synchronization system
- Master-slave video control pattern
- Multi-angle viewing: Watch events from different camera angles
- Content comparison: Compare original vs remix vs commentary
- Educational content: Language learners comparing different renditions
- Reaction videos: Show original content alongside reactions
- Content creation: Create synchronized multi-video experiences
- Live streaming: Synchronize multiple live streams
- โ Chrome (recommended)
- โ Firefox
- โ Safari
- โ Edge
- โ Mobile browsers
viewsync/
โโโ client/ # React frontend
โ โโโ public/ # Static assets
โ โโโ src/ # Source code
โ โ โโโ App.tsx # Main application
โ โ โโโ App.css # Styles
โ โ โโโ YouTubePlayer.tsx # YouTube API wrapper
โ โ โโโ index.tsx # Entry point
โ โโโ package.json # Frontend dependencies
โโโ server/ # Express backend
โ โโโ index.js # Server code
โโโ package.json # Root dependencies
โโโ install.bat # Windows install script
โโโ start.bat # Windows start script
โโโ README.md # This file
# Root level
npm run server # Start backend server
npm install # Install root dependencies
# Client level
cd client
npm start # Start React dev server
npm run build # Build for production
npm test # Run testsPORT- Backend server port (default: 5000)REACT_APP_API_URL- Backend API URL (default: http://localhost:5000)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow TypeScript best practices
- Use meaningful commit messages
- Test cross-window synchronization
- Ensure mobile responsiveness
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- YouTube Player API for video control capabilities
- React community for excellent documentation and tools
- BroadcastChannel API for cross-window communication
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed description
- Include browser version and error messages
Made with โค๏ธ for synchronized video viewing