Control YouTube on your PC from your phone - A real-time remote control system for YouTube that frees you from your keyboard.
TubeControl is a three-part system that turns your mobile phone into a powerful remote control for YouTube on your computer:
- 🌐 Web App: Mobile-first remote control interface
- 🔌 Browser Extension: Receives commands and controls YouTube
- 🚀 Backend Server: WebSocket bridge for real-time communication
▶️ Play/Pause- 🔊 Volume control with mute
- ⏩ Seek/scrub through videos
- ⏭️ Next/Previous (for playlists)
- ⛶ Fullscreen toggle
- Search for videos from your phone
- Browse search results with thumbnails
- Play any video on your PC with one tap
- See what's currently playing
- Simple 6-digit room code
- Instant pairing
- Auto-reconnect on connection loss
- No account or login required
┌─────────────────┐
│ Mobile Phone │
│ (Web App) │ WebSocket
│ React/Next.js │◄──────────┐
└─────────────────┘ │
│
┌──────────▼────────┐
│ Backend Server │
│ Node.js/Socket │
└──────────┬────────┘
│
┌─────────────────┐ │
│ PC Browser │ WebSocket │
│ (Extension) │◄───────────┘
│ YouTube Tab │
└─────────────────┘
TubeControl/
├── apps/
│ ├── web/ # Next.js web app (the remote)
│ ├── extension/ # Browser extension (the receiver)
│ └── server/ # Node.js/Socket.io server (the bridge)
├── packages/
│ └── common/ # Shared types and utilities
├── pnpm-workspace.yaml
└── package.json
- Node.js 18+ and pnpm
- A modern browser (Chrome, Edge, or Firefox)
- A mobile device or secondary browser for the remote
-
Clone the repository
git clone <repository-url> cd TubeControl
-
Install dependencies
pnpm install
You need to run all three components:
pnpm dev:serverThe server will start on http://localhost:3001
pnpm dev:webThe web app will be available at http://localhost:3000
cd apps/extension
pnpm buildThen load the extension in your browser:
Chrome/Edge:
- Navigate to
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked"
- Select the
apps/extension/distdirectory
Firefox:
- Navigate to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select any file in the
apps/extension/distdirectory
- Open YouTube on your PC
- Click the TubeControl extension icon - you'll see a 6-digit room code
- Open the web app on your phone (
http://localhost:3000or your deployed URL) - Enter the room code from the extension
- Start controlling! 🎉
# Install all dependencies
pnpm install
# Build all packages
pnpm build:all
# Dev mode for specific apps
pnpm dev:server # Start backend server
pnpm dev:web # Start web app
# Build specific apps
pnpm build:server
pnpm build:web
pnpm build:extensionBackend Server (apps/server/.env):
PORT=3001Web App (apps/web/.env):
NEXT_PUBLIC_SERVER_URL=http://localhost:3001- Web App: Next.js 14, React, TypeScript, Socket.io-client
- Extension: Vanilla JavaScript (ES6+), WebExtensions API
- Backend: Node.js, Express, Socket.io
- Package Manager: pnpm with workspaces
- Real-time Communication: WebSockets via Socket.io
- Extension generates a unique 6-digit room code
- Extension joins a Socket.io room with that code
- User enters the code in the web app
- Web app joins the same room
- Both devices can now communicate through the server
Mobile App → Server → Extension → YouTube Player
(relay) (execute) (DOM/API)
YouTube Player → Extension → Server → Mobile App
(state) (emit) (relay) (update UI)
- ✅ Basic player controls
- ✅ Volume and seek control
- ✅ Search functionality
- ✅ Simple pairing system
- ✅ Real-time sync
- ⏳ Queue management
- ⏳ Playlist support
- ⏳ User playlists access
- ⏳ QR code pairing
- ⏳ Multiple device support
- ⏳ Keyboard shortcuts
- ⏳ Picture-in-picture control
- Check that the backend server is running
- Verify the
SERVER_URLinbackground.jsis correct - Open the browser console to check for errors
- Ensure you're entering the correct 6-digit code
- Check that the extension is installed and active
- Verify both devices can reach the backend server
- Make sure you're on a YouTube video page
- Check the browser console for errors
- Try refreshing the YouTube page
- The extension navigates to YouTube search
- Wait a moment for the page to load
- Results are scraped from the search page DOM
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
bashward
Built following the Product Requirements Document for a YouTube Remote Control System.
Enjoy controlling YouTube from anywhere in your home!