diff options
author | nickago <ngonella@calpoly.edu> | 2015-08-12 15:27:46 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-08-12 15:27:46 -0700 |
commit | 0b22bb25c1791a25d1f4901cd0acd99bae795f3e (patch) | |
tree | 8b8999589a8719c53cdab1032401e562d049bd3c /web/react/utils/utils.jsx | |
parent | b50ba05626599d54f4fe6a391d66cbc71051b7ac (diff) | |
download | chat-0b22bb25c1791a25d1f4901cd0acd99bae795f3e.tar.gz chat-0b22bb25c1791a25d1f4901cd0acd99bae795f3e.tar.bz2 chat-0b22bb25c1791a25d1f4901cd0acd99bae795f3e.zip |
Handed control of notification sounds over to browser for firefox
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r-- | web/react/utils/utils.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 2214b6239..b1832f3f1 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -124,8 +124,10 @@ module.exports.notifyMe = function(title, body, channel) { } module.exports.ding = function() { - var audio = new Audio('/static/images/ding.mp3'); - audio.play(); + if (!navigator || navigator.userAgent.toLowerCase().indexOf("firefox") === -1) { + var audio = new Audio('/static/images/ding.mp3'); + audio.play(); + } } module.exports.getUrlParameter = function(sParam) { |