A single-file now-playing widget for YouTube Music Desktop v2. Features dynamic color theming from album art.
- 🎨 Dynamic Color Theming — automatically extracts colors from album art
- 🌊 Animated Waveforms — visualizer-style bars that pulse with playback
- 🔒 Secure OAuth — token-based auth with YouTube Music Desktop v2
- 📦 Single File — just one HTML file per theme, no dependencies
- YouTube Music Desktop (v2.x) — Download here
- OBS Studio (or any streaming software with browser sources)
-
Download the widget
# Clone the repo git clone https://github.com/yourusername/vibebar.git cd vibebar
-
Enable YTM Desktop Companion Server
- Open YouTube Music Desktop
- Go to Settings → Integrations
- Turn ON Companion Server
- Turn ON Enable companion authorization
-
Add to OBS
- Add a new Browser Source
- Point it to
ytm-widget.html - Set dimensions: Width: 1200px, Height: 420px
- Check ✅ "Shutdown source when not visible"
-
First-time setup
- Click "Connect to YTMDesktop" in the widget
- Accept the authorization prompt in YTM Desktop
- Token is saved — reconnects automatically after this
All themes use CSS variables at the top of the file:
:root {
--c1: #000000; /* Background dark */
--c2: #23222e; /* Background light */
--c3: #a1b6fc; /* Accent color */
--c4: #c0c9f0; /* Title text */
--c5: rgba(225, 192, 240, 0.6); /* Artist text */
--art: 30vw; /* Album art size */
--gap: 1.6vw; /* Space between sections */
--pill-r: 2.2vw; /* Border radius */
}Change these values to customize colors, sizes, and spacing.
Find this in the widget file if you want to change update speed:
pollMs: 500, // Check for updates every 500ms (default)Widget fades out after 6 seconds of no playback:
idleMs: 6000, // Hide after 6 seconds idle (default)- Authentication — Uses YTM Desktop v2's Companion API with OAuth-style token flow
- Polling — Requests
/api/v1/stateevery 500ms for track info - Color Extraction — ColorThief.js analyzes album art and generates palette
- Dynamic Updates — CSS variables update on track change for smooth transitions
- Seamless Scrolling — Duplicates text in a flex container for infinite loop effect
Widget shows "Connect to YTMDesktop" but won't connect
- Make sure YTM Desktop is running
- Check that Companion Server is ON in Settings → Integrations
- Try port 9863 in your browser:
http://localhost:9863/api/v1/state
Token expired / session lost
- Click "Connect" again and re-authorize
- Token is stored in localStorage and persists between OBS restarts
Title text is cut off / not scrolling
- Make sure your OBS Browser Source width matches the widget width (1200px default)
- Text should auto-scroll when it overflows — if not, check browser console for errors
Colors look wrong / too dark
- Some album art produces very dark colors — adjust opacity in theme builder
- Or manually edit
--c1-rgband--c2-rgbin the CSS
Waveform not animating
- This is a CSS animation — make sure OBS isn't throttling the browser source
- Uncheck "Shutdown source when not visible" if it's on a hidden scene
Contributions are welcome! Feel free to:
- 🐛 Report bugs via Issues
- 💡 Suggest features or new themes
- 🎨 Submit your custom themes as PRs
- 📖 Improve documentation
MIT License — see LICENSE for details.
You're free to use, modify, and distribute VibeBar in any project, including commercial streams.
Built with:
- ColorThief for palette extraction
- Outfit font by Rodrigo Fuenzalida
- Inspired by the YouTube Music Desktop community
If VibeBar improved your stream, consider ⭐ starring the repo!