3 Jappix - An open social platform
4 These are the audio JS scripts for Jappix
6 -------------------------------------------------
10 Last revision: 10/08/11
14 // Plays the given sound ID
15 function soundPlay(num) {
18 if((BrowserDetect.browser == 'Explorer') && (BrowserDetect.version < 9))
21 // If the sounds are enabled
22 if(getDB('options', 'sounds') == '1') {
23 // If the audio elements aren't yet in the DOM
24 if(!exists('#audio')) {
27 '<audio id="new-chat" src="./snd/new-chat.oga" type="audio/ogg" />' +
28 '<audio id="receive-message" src="./snd/receive-message.oga" type="audio/ogg" />' +
29 '<audio id="notification" src="./snd/notification.oga" type="audio/ogg" />' +
34 // We play the target sound
35 var playThis = document.getElementById('audio').getElementsByTagName('audio')[num];