简体   繁体   English

禁用Firefox Web通知的默认警报声音

[英]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. 我正在使用Web Notification API在OSX下显示来自我的Web应用程序的桌面通知。

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). 仅在Firefox中,当触发通知时,它还会播放声音(在Safari和Chrome中,使用完全相同的代码,仅显示通知,并且没有伴音效果)。

I'd like to disable the notification sound in Firefox, but I can't find anything in the documentation about controlling it. 我想在Firefox中禁用通知声音,但我在文档中找不到有关控制它的任何内容。 Is this possible? 这可能吗?

On OS X, go to System Preferences, then Notifications . 在OS X上,转到“系统偏好设置”,然后转到“ 通知” Choose Firefox and uncheck Play sound for notifications to get rid of the sound. 选择Firefox并取消选中播放声音以获取通知以消除声音。

The Web Notification API now has the config option silent , but support is patchy, Chrome v43+, Firefox (not yet supported). Web Notification API现在具有配置选项无声 ,但支持是补丁,Chrome v43 +,Firefox(尚不支持)。

I'd suggest building silent into your notifications then if/when Firefox support it, it will just work. 我建议在你的通知中建立静音,然后如果/当Firefox支持它,它就会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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