I’m writing a music app using Electron (it wraps an existing music website inside an electron app, and provides keyboard shortcuts and other features).
I want to write it so that when the user goes away (screen saver starts), it pauses the music, and then when the mac is resumed, music continues. I can do it on standby / resume using the powerMonitor module, but can’t figure out how to do it on just screensaver.
Is there a way to do this?
Thanks!