pocket-casts-desktop-app icon indicating copy to clipboard operation
pocket-casts-desktop-app copied to clipboard

Media keys only work once

Open gadtfly opened this issue 5 years ago • 11 comments

On Ubuntu 18.10 (and reported in several other distros by users of other Electron apps):

Only the first use of a media key (play/pause, next, previous) works as intended.

Subsequent presses fail to make it to the app.

This appears to be an issue with Electron's globalShortcut, that manifests in systems using DBus (recent Ubuntus, I think any Gnome setup, and others).

There are a few reported workarounds involving talking to DBus directly.

See:

https://github.com/electron/electron/issues/12415 https://github.com/electron/electron/issues/10159 https://github.com/electron/electron/issues/5268 https://github.com/electron/electron/issues/3941

gadtfly avatar Mar 15 '19 05:03 gadtfly

Looking into this. Thank you for reporting.

@gadtfly To be clear, you're affected by this issue and you are using Ubuntu 18.10? Did you install the snap or .deb for this app?

FelicianoTech avatar Mar 15 '19 13:03 FelicianoTech

I've tried the snap, the .deb, and electron-buildering it from your source. The issue is indeed effecting me in all those cases, on Ubuntu 18.10.

gadtfly avatar Mar 15 '19 13:03 gadtfly

I'm noticing the same on 18.04, from the snap install.

salvadornico avatar Mar 20 '19 06:03 salvadornico

I'm using Ubuntu 18.04 with .deb installation and i'm not having this issue. Did you tested with Ubuntu 18.04 using the .deb package?

hasher-hasher avatar Apr 06 '19 13:04 hasher-hasher

I run the snap and haven't had this problem. I've yet to be able to reproduce this issue. :/

FelicianoTech avatar Apr 09 '19 14:04 FelicianoTech

I'm running the snap on pop!_OS (Ubuntu 18.04 LTS) and it fails after the initial media key as well. Is there any log file for snaps I could provide you?

klemm89 avatar May 13 '19 19:05 klemm89

I can reproduce this issue on Ubuntu 19.04 now. I'm still waiting for Electron to figure this out. I tried to implement one of the workarounds listed but couldn't get it to work.

FelicianoTech avatar Jun 03 '19 05:06 FelicianoTech

I'm also running into issues where the media controls on my keyboard stop working after the first key press. Not sure if it helps, but maybe you can take a look at this other project that's an Electron wrapper for Pocket Casts. The project's been abandoned, but the media controls do still work for me (except curiously the "Previous Track" key).

Hopefully this helps in any way.

iuymatiao avatar Apr 30 '20 09:04 iuymatiao

MPRIS would certainly be the most comprehensive solution.

tribut avatar Jul 13 '20 19:07 tribut

I've forked https://github.com/jgierer12/pocket-casts-linux and fixed some annoying MPRIS bugs. If there's interest, it might be possible to port the MPRIS implementation from that repo into this one.

fuadsaud avatar Jan 12 '21 17:01 fuadsaud

@fuadsaud A PR to this repo so that I may test these changes is definitely welcome.

FelicianoTech avatar Jan 12 '21 22:01 FelicianoTech

👁️

FelicianoTech avatar Oct 25 '23 01:10 FelicianoTech