yamusic-rs is an unofficial open-source Yandex Music client written in Rust. It isn’t affiliated with Yandex. A third-party developer maintains it. On Windows it was missing two things: the system media card and pause from headphones.

What was missing

On Linux the client already showed up in the system player through MPRIS (mpris.rs). On Windows there was nothing. The track didn’t appear in quick settings or on the lock screen, and Bluetooth headphone buttons did nothing.

What I built

I wrote src/smtc.rs, 355 lines modeled on mpris.rs. It hooks the client into System Media Transport Controls, the Windows API for media players. The card now shows title, artist, album, cover art, play state and position. Play, pause and track switching work from headphones (AVRCP) and keyboard media keys.

A couple of smaller things came up along the way. I removed the old global key capture via RegisterHotKey from tray.rs, since it clashed with SMTC and other players. Windows 11 also listed the client as “Unknown app”. I set an AppUserModelID for the process and create a Start menu shortcut if there isn’t one. If the shortcut already points to the same exe, the file is left alone.

The windows crate was already in Cargo.lock as a transitive dependency. I added it directly with the features I needed, so no new crates entered the build.

How it landed

PR #69: 6 files, +400 and -23 lines. I opened it on November 23, 2026, and the author merged it the next day. It’s one PR in someone else’s project with 490 stars. Most of the client was written by other people.