plex-media-player icon indicating copy to clipboard operation
plex-media-player copied to clipboard

Media keys still don't work - Ubuntu GNOME 17.04

Open Snowman3456 opened this issue 8 years ago • 14 comments

Media keys are ignored. Instead you get a large icon of a cancel sign (circle with line through it).

Basically means you must have focus on the window and use keyboard shortcuts instead of having global media control.

This media keys don't work:

  • Play/Pause
  • Skip Next
  • Skip Back

Snowman3456 avatar Mar 15 '17 22:03 Snowman3456

Yep, no global support. I wonder if PMP grabbing the media keys globally would be good enough? Otherwise we'd have to implement the mpris API.

Instead you get a large icon of a cancel sign (circle with line through it).

Uh what?

ghost avatar Mar 16 '17 03:03 ghost

@wm4 One of these guys: https://imgur.com/a/oMII0

I'd be happy enough if PMP did that. Can't see myself using two media applications at once.

Snowman3456 avatar Mar 17 '17 01:03 Snowman3456

I'd also really like to see this, unfortunately I don't know what I'm doing nearly enough to begin implementing them.

JakeStanger avatar Jul 03 '17 19:07 JakeStanger

@wm4 pretty please?

Snowman3456 avatar Jul 05 '17 14:07 Snowman3456

Media keys still do nothing - not explicitly a PMP issue but PMP should claim them so they are useful.

Snowman3456 avatar Aug 21 '17 18:08 Snowman3456

They can be made to work within applications as per: https://askubuntu.com/questions/48393/how-to-make-the-keyboard-media-keys-to-work-with-vlc-globally

They work in VLC & SMPlayer.

Snowman3456 avatar Aug 21 '17 19:08 Snowman3456

That would require implementing MPRIS2 support. That's a not quite trivial Linux-only dbus API. This wasn't done yet, so media keys won't work globally.

ghost avatar Aug 22 '17 15:08 ghost

@wm4 Would this be helpful? If so, where would we put it in the source tree? ~~http://biboudis.blogspot.com/2013/11/qt-mpris2-and-clementine.html~~ Just realized that there is a wrapper around QtDBus for MPRIS2: https://github.com/nemomobile/qtmpris

nhubbard avatar Oct 30 '17 16:10 nhubbard

I'd second full MPRIS integration, especially for feature parity with Windows, where PMP is integrated into the media player controls and whatnot.

towo avatar Apr 10 '18 09:04 towo

I'll need to investigate this, but i also found this https://wiki.qt.io/How_to_catch_audio_keys_on_Linux_in_QML_applications

LongChair avatar Apr 10 '18 13:04 LongChair

Yeah, the audio key capture thing would be the easy solution and serve to fulfill this bug, but I'd advocate on going for MPRIS due to intercompatibility advantages and being a generally cleaner approach.

With MPRIS, other applications can act on the fact that Plex is playing something - VoIP applications muting/pausing your playback, for example.

towo avatar Apr 12 '18 12:04 towo

MPRIS would definitely be the ideal way to go; audio key capture is a bit of a quick-fix.

JakeStanger avatar Apr 12 '18 12:04 JakeStanger

Although technically MPRIS seems the right thing, i am concerned by both ways :

  • Adding another dep (like the nemomobile link above) doesn't look sane to me
  • using dbus API within Qt brings a lot of stuff in for a few keys.

I really wish Qt would bring support for multimedia Keys in the framework , that's where it would make sense.

LongChair avatar Apr 14 '18 09:04 LongChair

As a workaround to get mpris to work. I found that if libmpv was built with cplugins enabled this will work with plex media player.

https://github.com/hoyon/mpv-mpris

EDIT: After some usage I noticed that only the play/pause buttons will work though.

TheGreatMcPain avatar Feb 05 '19 22:02 TheGreatMcPain