diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-09 20:01:16 -0500 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-11-09 20:01:16 -0500 |
| commit | 7d470e8b50cc0ad1b5da06c67923fe90a59d5644 (patch) | |
| tree | 9f54cb40065d247f3809f850527990166c84ec5d /www/js/EventServer.js | |
| parent | 26a7e405bbeb47671c7d439ce9ccec1a45042762 (diff) | |
alarm playback for desktops
Former-commit-id: af8e1b78b5a5ece25d5220007355f5a25e3393b0
Diffstat (limited to 'www/js/EventServer.js')
| -rw-r--r-- | www/js/EventServer.js | 6 |
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 = []; |
