Talk to me · Julian Reder · Resume · GitHub

Amazon Music Discord RPC

Solo Projects · 2026

A browser extension and lightweight Rust background helper that shares current Amazon Music playback status to Discord Rich Presence.

2026 Private (Architecture Only)
JavaScriptRustDiscord IPC
Amazon Music tab Media Session API Extension no DOM scrape Rust host native messaging Discord IPC Rich Presence coalesce + 5 updates / 20s reconnect, Chromium and Firefox
Architecture diagram illustrating how media playback data flows from the browser extension through the Rust helper process into Discord IPC.

Built

I created a browser extension and native messaging companion in Rust that displays active Amazon Music tracks in Discord status. The browser extension reads track details directly from the standard browser Media Session API and internal player state rather than fragile web page scraping. The Rust background process communicates with the browser using native messaging and sends status updates over Discord IPC, incorporating update batching and rate limiting to keep Discord presence smooth and responsive.

Displaying playback status without fragile web scraping

Discord provides built-in Rich Presence integration for Spotify, but users of other streaming platforms like Amazon Music lack an official way to share their currently playing music with friends. Many third-party solutions attempt to read song titles by scraping HTML elements directly from the web player, which frequently breaks whenever the streaming service updates its website layout or CSS classes. I built this extension to extract song titles, artists, album artwork, and playback progress cleanly by hooking into the browser's standard Media Session API and internal player events.

Because web extensions cannot open local operating system sockets directly, the browser component pairs with a lightweight native helper program written in Rust. This separation keeps the extension secure while allowing status updates to reach the local Discord desktop client through standard inter-process communication.

Native communication and rate limiting

The browser extension sends track updates to the companion application using the native messaging protocols supported by Chromium and Firefox. The Rust background application connects to Discord's local IPC pipe, parses incoming playback packets, and manages connection recovery if Discord is closed and reopened during playback.

To avoid triggering Discord's network rate limits or causing the status widget to flicker on every elapsed second of audio, the Rust helper batches incoming progress updates and enforces a maximum rate of five updates per twenty seconds. This architecture results in a fast, low-memory utility that runs quietly in the background without requiring heavy frameworks or separate desktop interface windows.

Amazon Music tab Media Session API Extension no DOM scrape Rust host native messaging Discord IPC Rich Presence coalesce + 5 updates / 20s reconnect, Chromium and Firefox
Data flow from the browser tab through native messaging into the Rust helper and Discord desktop client.