Skip to content
Open
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
2 changes: 1 addition & 1 deletion web/skins/classic/views/js/montage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ document.onvisibilitychange = () => {
//closing should kill, hiding should stop/pause
for (let i = 0, length = monitors.length; i < length; i++) {
// Stop instead of pause because we don't want buffering in zms
monitors[i].stop();
monitors[i].kill();
}
}, 15*1000);
} else {
Expand Down
5 changes: 4 additions & 1 deletion web/skins/classic/views/js/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,10 @@ document.onvisibilitychange = () => {
prevStateStarted = 'played';
//Stop only if playing (not paused).
// We might want to continue status updates so that alarm sounds etc still happen
monitorStream.stop();
// Use kill() instead of stop() to send CMD_QUIT and terminate the zms
// process. stop() only sends CMD_STOP which leaves zms running, causing
// orphaned processes to accumulate each time the tab is hidden/shown.
monitorStream.kill();
Comment on lines +1405 to +1408
}
} else {
prevStateStarted = 'stopped';
Expand Down
5 changes: 4 additions & 1 deletion web/skins/classic/views/js/zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,10 @@ document.onvisibilitychange = () => {
TimerHideShow = setTimeout(function() {
//Stop monitors when closing or hiding page
for (let i = 0, length = monitorData.length; i < length; i++) {
monitors[i].stop();
// Use kill() instead of stop() to send CMD_QUIT and terminate the zms
// process. stop() only sends CMD_STOP which leaves zms running, causing
// orphaned processes to accumulate each time the tab is hidden/shown.
monitors[i].kill();
Comment on lines +796 to +799
}
}, 15*1000);
} else {
Expand Down
Loading