From 0b22bb25c1791a25d1f4901cd0acd99bae795f3e Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Wed, 12 Aug 2015 15:27:46 -0700
Subject: Handed control of notification sounds over to browser for firefox

---
 web/react/utils/utils.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'web/react/utils/utils.jsx')

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) {
-- 
cgit v1.2.3-1-g7c22

