* feature/VRFS-3146

This commit is contained in:
Seth Call 2015-05-03 21:28:17 -05:00
parent 32f0967b2a
commit f1c96c1531
4 changed files with 41 additions and 1 deletions

View File

@ -72,7 +72,6 @@
var alertData = $.extend({}, ALERT_TYPES[type]);
alertData.text = text;
if(alertData) {
$document.triggerHandler(alertData.name, alertData);
}
@ -121,6 +120,10 @@
if(context.JK.CurrentSessionModel)
context.JK.CurrentSessionModel.onBroadcastStopped(type, text);
}
else if(type === ALERT_NAMES.RECORD_PLAYBACK_STATE) {
if(context.JK.CurrentSessionModel)
context.JK.CurrentSessionModel.onPlaybackStateChange(type, text);
}
else if((!context.JK.CurrentSessionModel || !context.JK.CurrentSessionModel.inSession()) &&
(ALERT_NAMES.INPUT_IO_RATE == type || ALERT_NAMES.INPUT_IO_JTR == type || ALERT_NAMES.OUTPUT_IO_RATE == type || ALERT_NAMES.OUTPUT_IO_JTR== type)) {
// squelch these events if not in session

View File

@ -385,11 +385,25 @@
}
}
function onPlayStartEvent() {
playbackPlaying = true;
}
function onPlayStopEvent() {
playbackPlaying = false;
}
function onPlayPauseEvent() {
playbackPlaying = false;
}
this.update = update;
this.setPlaybackMode = setPlaybackMode;
this.startMonitor = startMonitor;
this.stopMonitor = stopMonitor;
this.onPlayStopEvent = onPlayStopEvent;
this.onPlayStartEvent = onPlayStartEvent;
this.onPlayPauseEvent = onPlayPauseEvent;
return this;
}

View File

@ -3305,6 +3305,20 @@
promptLeave = _promptLeave;
}
this.onPlaybackStateChange = function(change_type){
// if it's play_stop or play_start, poke the playControls
if(change_type == 'play_start') {
playbackControls.onPlayStartEvent();
}
else if(change_type == 'play_stop'){
playbackControls.onPlayStopEvent();
}
else if(change_type == 'play_pause'){
playbackControls.onPlayPauseEvent();
}
}
context.JK.HandleVolumeChangeCallback = handleVolumeChangeCallback;
context.JK.HandleMetronomeCallback = handleMetronomeCallback;
context.JK.HandleBridgeCallback = handleBridgeCallback;

View File

@ -799,6 +799,14 @@
}
}
function onPlaybackStateChange(type, text) {
// if text is play_start or play_stop, tell the play_controls
if(sessionScreen) {
sessionScreen.onPlaybackStateChange(text);
}
}
function onBackendMixerChanged(type, text) {
logger.debug("BACKEND_MIXER_CHANGE alert. reason:" + text);
@ -909,6 +917,7 @@
this.onBroadcastStopped = onBroadcastStopped;
this.onBroadcastSuccess = onBroadcastSuccess;
this.onBroadcastFailure = onBroadcastFailure;
this.onPlaybackStateChange = onPlaybackStateChange;
this.getCurrentSession = function() {
return currentSession;