oscartbeaumont / ElectronPlayer

An Electron Based Web Video Services Player. Supporting Netflix, Youtube, Twitch, Floatplane, Hulu And More
MIT License
487 stars 93 forks source link

MPRIS support #21

Open tonyxty opened 5 years ago

tonyxty commented 5 years ago

Is there plan to add MPRIS support? Would be nice to be able to control it via system keyboard shortcuts when using it as a music player.

oscartbeaumont commented 5 years ago

For music you mean Youtube? It seems it would be pretty easy (famous last words) using something like mpris-service, I will look into adding this. I will just add play and pause functionality as anything else would require deep website integration which I don't really want (and have time) to do.

Scrumplex commented 5 years ago

We could borrow code from the KDE Plasma Browser Integration, which hooks into the Media Session API. It is GPL though. I don't know how to handle GPL code inside of MIT code.

tonyxty commented 5 years ago

YouTube is what I have in mind. But a play/pause functionality from keyboard would be convenient on all occasions :)

oscartbeaumont commented 4 years ago

I am not going to add MPRIS support as I personally prefer to be able to pause and play music (Spotify) using my media keys even if a video is playing. Playing music isn't really the aim of the app and I would be surprised if there isn't an Electron app for this where this feature would make more sense. I would accept a PR for this if it didn't add a large amount of complexity to the app but I will not be coding this myself. From my quick look, this would have to be set up for each site specifically which would be time consuming.