PDA

View Full Version : how to add a sound when my popup appears ?



Admin
03-23-2012, 11:07 AM
I would like to know if anyone has already or know how to add a sound to be played, when a popup appears ?

it would be a nice attention grabber for the popup ?

like a cat
Purring, meowing, hissing, fighting, and more ?

:confused:

nico_pn
03-23-2012, 11:28 AM
Hi,

I think you can found something interesting with html5, take a look :
http://html5doctor.com/native-audio-in-the-browser/
http://dev.w3.org/html5/spec/single-page.html#the-audio-element
https://gist.github.com/253174

vwjenina
08-09-2012, 11:46 PM
how to add sound?

Admin
08-10-2012, 09:45 AM
I was sure to have written an article about how to add a sound to a wpsubscribers popup , but I can't find it.

in short, in the

Custom jQuery tab of the popup I have added this code :

jQuery('#sound_element').html(
"<embed src='http://www.testutilisateur.fr/catmeow2.mp3' hidden=true autostart=true loop=false>");

where you just link to the sound ( in mp3 format ) you want to play. it won't work on all browser, but not fail if it can't.

please let me know if you can integrate it, from this line of code or I will write again a tutorial, an also, I would like to know the effect you have chosen to use in your own popup ;)

Admin
08-10-2012, 09:46 AM
I forget to put the link, where you could try the popup with this sound :

http://www.testutilisateur.fr (http://www.testutilisateur.fr/)