Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Feature Request: Media Keys Control #79

Closed
Typhonragewind opened this issue Nov 10, 2021 · 5 comments · Fixed by #171
Closed

Feature Request: Media Keys Control #79

Typhonragewind opened this issue Nov 10, 2021 · 5 comments · Fixed by #171
Labels
enhancement New feature or request

Comments

@Typhonragewind
Copy link

I'm loving using this, the interface feels so snappy.

Just a minor feature request, if you ever feel bored. Not super important.

Add support to control playback through keyboard media keys (such as play, next, previous, volume control, etc)

@Typhonragewind Typhonragewind added the enhancement New feature or request label Nov 10, 2021
@jeffvli
Copy link
Owner

jeffvli commented Nov 10, 2021

The following media keys are already supported:

  • PlayPause
  • Next
  • Previous
  • Stop

There's also a toggle in the config under Player to enable the media keys globally which has been tested on Windows and Linux (Linux uses the MPRIS interface). For macOS, you'll have to add Sonixd as a trusted accessibility client for the media keys to work. I haven't personally tested this as I don't have a macOS device, but it is listed in the Electron docs.

I can possibly add the VolumeUp, VolumeDown, and VolumeMute media keys since it does seem like Electron supports it.

@Typhonragewind
Copy link
Author

Doh, didn't think to look for that in the options, my bad

@JVT038
Copy link

JVT038 commented Dec 18, 2021

The following media keys are already supported:

* `PlayPause`

* `Next`

* `Previous`

* `Stop`

There's also a toggle in the config under Player to enable the media keys globally which has been tested on Windows and Linux (Linux uses the MPRIS interface). For macOS, you'll have to add Sonixd as a trusted accessibility client for the media keys to work. I haven't personally tested this as I don't have a macOS device, but it is listed in the Electron docs.

I can possibly add the VolumeUp, VolumeDown, and VolumeMute media keys since it does seem like Electron supports it.

Does this work?
It doesn't work for me.
I'm using Windows 10, and when I press pause / resume, it doesn't do anything.
Additionally, when changing the volume, it doesn't show the currently played song with playback controls.
For example, when I play a YouTube video:
image
It shows the playback controls and a volume bar, while with sonixd, it doesn't show the playback controls.
I would like it if you'd add support for this.

@jeffvli
Copy link
Owner

jeffvli commented Dec 19, 2021

@JVT038 If you look at the available key codes, the only ones that are supported are:
image

I don't see separate ones specifically for pause or resume, and is usually combined as the Play/Pause key. Do you have a special keyboard that has those specific media keys? If those are separate, you could possibly rebind them using AutoHotkey to the media keys that Electron supports.

I can look into adding the Windows playback controls though.

@jeffvli
Copy link
Owner

jeffvli commented Dec 22, 2021

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants