* VRFS-3206 - cancel out of StopRecording earlier
This commit is contained in:
parent
0b9d1c3ed2
commit
6e5472f219
|
|
@ -105,14 +105,16 @@
|
|||
/** Nulls can be passed for all 3 currently; that's a user request. */
|
||||
function stopRecording(recordingId, reason, detail) {
|
||||
|
||||
waitingOnServerStop = waitingOnClientStop = true;
|
||||
waitingOnStopTimer = setTimeout(timeoutTransitionToStop, 5000);
|
||||
|
||||
if(stoppingRecording) {
|
||||
logger.debug("ignoring stopRecording because we are already stopping");
|
||||
return;
|
||||
}
|
||||
stoppingRecording = true;
|
||||
|
||||
|
||||
waitingOnServerStop = waitingOnClientStop = true;
|
||||
waitingOnStopTimer = setTimeout(timeoutTransitionToStop, 5000);
|
||||
|
||||
$self.triggerHandler('stoppingRecording', {reason: reason, detail: detail});
|
||||
|
||||
// this path assumes that the currentRecording info has, or can be, retrieved
|
||||
|
|
@ -163,6 +165,7 @@
|
|||
|
||||
// Only tell the user that we've stopped once both server and client agree we've stopped
|
||||
function attemptTransitionToStop(recordingId, errorReason, errorDetail) {
|
||||
|
||||
if(!waitingOnClientStop && !waitingOnServerStop) {
|
||||
transitionToStopped();
|
||||
$self.triggerHandler('stoppedRecording', {recordingId: recordingId, reason: errorReason, detail: errorDetail});
|
||||
|
|
|
|||
|
|
@ -3040,7 +3040,6 @@
|
|||
}
|
||||
|
||||
function onPause(e, data) {
|
||||
logger.debug("calling jamClient.SessionPausePlay. endReached:", data.endReached);
|
||||
|
||||
// if a JamTrack is open, and the user hits 'pause' or 'stop', we need to automatically stop the recording
|
||||
if(sessionModel.jamTracks() && sessionModel.recordingModel.isRecording()) {
|
||||
|
|
@ -3049,12 +3048,12 @@
|
|||
}
|
||||
|
||||
if(!data.endReached) {
|
||||
logger.debug("calling jamClient.SessionPausePlay. endReached:", data.endReached);
|
||||
context.jamClient.SessionPausePlay();
|
||||
}
|
||||
}
|
||||
|
||||
function onStop(e, data) {
|
||||
logger.debug("calling jamClient.SessionStopPlay. endReached:", data.endReached);
|
||||
|
||||
// if a JamTrack is open, and the user hits 'pause' or 'stop', we need to automatically stop the recording
|
||||
if(sessionModel.jamTracks() && sessionModel.recordingModel.isRecording()) {
|
||||
|
|
@ -3063,6 +3062,7 @@
|
|||
}
|
||||
|
||||
if(!data.endReached) {
|
||||
logger.debug("calling jamClient.SessionStopPlay. endReached:", data.endReached);
|
||||
context.jamClient.SessionStopPlay();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue