audius-client icon indicating copy to clipboard operation
audius-client copied to clipboard

Media buttons not working

Open koloz193 opened this issue 4 years ago • 3 comments

Currently the media buttons (play/pause/prev/next) don't seem to work in controlling music playback. Would love to be able to control the music when in another desktop window.

koloz193 avatar Oct 29 '20 21:10 koloz193

@zkolodny, are you referring to the media buttons on your keyboard?

piazzatron avatar Nov 05 '20 21:11 piazzatron

@piazzatron yea, so maybe its different but im on the macbook pro with a touchbar and the controls don't seem to be tracking

koloz193 avatar Nov 11 '20 15:11 koloz193

I just tested this on Windows 10, with media keys, on both Chrome 87.0.4280.66 (64 bit) & Firefox 83.0 (64-bit). "Pause" and "Play" seem to be working just fine (I believe these are working by default for all audio from the browser), but I can confirm that both "Previous" and "Next" are not working.

I believe you could achieve the expected functionality with https://developer.mozilla.org/en-US/docs/Web/API/MediaSession/setActionHandler (not excellent browser support) or simply listening for the keys 176 (next) & 177 (previous) if the browser doesn't support the MediaSession actions.

kerkkoh avatar Nov 22 '20 13:11 kerkkoh

Closing, see https://github.com/AudiusProject/audius-client/pull/161

sliptype avatar Sep 11 '23 21:09 sliptype