* protect against webcamViewer from getting involved if video is not available
This commit is contained in:
parent
a3021479fd
commit
763ade01dd
|
|
@ -134,17 +134,19 @@
|
|||
var RENDER_SESSION_DELAY = 750; // When I need to render a session, I have to wait a bit for the mixers to be there.
|
||||
|
||||
function beforeShow(data) {
|
||||
sessionId = data.id;
|
||||
if(!sessionId) {
|
||||
window.location = '/client#/home';
|
||||
}
|
||||
promptLeave = true;
|
||||
$myTracksContainer.empty();
|
||||
displayDoneRecording(); // assumption is that you can't join a recording session, so this should be safe
|
||||
sessionId = data.id;
|
||||
if(!sessionId) {
|
||||
window.location = '/client#/home';
|
||||
}
|
||||
promptLeave = true;
|
||||
$myTracksContainer.empty();
|
||||
displayDoneRecording(); // assumption is that you can't join a recording session, so this should be safe
|
||||
|
||||
var shareDialog = new JK.ShareDialog(context.JK.app, sessionId, "session");
|
||||
shareDialog.initialize(context.JK.FacebookHelperInstance);
|
||||
var shareDialog = new JK.ShareDialog(context.JK.app, sessionId, "session");
|
||||
shareDialog.initialize(context.JK.FacebookHelperInstance);
|
||||
if(gon.global.video_available) {
|
||||
webcamViewer.beforeShow()
|
||||
}
|
||||
}
|
||||
|
||||
function beforeDisconnect() {
|
||||
|
|
@ -504,7 +506,10 @@
|
|||
}
|
||||
|
||||
function beforeHide(data) {
|
||||
webcamViewer.setVideoOff()
|
||||
if(gon.global.video_available) {
|
||||
webcamViewer.setVideoOff()
|
||||
}
|
||||
|
||||
$fluidTracks.removeClass('showing');
|
||||
if(screenActive) {
|
||||
// this path is possible if FTUE is invoked on session page, and they cancel
|
||||
|
|
@ -3223,8 +3228,10 @@
|
|||
$fluidTracks = $screen.find('.session-fluidtracks');
|
||||
$voiceChat = $screen.find('#voice-chat');
|
||||
$tracksHolder = $screen.find('#tracks')
|
||||
webcamViewer.init($(".webcam-container"))
|
||||
webcamViewer.setVideoOff()
|
||||
if(gon.global.video_available) {
|
||||
webcamViewer.init($(".webcam-container"))
|
||||
webcamViewer.setVideoOff()
|
||||
}
|
||||
events();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ Gon.global.influxdb_username = Rails.application.config.influxdb_unsafe_username
|
|||
Gon.global.influxdb_password = Rails.application.config.influxdb_unsafe_password
|
||||
Gon.global.recurly_public_api_key = Rails.application.config.recurly_public_api_key
|
||||
Gon.global.one_free_jamtrack_per_user = Rails.application.config.one_free_jamtrack_per_user
|
||||
Gon.global.video_available = Rails.application.config.video_available
|
||||
Gon.global.env = Rails.env
|
||||
|
|
|
|||
Loading…
Reference in New Issue