Skip to content

Commit fd15f72

Browse files
Use parseInt on ZM_WEB_SOUND_ON_ALARM which fixes it trying to play a sound on alarm when that feature is off
1 parent 30d0544 commit fd15f72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/js/MonitorStream.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,8 @@ function MonitorStream(monitorData) {
972972
const oldAlarm = ( !isAlarmed && wasAlarmed );
973973

974974
if (newAlarm) {
975-
if (ZM_WEB_SOUND_ON_ALARM !== '0') {
975+
console.log(ZM_WEB_SOUND_ON_ALARM);
976+
if (parseInt(ZM_WEB_SOUND_ON_ALARM) == 1) {
976977
console.log('Attempting to play alarm sound');
977978
if (ZM_DIR_SOUNDS != '' && ZM_WEB_ALARM_SOUND != '') {
978979
const sound = new Audio(ZM_DIR_SOUNDS+'/'+ZM_WEB_ALARM_SOUND);

0 commit comments

Comments
 (0)