]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/sound.js
write QWEBIRC_DEBUG to debug pages
[irc/quakenet/qwebirc.git] / js / sound.js
index ad208a18fab8af502ce6de1c1b9df30f670af28c..ccd1c50d05a8b78af413d290132f976f5a916228 100644 (file)
@@ -28,15 +28,12 @@ qwebirc.sound.SoundPlayer = new Class({
       return;
     }
     
-    qwebirc.util.importJS("/js/soundmanager2.js", "soundManager", function() {
-      soundManager.url = "/sound/";
-      
-      /* Fixes Firefox z-index Flash bug */
-      if(Browser.Engine.gecko)
-        soundManager.useHighPerformance = false;
-        
-      soundManager.debugMode = false;
-      soundManager.useConsole = false;
+    qwebirc.util.importJS(qwebirc.global.staticBaseURL + "js/" + (QWEBIRC_DEBUG?"soundmanager2":"soundmanager2-nodebug-jsmin") + ".js", "soundManager", function() {
+      soundManager.url = qwebirc.global.staticBaseURL + "sound/";
+
+      var debugMode = false;
+      soundManager.debugMode = debugMode;
+      soundManager.useConsole = debugMode;
       soundManager.onload = function() {
         this.loadedSWF = true;
         this.fireEvent("ready");
@@ -52,7 +49,7 @@ qwebirc.sound.SoundPlayer = new Class({
   },
   beep: function() {
     if(!this.beepLoaded) {
-      this.createSound("beep", "/sound/beep3.mp3");
+      this.createSound("beep", qwebirc.global.staticBaseURL + "sound/beep3.mp3");
       this.beepLoaded = true;
     }
     this.playSound("beep");