Page 1 of 1

WEB_ALARM_SOUND

Posted: Fri Jun 26, 2020 12:09 pm
by JavaBen
In the Web configuration, there's a field labeled WEB_ALARM_SOUND. Clicking on the "?", says:

---
ZM_WEB_ALARM_SOUND

You can specify a sound file to play if an alarm occurs whilst you are watching a live monitor stream. So long as your browser understands the format it does not need to be any particular type. This file should be placed in the sounds directory defined earlier.
---

I haven't found any "sounds directory defined earlier".

I found a reference to DIR_SOUNDS, but searching the documents shows no hits.

I have /usr/share/zoneminder, but I do not have a directory 'sounds' at /usr/share/zoneminder/sounds.

Question: Where is the 'sounds' directory defined?
Question: Where is it documented in the documentation?
Question: is DIR_SOUNDS still used? If so, where do I define it?

Thanks!

Re: WEB_ALARM_SOUND

Posted: Tue Jun 30, 2020 5:33 pm
by burger
$ cd /usr/share/zoneminder/www
$ /usr/share/zoneminder/www# grep -r SOUNDS
skins/classic/views/watch.php: $soundSrc = ZM_DIR_SOUNDS.'/'.ZM_WEB_ALARM_SOUND;
api/app/Controller/Component/FilterComponent.php: 'SOUNDS LIKE',
lang/ro_ro.php: 'DIR_SOUNDS' => array(

$ git clone https://github.com/zoneminder/zoneminder
$ cd zoneminder
$ grep -r ZM_DIR_SOUNDS
CMakeLists.txt:set(ZM_DIR_SOUNDS "sounds" CACHE PATH
src/zm_config.cpp: else if ( strcasecmp(name_ptr, "ZM_DIR_SOUNDS") == 0 )
web/skins/classic/views/watch.php: $soundSrc = ZM_DIR_SOUNDS.'/'.ZM_WEB_ALARM_SOUND;
conf.d/01-system-paths.conf.in:ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@
scripts/zmupdate.pl.in: if ( $Config{ZM_DIR_SOUNDS} ne 'sounds' ) {
scripts/zmupdate.pl.in: $customConfig{ZM_DIR_SOUNDS} = $Config{ZM_DIR_SOUNDS};

$ less src/zm_config.cpp
And search for ZM_DIR_SOUNDS.

As with the other configuration paths, it's entered in /etc/zm/zm.conf (in deb).