Search code examples
javascriptjqueryzeroclipboard

How to play sound with ZeroClipboard?


Is there a way I can play a sound each time a click is made using ZeroClipboard?

I have a custom sound made that I want to play on those events.

PS. I can't use an <embed> here because I don't want the ugly "allow this page to play with quicktime" alerts that the browser will throw. Is there a way I can put in my sound in ZeroClipboard?


Solution

  • You have two options as i see it. 1. you can create a html5 audio player that plays a sound on the click event 2. you can create a flash file that houses a mp3 player. using flashvars you can send events to flash telling it to play the sound. the benefit of this is true cross browser compatibility (if your worried about this). this is essentially how the web experience of grooveshark and rdio operate. (mainly because of the html5 audio vulnerability)