MarshallOfSound / Google-Play-Music-Desktop-Player-UNOFFICIAL-

A beautiful cross platform Desktop Player for Google Play Music
https://www.googleplaymusicdesktopplayer.com
MIT License
8.28k stars 766 forks source link

Feature Request: Auto pause/play when screen locked/unlocked #1976

Closed swfreak18 closed 7 years ago

swfreak18 commented 7 years ago

It would be great if a feature could be added that, when enabled, would automatically pause the music when the computer screen is locked (Win Key + L) and automatically unpaused when you log back in again.

jostrander commented 7 years ago

I believe similar things like this have been requested before, such as muting when locked, and unfortunately there is no API to check whether or not the screen is unlocked in electron yet. So please feel free to raise this issue again when the API is available, but until then there's nothing we can do.

swfreak18 commented 7 years ago

Thanks for the quick response. It looks like the powerMonitor API allows the detection of the screen locked state but as you mentioned, the unlocked state can't be detected. Even just adding an option to pause or mute when the screen is locked, without resuming when unlocked, would be helpful.

On Fri, Dec 2, 2016 at 11:53 AM, Jesse Ostrander notifications@github.com wrote:

Closed #1976 https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/1976 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/1976#event-880258932, or mute the thread https://github.com/notifications/unsubscribe-auth/AWPEYmEBy2m0SQ5aUNtXSvW3gctAId2_ks5rEE0IgaJpZM4LCwMP .

jostrander commented 7 years ago

I don't see that in the documentation, can you point me to where you see that?

swfreak18 commented 7 years ago

Someone mentioned that it detects the screen locked state as a suspend event. But maybe that is only on Macs. https://discuss.atom.io/t/how-do-i-detect-screen-unlocked-state-using-electron-api/35098

On Fri, Dec 2, 2016 at 12:18 PM, Jesse Ostrander notifications@github.com wrote:

I don't see that in the documentation, can you point me to where you see that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/1976#issuecomment-264508987, or mute the thread https://github.com/notifications/unsubscribe-auth/AWPEYiGlCGdzPk3g3CK10sosV2QhdnR1ks5rEFLugaJpZM4LCwMP .