WEB_ALARM_SOUND .mp3 does not sound

Forum for questions and support relating to the 1.28.x releases only.
Post Reply
RobvG
Posts: 2
Joined: Mon Jul 20, 2015 2:51 pm

WEB_ALARM_SOUND .mp3 does not sound

Post by RobvG » Mon Jul 20, 2015 3:05 pm

Hi all,

We have set up a server to manage eight cameras for a store.
The plan is to use one of those cameras to act as a door bell.
We have set an area where movement should give a sound with use of WEB_ALARM_SOUND.
And now comes the mind breaker: We only got it to work in the Epiphany web browser on a RaspberryPI.
All other browsers under Linux or Windows refuse to play the .mp3 sound.
We of course firtst tested the capability of the browsers to play the sound in HTML5.
Firefox for instance plays .mp3 natively. Soo... What is the problem..?

I hope someone can give us a hint. :-)

With regards, Rob.

RobvG
Posts: 2
Joined: Mon Jul 20, 2015 2:51 pm

Re: WEB_ALARM_SOUND .mp3 does not sound

Post by RobvG » Fri Jul 24, 2015 9:19 am

Hi all,
OK, up until now nobody seems to have a clue.
Or this feature is not widely used in real life.

We have investigated a bit further.
To sound the alarm the browser has to execute a JavaScript file: watch.js

________________________________________________
Code:

if ( newAlarm )
{
if ( SOUND_ON_ALARM )
{
// Enable the alarm sound
if ( !canPlayPauseAudio )
$('alarmSound').removeClass( 'hidden' );
else
$('MediaPlayer').Play();

/Code
________________________________________________

An ActiveX plugin is called for (Microsoft Media Player) in the browser to play the sound file.
And that is really difficult because ActiveX or mplayer do not exist in linux. :-)

Sooo... Please, developers, can you change this javascript behaviour to just use the native HTML5 audio capability of the browser?

With regards, Rob.

Jobert
Posts: 1
Joined: Mon Jul 27, 2015 10:43 am

Re: WEB_ALARM_SOUND .mp3 does not sound

Post by Jobert » Mon Jul 27, 2015 10:52 am

The question needs to be rephrased to " why does switching on the option WEB_ALARM_SOUND not work on some clients"

We've established that it does work on epiphany on a raspberry, but does not work on several windows clients running Firefox, explorer, chrome and pale Moon...

Does anyone have the same problem,or has this issue been solved in another thread?

Thanks in advance!

bbunge
Posts: 2619
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: WEB_ALARM_SOUND .mp3 does not sound

Post by bbunge » Mon Jul 27, 2015 7:35 pm

I read somewhere that Firefox will not play .mp3 files but it was recommended to use.ogg files instead. So, I went here (http://www.acoustica.com/files/acloopli ... 20Effects/) and downloaded Doorbell.ogg. Copied the file to: /usr/share/zoneminder/sounds and set permissions to 755. Next I checked WEB_SOUND_ON_ALARM and in WEB_ALARM_SOUND I entered Doorbell.ogg. Restarted Zoneminder.
I'm running Firefox on Win 8.1 with the VLC plugin. When ZM detected motion I got a prompt to enable the VLC plugin. Now the Doorbell rings every time motion is detected.

Maybe not a fix but a means to an end...

bb

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests