diff --git a/web/app/assets/javascripts/session.js b/web/app/assets/javascripts/session.js index 73d77dc65..b7f20f61e 100644 --- a/web/app/assets/javascripts/session.js +++ b/web/app/assets/javascripts/session.js @@ -86,15 +86,42 @@ 8: { "title": "Session Latency", "message": "The latency of your audio device combined with your Internet connection has become high enough to impact your session quality. For troubleshooting tips, click here." }, // NETWORK_PING, 9: {"title": "", "message": ""}, // BITRATE_THROTTLE_WARN, 10: { "title": "Low Bandwidth", "message": "The available bandwidth on your network has become too low,and this may impact your audio quality. For troubleshooting tips, click here." }, // BANDWIDTH_LOW - //IO related events + + // IO related events 11: { "title": "Input Rate", "message": "The input rate of your audio device is varying too much to deliver good audio quality. For troubleshooting tips, click here." }, // INPUT_IO_RATE 12: {"title": "", "message": ""}, // INPUT_IO_JTR, 13: { "title": "Output Rate", "message": "The output rate of your audio device is varying too much to deliver good audio quality. For troubleshooting tips, click here." }, // OUTPUT_IO_RATE 14: {"title": "", "message": ""}, // OUTPUT_IO_JTR, + // CPU load related 15: { "title": "CPU Utilization High", "message": "The CPU of your computer is unable to keep up with the current processing load, and this may impact your audio quality. For troubleshooting tips, click here." }, // CPU_LOAD 16: {"title": "", "message": ""}, // DECODE_VIOLATIONS, - 17: {"title": "", "message": ""} // LAST_THRESHOLD + 17: {"title": "", "message": ""}, // LAST_THRESHOLD + 18: {"title": "", "message": ""}, // WIFI_NETWORK_ALERT, //user or peer is using wifi + 19: {"title": "", "message": ""}, // NO_VALID_AUDIO_CONFIG, // alert the user to popup a config + 20: {"title": "", "message": ""}, // AUDIO_DEVICE_NOT_PRESENT, // the audio device is not connected + 21: {"title": "", "message": ""}, // RECORD_PLAYBACK_STATE, // record/playback events have occurred + 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 + 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/ + + 29: {"title": "", "message": ""}, // SESSION_LIVEBROADCAST_FAIL, //error of some sort - so can't broadcast + 30: {"title": "", "message": ""}, // SESSION_LIVEBROADCAST_ACTIVE, //active + 31: {"title": "", "message": ""}, // SESSION_LIVEBROADCAST_STOPPED, //stopped by server/user + 32: {"title": "", "message": ""}, // SESSION_LIVEBROADCAST_PINNED, //node pinned by user + 33: {"title": "", "message": ""}, // SESSION_LIVEBROADCAST_UNPINNED, //node unpinned by user + + 34: {"title": "", "message": ""}, // BACKEND_STATUS_MSG, //status/informational message + 35: {"title": "", "message": ""}, // LOCAL_NETWORK_VARIANCE_HIGH,//the ping time via a hairpin for the user network is unnaturally high or variable. + + //indicates problem with user computer stack or network itself (wifi, antivirus etc) + 36: {"title": "", "message": ""}, // LOCAL_NETWORK_LATENCY_HIGH, + 37: {"title": "", "message": ""}, // RECORDING_CLOSE, //update and remove tracks from front-end + 38: {"title": "", "message": ""} // LAST_ALERT }; @@ -141,7 +168,26 @@ sessionModel.refreshCurrentSession(); // XXX: race condition possible here; other client may not have updated server yet }, 1000); } - } else { + } + else if (type === 24) { // STUN_EVENT + var testResults = context.jamClient.NetworkTestResult(); + + $.each(testResults, function(index, val) { + if (val.bStunFailed) { + // if true we could not reach a stun server + } + else if (val.bRemoteUdpBocked) { + // if true the user cannot communicate with peer via UDP, although they could do LAN based session + } + }); + } + else if (type === 25) { // DEAD_USER_WARN_EVENT + + } + else if (type === 26) { // DEAD_USER_REMOVE_EVENT + + } + else { context.setTimeout(function() { var alert = alert_type[type]; diff --git a/web/app/assets/javascripts/sessionList.js b/web/app/assets/javascripts/sessionList.js index 7c3fd1efb..c275321ac 100644 --- a/web/app/assets/javascripts/sessionList.js +++ b/web/app/assets/javascripts/sessionList.js @@ -116,8 +116,8 @@ latency_text: latencyDescription, latency_style: latencyStyle, sortScore: latencyInfo.sortScore, - play_url: "TODO", - join_link_display_style: "block" // showJoinLink ? "block" : "none" + play_url: context.JK.root_url + "sessions/" + session.id, + join_link_display_style: showJoinLink ? "block" : "none" }; var row = context.JK.fillTemplate(rowTemplate, sessionVals); @@ -131,24 +131,24 @@ return false; // break } }); + if (!insertedEarly) { $(tbGroup).append(row); - - // wire up the Join Link to the T&Cs dialog - var $parentRow = $('tr[id=' + session.id + ']', tbGroup); - - - $('.join-link', $parentRow).click(function(evt) { - // If no FTUE, show that first. - if (!(context.jamClient.FTUEGetStatus())) { - app.afterFtue = function() { joinClick(session.id); }; - app.layout.showDialog('ftue'); - return; - } else { - joinClick(session.id); - } - }); } + + // wire up the Join Link to the T&Cs dialog + var $parentRow = $('tr[id=' + session.id + ']', tbGroup); + + $('.join-link', $parentRow).click(function(evt) { + // If no FTUE, show that first. + if (!(context.jamClient.FTUEGetStatus())) { + app.afterFtue = function() { joinClick(session.id); }; + app.layout.showDialog('ftue'); + return; + } else { + joinClick(session.id); + } + }); } function joinClick(sessionId) { diff --git a/web/app/views/clients/_findSession.html.erb b/web/app/views/clients/_findSession.html.erb index c4ca01ee5..2765fa7a2 100644 --- a/web/app/views/clients/_findSession.html.erb +++ b/web/app/views/clients/_findSession.html.erb @@ -71,7 +71,7 @@
{latency_text}
- + <%= image_tag "content/icon_playbutton.png", :size => "20x20" %>