-
+ 9F9BD93AEE457040A2D8E1FA6B47C0FE0B2C67E8173F1F0F02BC65DE25F923E4ADD7E147EE1137405AB007A4DB3B47860DFC07BB6594DBE9E71061C081B752C1
mp-wp/wp-includes/js/scriptaculous/sound.js
(0 . 0)(1 . 55)
115415 // script.aculo.us sound.js v1.8.0, Tue Nov 06 15:01:40 +0300 2007
115416
115417 // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
115418 //
115419 // Based on code created by Jules Gravinese (http://www.webveteran.com/)
115420 //
115421 // script.aculo.us is freely distributable under the terms of an MIT-style license.
115422 // For details, see the script.aculo.us web site: http://script.aculo.us/
115423
115424 Sound = {
115425 tracks: {},
115426 _enabled: true,
115427 template:
115428 new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),
115429 enable: function(){
115430 Sound._enabled = true;
115431 },
115432 disable: function(){
115433 Sound._enabled = false;
115434 },
115435 play: function(url){
115436 if(!Sound._enabled) return;
115437 var options = Object.extend({
115438 track: 'global', url: url, replace: false
115439 }, arguments[1] || {});
115440
115441 if(options.replace && this.tracks[options.track]) {
115442 $R(0, this.tracks[options.track].id).each(function(id){
115443 var sound = $('sound_'+options.track+'_'+id);
115444 sound.Stop && sound.Stop();
115445 sound.remove();
115446 })
115447 this.tracks[options.track] = null;
115448 }
115449
115450 if(!this.tracks[options.track])
115451 this.tracks[options.track] = { id: 0 }
115452 else
115453 this.tracks[options.track].id++;
115454
115455 options.id = this.tracks[options.track].id;
115456 $$('body')[0].insert(
115457 Prototype.Browser.IE ? new Element('bgsound',{
115458 id: 'sound_'+options.track+'_'+options.id,
115459 src: options.url, loop: 1, autostart: true
115460 }) : Sound.template.evaluate(options));
115461 }
115462 };
115463
115464 if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
115465 if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
115466 Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')
115467 else
115468 Sound.play = function(){}
115469 }