InfoCaptor

  1. Home
  2. Docs
  3. InfoCaptor
  4. How to add bells and whistles to any dashboard
  5. Sound Effects / Alerts

Sound Effects / Alerts

First step is to enable sound for your dashboard page
1. Right click on the page
2. Select “Page Properties”
3. Change the “play_sound”: “Y”
4. Add your own sound URLs into the sound list.

Sound list is an array mapping between the sound name and the sound wav file. So if you have a cashregister sound wav file you can give a name to it say “jingle” and associate with the wav file URL.

Below are some references to sound files stored on a public dropbox.

Please use your own sound files and make sure you have the appropriate copyright.

Some of the sound files are downloaded from free public resources and since we cannot directly reference the owner’s website they are hosted on dropbox (the owner has instructions to download and then host anywhere you want) example “jingle” : “path to jingle.wav””bomb” : “path to bomb.wav” and so on 

  1. “auto_refresh”:”Y”,
  2. “refresh_on_start”:”N”,
  3. “refresh_rate_seconds”:2,
  4. “show_custom_background”:”N”,
  5. “background_css”:”{\”background-image\”:\”url(http://farm8.staticflickr.com/7240/7011616439_f93181254b_b.jpg)\”,\”background-size\”: \”100%\”}”,
  6. “sound_list”:{“coin”:”http://dl.dropbox.com/u/39897697/cashreg.wav”,“laugh”:”http://dl.dropbox.com/u/39897697/laugh_x.wav”,”drumroll”:”http://dl.dropbox.com/u/39897697/drumroll.wav”},
  7. “play_sound”:”Y”,
  8. “show_social_buttons”:”Y”

Once you define the sound files in your page properties and enable the sound playing ability you can now use the following method to make a sound Example Define a icon that uses the simulation counter

 In the Javascript section simply call the playsound function 

The sound will be played everytime the dashboard refreshes and  only in presentation mode. You can add conditional sound playing
if (glb[“_new”] % 3 == 0){  this.playsound(“coin”);} 
So the above snippet will play sound only when the counter value is divisible by 3.

Was this article helpful to you? Yes No

How can we help?