]> code.citadel.org Git - citadel.git/blobdiff - webcit/static/sound.js
Adjust the folder counters when reading / deleting / moving messages
[citadel.git] / webcit / static / sound.js
index eba38432cecca77232f9accc0acccaae189e2a0b..d3f846464eb0aee2b725b86f299587bc7e5c3cb9 100644 (file)
@@ -1,6 +1,6 @@
-// script.aculo.us sound.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
+// script.aculo.us sound.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
 
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
 //
 // Based on code created by Jules Gravinese (http://www.webveteran.com/)
 //
@@ -23,23 +23,23 @@ Sound = {
     var options = Object.extend({
       track: 'global', url: url, replace: false
     }, arguments[1] || {});
-    
+
     if(options.replace && this.tracks[options.track]) {
       $R(0, this.tracks[options.track].id).each(function(id){
         var sound = $('sound_'+options.track+'_'+id);
         sound.Stop && sound.Stop();
         sound.remove();
-      })
+      });
       this.tracks[options.track] = null;
     }
-      
+
     if(!this.tracks[options.track])
-      this.tracks[options.track] = { id: 0 }
+      this.tracks[options.track] = { id: 0 };
     else
       this.tracks[options.track].id++;
-      
+
     options.id = this.tracks[options.track].id;
-    $$('body')[0].insert( 
+    $$('body')[0].insert(
       Prototype.Browser.IE ? new Element('bgsound',{
         id: 'sound_'+options.track+'_'+options.id,
         src: options.url, loop: 1, autostart: true
@@ -49,7 +49,11 @@ Sound = {
 
 if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
   if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
-    Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')
+    Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>');
+  else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('Windows Media') != -1 }))
+    Sound.template = new Template('<object id="sound_#{track}_#{id}" type="application/x-mplayer2" data="#{url}"></object>');
+  else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('RealPlayer') != -1 }))
+    Sound.template = new Template('<embed type="audio/x-pn-realaudio-plugin" style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>');
   else
-    Sound.play = function(){}
-}
+    Sound.play = function(){};
+} 
\ No newline at end of file