Web entry needs an error sound, and application.playSound() only plays the message on the Server. (this is 7.4.8 btw)
Certainly, someone has embedded and audio file in the HTML.
Set a function in HTML_AREA and then execute that script, ie playSound().
Called from an onEvent…
plugins.WebClientUtils.executeClientSideJS(‘playSound();’);
create folder named ‘audio’ in: application_server/server/webapps/ROOT/servoy-webclient
place the attached audio.js file in there (unzip first)
place your error.mp3 file in there.
I munged enough to get it working and will visit your solution soon.
Imported error.mp3 and beep.mp3 into media.
executed ‘plugins.WebClientUtils.executeClientSideJS(‘playSoundX();’);’ using the following code (in an editable=false HTML_AREA field) on user input determined to be an error
IOS Safari won’t play happily with this code.
Android Firefox plays only after a visual error message is closed.
Desktop windows Firefox and Internet Explorer work.
An init executes in form onLoad to get the audio to preload. yeah… not sure if that worked.
The scaling above is to dynamically adjust the fields between Android and IOS differences in scaling for other devices…