Skip to content

Commit

Permalink
Handle when ptzToggle does not exist because OPT_CONTROL is off
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jun 11, 2024
1 parent 8fe2da1 commit e85078c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/skins/classic/views/js/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ function streamReStart(oldId, newId) {

function applyMonitorControllable(currentMonitor) {
const ptzToggle = document.getElementById('ptzToggle');
if (!ptzToggle) {
console.log('ptz toggle is not present. Likely OPT_CONTROL is off');
return;
}
if (currentMonitor.monitorControllable) {
const ptzShow = getCookie('ptzShow');

Expand Down

0 comments on commit e85078c

Please sign in to comment.