Skip to content

Repository files navigation

YouTube Music Mini Player

A lightweight and customizable desktop application for YouTube Music, built using Electron. The application provides a seamless experience for controlling YouTube Music with system tray integration, media controls, and taskbar features.


Features

System Tray Integration

  • Minimize to Tray: The app minimizes to the system tray.
  • Tray Menu:
    • Show/Hide the app.
    • Playback controls: Play/Pause, Next, and Previous track.
    • Quit the application.

Media Controls

  • Taskbar Thumbnail Toolbar:
    • Play/Pause, Next, and Previous buttons directly accessible from the taskbar.
    • Syncs with the current playback state and updates dynamically.
  • Windows Media Overlay:
    • Supports the native Windows Media Overlay with title, artist, and album information.

Now Playing Notifications

  • Displays notifications when the track changes, including:
    • Song title.
    • Artist name.
    • Album artwork.

Dark/Light Theme Adaptive Icons

  • Automatically updates button icons and tray icons to match the system's current light or dark theme.

Playback State Sync

  • Dynamically updates the app's controls and tooltips to reflect the current playback state (e.g., "Playing" or "Paused").

Installation

Prerequisites

  1. Install Node.js (version 14 or later).
  2. Install Git.

Steps

  1. Clone this repository:
    git clone https://github.com/yourusername/youtube-music-mini-player.git
    cd youtube-music-mini-player
  2. Install dependencies:
    npm install
  3. Start the app in development mode:
    npm start

Build

To build the app for distribution:

  1. Install electron-builder (if not already installed):
    npm install electron-builder --save-dev
  2. Build the app:
    npm run build
  3. Find the distributable files in the dist directory.

Usage

  • Run the App: Double-click the executable after building.
  • Minimize to Tray: Press the minimize button on the window.
  • Tray Menu:
    • Show App: Reopens the main app window.
    • Play/Pause, Next, Previous: Controls playback.
    • Quit: Exits the app.

Key Features in Code

  • Media Session API: Used to integrate with Windows Media Overlay.
  • Electron's Thumbnail Toolbar: Adds taskbar media controls.
  • Dynamic Theme Detection: Updates icons based on light/dark mode.

Contributing

Contributions are welcome! Please:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-name
  3. Make your changes and commit them:
    git commit -m "Description of changes"
  4. Push to your branch:
    git push origin feature-name
  5. Open a pull request.

Future Improvements

  • Add support for custom hotkeys.
  • Implement additional playback features (e.g., shuffle, repeat).

Screenshots

Window Screenshot Window Thumbar Screenshot System Tray Menu Screenshot Visualizer Menu image image image image


Acknowledgments

About

An Electron.js wrapper for the YouTube Music PWA with better media controls

Topics

Resources

Stars

Watchers

Forks

Releases

Sponsor this project

Used by

Contributors

Languages