Describe the bug
On Windows 10/11, Stremio relies purely on WM_APPCOMMAND messages to intercept hardware media keys. Because the app does not register a SystemMediaTransportControls (SMTC) session, modern apps (like Chrome, Edge, Spotify) that do register SMTC will completely hijack media keys. Windows prioritizes SMTC and stops broadcasting the legacy WM_APPCOMMAND messages to background apps, leaving Stremio starved of media key inputs.
Proposed Fix (Proof of Concept)
I've attached a .patch file that integrates the souvlaki crate into app.rs.
It registers an SMTC session tied to the window handle, synchronizes mpv-prop-change (pause/play) and mpv-event-ended states with the OS, and routes SMTC events back to the web UI using the existing web_tx channel.
Note: I do not have a Rust environment to compile and test this locally, so it is provided as an untested proof-of-concept/starting point for the team to evaluate.
stremio_smtc_fix.patch
Describe the bug
On Windows 10/11, Stremio relies purely on
WM_APPCOMMANDmessages to intercept hardware media keys. Because the app does not register aSystemMediaTransportControls(SMTC) session, modern apps (like Chrome, Edge, Spotify) that do register SMTC will completely hijack media keys. Windows prioritizes SMTC and stops broadcasting the legacyWM_APPCOMMANDmessages to background apps, leaving Stremio starved of media key inputs.Proposed Fix (Proof of Concept)
I've attached a
.patchfile that integrates thesouvlakicrate intoapp.rs.It registers an SMTC session tied to the window handle, synchronizes
mpv-prop-change(pause/play) andmpv-event-endedstates with the OS, and routes SMTC events back to the web UI using the existingweb_txchannel.Note: I do not have a Rust environment to compile and test this locally, so it is provided as an untested proof-of-concept/starting point for the team to evaluate.
stremio_smtc_fix.patch