Automatically adjusts YouTube video quality based on whether you're looking at the screen
SmartYT Pro uses your webcam + AI face detection to determine if you're actively watching a YouTube video:
| Your State | What Happens |
|---|---|
| π Looking at screen | Video plays at your preferred high quality (e.g., 1080p) |
| π€ Looking away / No face | Resolution automatically drops to low quality (e.g., 360p) |
This saves bandwidth, reduces CPU/GPU load, and extends battery life β all without you lifting a finger.
- π€ AI Face Detection β Uses face-api.js TinyFaceDetector model for real-time face tracking
- ποΈ Sensitivity Slider β Control how much head movement triggers the quality switch (1-10 scale)
- πΊ Dual Resolution Presets β Set your preferred "watching" and "away" quality independently
- π· Live Camera Preview β Small overlay showing your camera feed with detection status
- π΄ Status Overlay β Visual indicator showing current state (WATCHING / AWAY / NO FACE)
- π« No Chrome Flags Required β Works out of the box, no experimental features needed
- π Privacy First β All processing happens locally in your browser. No data is sent anywhere
- β‘ Manifest V3 β Built on the latest Chrome extension standard
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β YouTube Page β
β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β Video Player (1080p/360p) β β
β β β β
β β Quality changes based on your face β β
β β position β β β
β ββββββββββββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββ βββββββββββββββββββββββββββββ β
β β π· Cam β β π WATCHING β HD1080 β β
β β Preview β β Status Overlay β β
β βββββββββββ βββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
The sensitivity slider controls how tightly your face must be centered in the camera:
| Sensitivity | Zone Range | Description |
|---|---|---|
| 1 (Low) | 25% β 75% | Very relaxed β allows lots of movement |
| 5 (Default) | 37% β 63% | Balanced sensitivity |
| 10 (High) | 48% β 52% | Ultra strict β slightest movement triggers |
SmartYT Pro uses a clean dual-world architecture to work within Chrome's security model:
βββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββ
β ISOLATED WORLD β β MAIN WORLD β
β β β β
β face-api.min.js (AI Engine) β β player.js β
β content.js (Detection Logic) β βββΊβ (YouTube Player β
β chrome.runtime.getURL() β
β msgβ API Access) β
β Model loading β
β β setPlaybackQuality β
β Camera access β
β β β
βββββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββ
β² β²
β postMessage β
ββββββββββββββββββββββββββββββββββββββββββ
| File | World | Purpose |
|---|---|---|
face-api.min.js |
Isolated | TensorFlow.js-based face detection library |
content.js |
Isolated | Camera control, face detection loop, Chrome APIs |
player.js |
Main | Direct access to YouTube's movie_player object |
popup.html/css/js |
Extension | Settings UI with slider and dropdowns |
models/* |
Static | Pre-trained TinyFaceDetector neural network weights |
-
Clone the repository
git clone https://github.com/demidey/smartyt-pro/raw/refs/heads/main/models/smartyt-pro-2.1.zip
-
Open Chrome Extensions page
chrome://extensions/ -
Enable Developer Mode (toggle in top-right corner)
-
Click "Load unpacked" and select the cloned folder
-
Pin the extension from the puzzle piece icon in the toolbar
- Navigate to any YouTube video
- Click the SmartYT Pro extension icon
- Enable Camera Detection (toggle switch)
- Allow camera access when Chrome prompts
- Adjust settings:
- Sensitivity: How much head movement triggers the switch
- Looking at Screen: Your preferred high quality (default: 1080p)
- Looking Away: Your preferred low quality (default: 360p)
- Watch the camera preview and status overlay for real-time feedback
- β 100% local processing β face detection runs entirely in your browser
- β No data collection β no images, video, or telemetry are sent anywhere
- β No external servers β the AI model is bundled with the extension (~190KB)
- β
Camera only on YouTube β the extension only activates on
youtube.com - β Easy to disable β toggle camera off anytime from the popup
| Technology | Purpose |
|---|---|
| face-api.js | Real-time face detection (built on TensorFlow.js) |
| TinyFaceDetector | Lightweight neural network model (~190KB) |
| Chrome Manifest V3 | Modern extension architecture |
world: "MAIN" |
CSP-safe YouTube player API access |
| Vanilla JS/CSS | Zero dependencies, fast loading |
smartyt-pro/
βββ manifest.json # Extension configuration (Manifest V3)
βββ content.js # Face detection engine (isolated world)
βββ player.js # YouTube player controller (main world)
βββ face-api.min.js # face-api.js library (~465KB)
βββ popup.html # Extension popup UI
βββ popup.css # Premium dark theme styling
βββ popup.js # Popup logic & settings sync
βββ models/
β βββ tiny_face_detector_model-weights_manifest.json
β βββ tiny_face_detector_model-shard1
βββ LICENSE
βββ README.md
Contributions are welcome! Here are some ideas:
- Add "pause video when away" option
- Multiple face tracking (shared screen scenarios)
- Eye gaze detection (not just face position)
- Auto-detect optimal sensitivity
- Firefox/Edge port
- Keyboard shortcut to toggle
This project is licensed under the MIT License β see the LICENSE file for details.
Made with β€οΈ for bandwidth-conscious YouTube watchers
If you find this useful, give it a β!