-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Pause playback when machine is locked #2687
Comments
There really is no formal API for this in electron as far as I can tell. So we can't reliably add this. |
Bummer. Perhaps the other way around then? As in a hot key that will pause the player and lock the machine simultaneously?
|
@jostrander It's not that there's no formal way to do it in Electron, I don't think there's a way to do it on all platforms. I think Something to offload to a magical native module I feel, I'll take a look in chromium though and see if they've done the hard work for us. |
This can be implemented in Windows through the System Media Transport Controls, though we'd have to work out the double skip issue that is currently unresolved. (See this PR) |
On Linux it can be accomplished over DBus. |
High Sierra supports locking without sleep, so that method won't work in all cases. |
@Kytech Yes please. Music control during connected standby is just about the only thing making me wish for a native Windows store version of GPM. |
I made a very quick nodeJS script that uses the Playback API: https://github.com/tuur29/scripts/blob/master/pauseGPMDP.js |
I would think the builtin powerMonitor electron API would be what you'd want to use primarily although for Linux as powerMonitor does not appear to support screen lock events you'd still need DBus for that. |
OS:
Windows 10
Issue Descriptions:
Feature Request: Pause playback when machine is locked
Steps to Reproduce:
I love the app, thank you! The one thing I don't like is that it doesn't have the option to pause playback when my computer is locked, like other similar apps I have used. I use this at work, and always lock my computer when I walk away so I would like to have the music pause when I do this, and resume when I return - rather than needing to pause and resume it manually. Thank you again for the excellent app!
The text was updated successfully, but these errors were encountered: