From 4afac4bb645d0f0087c50a52766aabf503e3fe1e Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 20 Feb 2014 22:46:54 -0500 Subject: [PATCH] VRFS-845 handle backend alerts --- web/app/assets/javascripts/session.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js index b7f20f61e..d51fece6c 100644 --- a/web/app/assets/javascripts/session.js +++ b/web/app/assets/javascripts/session.js @@ -104,8 +104,8 @@ 22: {"title": "", "message": ""}, // RUN_UPDATE_CHECK_BACKGROUND, //this is auto check - do 23: {"title": "", "message": ""}, // RUN_UPDATE_CHECK_INTERACTIVE, //this is initiated by user 24: {"title": "", "message": ""}, // STUN_EVENT, // system completed stun test... come get the result - 25: {"title": "", "message": ""}, // DEAD_USER_WARN_EVENT, //the backend is not receiving audio from this peer - 26: {"title": "", "message": ""}, // DEAD_USER_REMOVE_EVENT, //the backend is removing the user from session as no audio is coming from this peer + 25: {"title": "No Audio", "message": "Your system is no longer transmitting audio. Other session members are unable to hear you."}, // DEAD_USER_WARN_EVENT, //the backend is not receiving audio from this peer + 26: {"title": "No Audio", "message": "Your system is no longer transmitting audio. Other session members are unable to hear you."}, // DEAD_USER_REMOVE_EVENT, //the backend is removing the user from session as no audio is coming from this peer 27: {"title": "", "message": ""}, // WINDOW_CLOSE_BACKGROUND_MODE, //the user has closed the window and the client is now in background mode 28: {"title": "", "message": ""}, // WINDOW_OPEN_FOREGROUND_MODE, //the user has opened the window and the client is now in forground mode/ @@ -182,10 +182,18 @@ }); } else if (type === 25) { // DEAD_USER_WARN_EVENT - + app.notify({ + "title": alert_type[type].title, + "text": text, + "icon_url": "/assets/content/icon_alert_big.png" + }); } else if (type === 26) { // DEAD_USER_REMOVE_EVENT - + app.notify({ + "title": alert_type[type].title, + "text": text, + "icon_url": "/assets/content/icon_alert_big.png" + }); } else { context.setTimeout(function() {