Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into storageareas

This commit is contained in:
Isaac Connor 2019-08-23 18:17:50 -04:00
commit c4c6935c6e
3 changed files with 16 additions and 5 deletions

View File

@ -201,6 +201,8 @@ function changeReplayMode() {
} }
var streamParms = "view=request&request=stream&connkey="+connKey; var streamParms = "view=request&request=stream&connkey="+connKey;
if ( auth_hash )
streamCmdParms += '&auth='+auth_hash;
var streamCmdTimer = null; var streamCmdTimer = null;
var streamStatus = null; var streamStatus = null;
@ -268,7 +270,7 @@ function getCmdResponse( respObj, respText ) {
} }
var streamReq = new Request.JSON( { var streamReq = new Request.JSON( {
url: thisUrl, url: monitorUrl,
method: 'get', method: 'get',
timeout: AJAX_TIMEOUT, timeout: AJAX_TIMEOUT,
link: 'chain', link: 'chain',
@ -310,7 +312,8 @@ function playClicked( ) {
vjsPlay(); //handles fast forward and rewind vjsPlay(); //handles fast forward and rewind
} }
} else { } else {
streamReq.send( streamParms+"&command="+CMD_PLAY ); console.log("sending"+streamParms+"&command="+CMD_PLAY);
streamReq.send(streamParms+"&command="+CMD_PLAY);
streamPlay(); streamPlay();
} }
} }
@ -406,7 +409,7 @@ function streamFastRev( action ) {
} }
}, 500); //500ms is a compromise between smooth reverse and realistic performance }, 500); //500ms is a compromise between smooth reverse and realistic performance
} else { } else {
streamReq.send( streamParms+"&command="+CMD_FASTREV ); streamReq.send(streamParms+"&command="+CMD_FASTREV);
} }
} }
@ -597,6 +600,8 @@ var eventReq = new Request.JSON( {url: thisUrl, method: 'get', timeout: AJAX_TIM
function eventQuery( eventId ) { function eventQuery( eventId ) {
var eventParms = "view=request&request=status&entity=event&id="+eventId; var eventParms = "view=request&request=status&entity=event&id="+eventId;
if ( auth_hash )
eventParms += '&auth='+auth_hash;
eventReq.send( eventParms ); eventReq.send( eventParms );
} }
@ -897,6 +902,8 @@ var actReq = new Request.JSON( {url: thisUrl, method: 'get', timeout: AJAX_TIMEO
function actQuery( action, parms ) { function actQuery( action, parms ) {
var actParms = "view=request&request=event&id="+eventData.Id+"&action="+action; var actParms = "view=request&request=event&id="+eventData.Id+"&action="+action;
if ( auth_hash )
actParms += '&auth='+auth_hash;
if ( parms != null ) { if ( parms != null ) {
actParms += "&"+Object.toQueryString( parms ); actParms += "&"+Object.toQueryString( parms );
} }

View File

@ -36,6 +36,7 @@ var eventData = {
Frames: '<?php echo $Event->Frames() ?>', Frames: '<?php echo $Event->Frames() ?>',
MonitorName: '<?php echo $Monitor->Name() ?>' MonitorName: '<?php echo $Monitor->Name() ?>'
}; };
var monitorUrl = '<?php echo $Monitor->UrlToIndex(); ?>';
var filterQuery = '<?php echo isset($filterQuery)?validJsStr(htmlspecialchars_decode($filterQuery)):'' ?>'; var filterQuery = '<?php echo isset($filterQuery)?validJsStr(htmlspecialchars_decode($filterQuery)):'' ?>';
var sortQuery = '<?php echo isset($sortQuery)?validJsStr(htmlspecialchars_decode($sortQuery)):'' ?>'; var sortQuery = '<?php echo isset($sortQuery)?validJsStr(htmlspecialchars_decode($sortQuery)):'' ?>';

View File

@ -154,9 +154,12 @@ function getImageSource(monId, time) {
var duration = Frame.NextTimeStampSecs - Frame.TimeStampSecs; var duration = Frame.NextTimeStampSecs - Frame.TimeStampSecs;
frame_id = Frame.FrameId + parseInt( (NextFrame.FrameId-Frame.FrameId) * ( time-Frame.TimeStampSecs )/duration ); frame_id = Frame.FrameId + parseInt( (NextFrame.FrameId-Frame.FrameId) * ( time-Frame.TimeStampSecs )/duration );
//console.log("Have NextFrame: duration: " + duration + " frame_id = " + frame_id + " from " + NextFrame.FrameId + ' - ' + Frame.FrameId + " time: " + (time-Frame.TimeStampSecs) ); //console.log("Have NextFrame: duration: " + duration + " frame_id = " + frame_id + " from " + NextFrame.FrameId + ' - ' + Frame.FrameId + " time: " + (time-Frame.TimeStampSecs) );
} } else {
frame_id = Frame.FrameId;
}
} else { } else {
frame_id = Frame['Id']; frame_id = Frame.FrameId;
console.log("No NextFrame"); console.log("No NextFrame");
} }
Event = events[Frame.EventId]; Event = events[Frame.EventId];