lib/bivouac/template/static/sound.js in bivouac-0.3.0 vs lib/bivouac/template/static/sound.js in bivouac-0.4.0
- old
+ new
@@ -1,8 +1,8 @@
-// script.aculo.us sound.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
+// script.aculo.us sound.js v1.8.2, Tue Nov 18 18:30:58 +0100 2008
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// Based on code created by Jules Gravinese (http://www.webveteran.com/)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
@@ -21,35 +21,35 @@
play: function(url){
if(!Sound._enabled) return;
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
}) : Sound.template.evaluate(options));
}
};
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
- Sound.play = function(){}
-}
+ Sound.play = function(){};
+}
\ No newline at end of file