mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-31 04:02:54 -04:00
Merge branch 'IgorA100-patch-116'
This commit is contained in:
@@ -992,8 +992,7 @@ function xhtmlFooter() {
|
||||
if ( $basename == 'montage' ) {
|
||||
echo output_script_if_exists(array('assets/gridstack/dist/gridstack-all.js'));
|
||||
echo output_script_if_exists(array('assets/jquery.panzoom/dist/jquery.panzoom.js'));
|
||||
}
|
||||
if ( $basename == 'watch' || $basename == 'event') {
|
||||
} else if ( $basename == 'watch' || $basename == 'event') {
|
||||
echo output_script_if_exists(array('assets/jquery.panzoom/dist/jquery.panzoom.js'));
|
||||
}
|
||||
|
||||
|
||||
@@ -560,10 +560,11 @@ function handleClick(evt) {
|
||||
function startMonitors() {
|
||||
for (let i = 0, length = monitorData.length; i < length; i++) {
|
||||
const obj = document.getElementById('liveStream'+monitors[i].id);
|
||||
const url = new URL(obj.src);
|
||||
|
||||
url.searchParams.set('scale', parseInt(obj.clientWidth / monitors[i].width * 100));
|
||||
obj.src = url;
|
||||
if (obj.src) {
|
||||
const url = new URL(obj.src);
|
||||
url.searchParams.set('scale', parseInt(obj.clientWidth / monitors[i].width * 100));
|
||||
obj.src = url;
|
||||
}
|
||||
|
||||
// Start the fps and status updates. give a random delay so that we don't assault the server
|
||||
const delay = Math.round( (Math.random()+0.5)*statusRefreshTimeout );
|
||||
|
||||
@@ -13,6 +13,9 @@ const canStreamNative = <?php echo canStreamNative()?'true':'false' ?>;
|
||||
var monitorData = new Array();
|
||||
|
||||
<?php
|
||||
global $presetLayoutsNames;
|
||||
echo 'const ZM_PRESET_LAYOUT_NAMES = '.json_encode($presetLayoutsNames).';'.PHP_EOL;
|
||||
|
||||
global $monitors;
|
||||
foreach ( $monitors as $monitor ) {
|
||||
?>
|
||||
|
||||
@@ -338,9 +338,6 @@ foreach ($monitors as $monitor) {
|
||||
<script src="<?php echo cache_bust('js/hls.js') ?>"></script>
|
||||
<?php } ?>
|
||||
<script src="<?php echo cache_bust('js/MonitorStream.js') ?>"></script>
|
||||
<?php xhtmlFooter() ?>
|
||||
|
||||
<?php echo '<script nonce="'.$cspNonce.'"> const ZM_PRESET_LAYOUT_NAMES = '.json_encode($presetLayoutsNames).' </script>'.PHP_EOL;?>
|
||||
|
||||
<!-- In May 2024, IgorA100 globally changed grid layout -->
|
||||
<div id="messageModal" class="modal fade" tabindex="-1">
|
||||
@@ -361,3 +358,4 @@ foreach ($monitors as $monitor) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php xhtmlFooter() ?>
|
||||
|
||||
Reference in New Issue
Block a user