Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/js/MonitorStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ function MonitorStream(monitorData) {
this.streamListenerBind();

$j('#volumeControls').show();
if (typeof observerMontage !== 'undefined') observerMontage.observe(stream);
return;
} else {
alert("ZM_GO2RTC_PATH is empty. Go to Options->System and set ZM_GO2RTC_PATH accordingly.");
Expand Down
40 changes: 20 additions & 20 deletions web/skins/classic/views/js/montage.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,28 +811,9 @@ function initPage() {
changeMonitorStatusPosition();
zmPanZoom.init();

// Creating a ResizeObserver Instance
const observer = new ResizeObserver((objResizes) => {
const blockContent = document.getElementById('content');
const currentScrollBbarExists = blockContent.scrollHeight > blockContent.clientHeight;
if (scrollBbarExists === null) {
scrollBbarExists = currentScrollBbarExists;
}
if (currentScrollBbarExists != scrollBbarExists) {
scrollBbarExists = currentScrollBbarExists;
return;
}
objResizes.forEach((obj) => {
const id = stringToNumber(obj.target.id);
if (mode != EDITING && !changedMonitors.includes(id)) {
changedMonitors.push(id);
}
});
});

// Registering an observer on an element
$j('[id ^= "liveStream"]').each(function() {
observer.observe(this);
observerMontage.observe(this);
});

//You can immediately call startMonitors() here, but in this case the height of the monitor will initially be minimal, and then become normal, but this is not pretty.
Expand Down Expand Up @@ -1200,6 +1181,25 @@ function changeMonitorStatusPosition() {
setCookie('zmMonitorStatusPositionSelected', monitorStatusPosition);
}

// Creating a ResizeObserver Instance
const observerMontage = new ResizeObserver((objResizes) => {
const blockContent = document.getElementById('content');
const currentScrollBbarExists = blockContent.scrollHeight > blockContent.clientHeight;
if (scrollBbarExists === null) {
scrollBbarExists = currentScrollBbarExists;
}
if (currentScrollBbarExists != scrollBbarExists) {
scrollBbarExists = currentScrollBbarExists;
return;
}
objResizes.forEach((obj) => {
const id = stringToNumber(obj.target.id);
if (mode != EDITING && !changedMonitors.includes(id)) {
changedMonitors.push(id);
}
});
});

// Kick everything off
$j(window).on('load', () => initPage());

Expand Down