From 3ef4e5b9dd7500fbd8125f8a6e382891bead9aca Mon Sep 17 00:00:00 2001
From: "ctrlaltca@gmail.com" <>
Date: Tue, 10 May 2011 20:39:33 +0000
Subject: updated prototype to 1.7, scriptaculous to 1.9.0 and dropped json.js
for json2.js. fixes #199 and 272
---
.../source/scriptaculous-1.9.0/sound.js | 59 ++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 framework/Web/Javascripts/source/scriptaculous-1.9.0/sound.js
(limited to 'framework/Web/Javascripts/source/scriptaculous-1.9.0/sound.js')
diff --git a/framework/Web/Javascripts/source/scriptaculous-1.9.0/sound.js b/framework/Web/Javascripts/source/scriptaculous-1.9.0/sound.js
new file mode 100644
index 00000000..d3f84646
--- /dev/null
+++ b/framework/Web/Javascripts/source/scriptaculous-1.9.0/sound.js
@@ -0,0 +1,59 @@
+// script.aculo.us sound.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
+
+// 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/)
+//
+// 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/
+
+Sound = {
+ tracks: {},
+ _enabled: true,
+ template:
+ new Template(''),
+ enable: function(){
+ Sound._enabled = true;
+ },
+ disable: function(){
+ Sound._enabled = false;
+ },
+ 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 };
+ else
+ this.tracks[options.track].id++;
+
+ options.id = this.tracks[options.track].id;
+ $$('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('');
+ else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('Windows Media') != -1 }))
+ Sound.template = new Template('');
+ else if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('RealPlayer') != -1 }))
+ Sound.template = new Template('');
+ else
+ Sound.play = function(){};
+}
\ No newline at end of file
--
cgit v1.2.3