YTMPX is a Chrome extension that shows your current YouTube Music track in Discord.
To use it, run
pnpm --filter=chrome buildand load the dist directory in chrome://extensions/.
The server that powers the YTMPX Chrome extension, handling WebSocket connections and Discord RPC integration.
- WebSocket server for real-time communication with the Chrome extension
- Discord RPC integration for showing current YouTube Music track
- Toggle Discord RPC on/off from the extension UI
- Real-time track updates (play, pause, track changes)
To use the ready-made Discord Application, run the following command:
npx --yes ytmpxThat's it! You can now use the YTMPX Chrome extension.
- Go to Discord Developer Portal
- Create a new application
- Go to "General Information" and copy the "Application ID"
- Replace
123456789012345678insrc/constants.tswith your actual Application ID
pnpm installpnpm devThe server will start on ws://localhost:8765 and connect to Discord.
The server handles the following events from the Chrome extension:
track- Track information (title, artist, duration, etc.)pause- Track pausedresume- Track resumedTURN_ON- Enable Discord RPCTURN_OFF- Disable Discord RPC
- Shows current track title and artist
- Displays play/pause status with icons
- Shows progress bar with timestamps
- Includes "Listen on YouTube Music" button
- Automatically clears when extension disconnects
- Can be toggled on/off from the extension UI
# Build TypeScript
pnpm build
# Run in development
pnpm dev