• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
playing a little sound in the background

Hello everybody

Has anyone ever used Facebooks chat function? When you get a new message, you hear a little beep, warning you someone has said something.

Does anyone know how to recreate something like this? I'm making a website that would need a similar type of functionality: through Ajax I need to check every 5 seconds or so if something has been updated, if it has been, a warning needs to be displayed and a sound played.

Anyone got a clue?

Have a look at these links:

So I'm playing with soundmanager2, but for the life of me, I cannot get it to work.

Anyone got any experience with it?

This is my code:
soundManager.url = 'assets/soundmanager2/';
soundManager.debugMode = true;
soundManager.onready(function() {});
$('#tester').live('click', function() {
      id: 'aSound',
      url: 'assets/pop.mp3'
I get the following in Firebug:
SMSound.play(): Attempting to load "aSound"
soundmanager2.js (regel 904)
soundManager.load(): assets/pop.mp3
soundmanager2.js (regel 904)
(Flash): auto-play allowed
(Flash): _start: aSound, loops: 1, nMsecOffset: 0
SMSound._onload(): "aSound" loaded.
So I know the url's are correct, the files are found, but the sound will not play. Can ayone point out what I'm doing wrong?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.