Open jacobbubu opened 8 years ago
I thought DND only applied to notifications through the Notification Center, which N1 uses for notifications under OS X.
I've tested again. The sound played by N1 no matter how does DND set.
Hmm. If DND is set, does Chrome play sounds from a website using HTML5 Audio (e.g. YouTube with HTML5 player)?
@jacobbubu The offending line is part of sound-registry.coffee.
It utilizes the HTML5 Audio element to play audio. Normally this is fine since you are using the webpage that is playing audio and you can close the webpage when you don't want it to.
This is why N1 plays audio when DND is set. It seems DND is hard to detect from inside OS X applications and, from the part of Electron's documentation I read, Electron doesn't offer a way to detect DND on OS X.
Playing sounds in video that is initiated by myself and I'm expecting to hear that. When I turn the DND on that means I'm not expecting any interruption happens during that time, so playing sound for incoming mail becomes a disturbance (I can not control when the mail comes in).
Wow. We commented at the same time.
Thank you for the explanation. Looks like that we need a native module to do that. Anyway that is a nice-to-fix bug.
Yeah. I could look to see if someone made a native module compatible with Electron.
And.. unfortunately nobody has created a Do Not Disturb module. I am not familiar with Mac OS X's DND setting and from a quick Stack Overflow search many developers don't encounter this type of issue.
It looks like it's possible to ask the operating system whether "Do not Disturb" is active, but it's not pleasant at all (http://apple.stackexchange.com/questions/59572/get-os-x-notification-center-state-from-the-command-line/69760#69760). We'll look to implement this in a native node module in the future, but we may table it for now. Pull requests welcome of course if anyone wants to give it a go before our team does!
It's really annoying to have to manually quit N1 prior to giving any presentation. Has any progress been made on this?
N1 keeps playing sound and hoping up the notification when the new mail arriving even I turned on the Dot Not Disturb on MacOS.