summaryrefslogtreecommitdiff
path: root/www/js/EventServer.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/EventServer.js')
-rw-r--r--www/js/EventServer.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/www/js/EventServer.js b/www/js/EventServer.js
index 12935392..8b43fa1d 100644
--- a/www/js/EventServer.js
+++ b/www/js/EventServer.js
@@ -139,6 +139,7 @@ angular.module('zmApp.controllers')
ws.$on('$message', function (str) {
ZMDataModel.zmLog("Real-time event: " + JSON.stringify(str));
+
// Error messages
if (str.status != 'Success') {
@@ -170,6 +171,7 @@ angular.module('zmApp.controllers')
if (str.status == 'Success' && str.event == 'alarm') // new events
{
+ new Audio('sounds/blop.mp3').play();
var localNotText = "Latest Alarms: ";
$rootScope.isAlarm = 1;
@@ -448,10 +450,12 @@ angular.module('zmApp.controllers')
$rootScope.isAlarm = 0;
$rootScope.tappedNotification = 1;
} else {
- // alarm received in foregroun
+ // alarm received in foreground
//var str=data.additionalData.alarm_details;
console.log("PLAYING MEDIA");
media.play();
+
+
var str = data.message;
// console.log ("***STRING: " + str + " " +str.status);
var eventsToDisplay = [];