简体   繁体   中英

Disable default alert sound for Firefox web notifications

I'm using the Web Notification API to show desktop notifications from my web app under OSX.

In Firefox only, when a notification is triggered, it also plays a sound (in Safari and Chrome, using the exact same code, only the notification displays and there's no accompanying sound effect).

I'd like to disable the notification sound in Firefox, but I can't find anything in the documentation about controlling it. Is this possible?

On OS X, go to System Preferences, then Notifications . Choose Firefox and uncheck Play sound for notifications to get rid of the sound.

The Web Notification API now has the config option silent , but support is patchy, Chrome v43+, Firefox (not yet supported).

I'd suggest building silent into your notifications then if/when Firefox support it, it will just work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM