diff --git a/app/assets/javascripts/session.js b/app/assets/javascripts/session.js index b281865d5..5d79abac8 100644 --- a/app/assets/javascripts/session.js +++ b/app/assets/javascripts/session.js @@ -24,6 +24,8 @@ var lookingForMixersTimer = null; var lookingForMixers = {}; + var RENDER_SESSION_DELAY = 750; // When I need to render a session, I have to wait a bit for the mixers to be there. + var defaultParticipant = { tracks: [{ instrument_id: "unknown" @@ -94,7 +96,7 @@ function alertCallback(type, text) { if (type === 2) { // BACKEND_MIXER_CHANGE - renderSession(); // This empties all and hides voice chat, then completely rebuilds. + sessionModel.refreshCurrentSession(); } else { context.setTimeout(function() { app.notify({ @@ -173,7 +175,7 @@ // this event appears to fire before the underlying mixers have updated. I have no event to // know definitively when the underlying mixers are up to date, so for now, we just delay slightly. // This obviously has the possibility of introducing time-based bugs. - context.setTimeout(renderSession, 750); + context.setTimeout(renderSession, RENDER_SESSION_DELAY); } /**