share-file-systems icon indicating copy to clipboard operation
share-file-systems copied to clipboard

OS Notification of text messages

Open prettydiff opened this issue 4 years ago • 2 comments

This functionality is achieved in Windows 10. When a text message comes into the browser while the browser is not the active window it blinks orange in the taskbar. Unfortunately, I only know how to achieve this effect in Windows.

See: https://github.com/prettydiff/share-file-systems/blob/master/lib/terminal/server/osNotification.ts

I am looking for guidance to achieve a similar effect on other operating systems.

prettydiff avatar Apr 12 '21 14:04 prettydiff

Have you considered the Web Notifications API (https://caniuse.com/notifications)? If you're willing to forgo Safari iOS support, it might be a possibility.

I have also seen something like a notification count API that actually shows a small number next to the browser icon, but I can't find it at the moment.

terrablue avatar Aug 12 '22 21:08 terrablue

https://developer.mozilla.org/en-US/docs/Web/API/Badging_API

There we go. Though this hasn't seen much adoption beyond Chrome-like Windows/macOS.

terrablue avatar Aug 12 '22 21:08 terrablue