mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-04-02 05:06:41 -04:00
Merge pull request #4075 from IgorA100/patch-147
Fix: PTZ control error on Watch page
This commit is contained in:
@@ -604,7 +604,10 @@ function handleClick(event) {
|
||||
streamReStart(oldId, newId);
|
||||
} else if (event.target.closest('#dvrControls')) { //Controls DVR
|
||||
cyclePause();
|
||||
} else if (!event.target.closest('#wrapperMonitor')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (panZoomEnabled) {
|
||||
//event.preventDefault();
|
||||
if (targetId) {
|
||||
@@ -971,6 +974,7 @@ function streamPrepareStart(monitor=null) {
|
||||
}
|
||||
}, 100);
|
||||
setButtonStateWatch('stopBtn', 'active');
|
||||
setTimeout(dataOnClick, 100);
|
||||
}
|
||||
|
||||
function handleMouseEnter(event) {
|
||||
@@ -1056,8 +1060,8 @@ function streamReStart(oldId, newId) {
|
||||
streamMode = currentMonitor.streamMode;
|
||||
|
||||
table.bootstrapTable('destroy');
|
||||
streamPrepareStart(currentMonitor);
|
||||
applyMonitorControllable();
|
||||
streamPrepareStart(currentMonitor);
|
||||
zmPanZoom.init();
|
||||
loadFontFaceObserver();
|
||||
//document.getElementById('monitor').classList.remove('hidden-shift');
|
||||
@@ -1193,13 +1197,14 @@ function initPage() {
|
||||
|
||||
//document.getElementById('monitor').classList.remove('hidden-shift');
|
||||
changeObjectClass();
|
||||
streamPrepareStart();
|
||||
|
||||
currentMonitor = monitorData.find((o) => {
|
||||
return parseInt(o["id"]) === monitorId;
|
||||
});
|
||||
if (currentMonitor) {
|
||||
applyMonitorControllable();
|
||||
}
|
||||
streamPrepareStart();
|
||||
} // initPage
|
||||
|
||||
function watchFullscreen() {
|
||||
|
||||
@@ -354,6 +354,10 @@ echo htmlSelect('cyclePeriod', $cyclePeriodOptions, $period, array('id'=>'cycleP
|
||||
$monitorsExtraData = [];
|
||||
$monitorJanusUsed = false;
|
||||
$dataMonIdx=0;
|
||||
if ($hasPtzControls) {
|
||||
foreach ( getSkinIncludes('includes/control_functions.php') as $includeFile )
|
||||
require_once $includeFile;
|
||||
}
|
||||
foreach ($monitors as $m) {
|
||||
$monitorsExtraData[$m->Id()]['StreamHTML'] = $m->getStreamHTML($options);
|
||||
$monitorsExtraData[$m->Id()]['urlForAllEvents'] = "?view=events&page=1&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Battr%5D=Monitor&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5BQuery%5D%5Bterms%5D%5B0%5D%5Bval%5D=".$m->Id()."&filter%5BQuery%5D%5Bsort_asc%5D=1&filter%5BQuery%5D%5Bsort_field%5D=StartDateTime&filter%5BQuery%5D%5Bskip_locked%5D=&filter%5BQuery%5D%5Blimit%5D=0";
|
||||
@@ -362,8 +366,6 @@ echo htmlSelect('cyclePeriod', $cyclePeriodOptions, $period, array('id'=>'cycleP
|
||||
}
|
||||
$monitorsExtraData[$m->Id()]['ptzControls'] = '';
|
||||
if ($hasPtzControls) {
|
||||
foreach ( getSkinIncludes('includes/control_functions.php') as $includeFile )
|
||||
require_once $includeFile;
|
||||
$ptzControls = ptzControls($m);
|
||||
$monitorsExtraData[$m->Id()]['ptzControls'] = $ptzControls;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user