Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: scottschiller/SoundManager2
...
head fork: scottschiller/SoundManager2
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
View
2  demo/animation-1/index.html
@@ -34,7 +34,7 @@
</p>
-<p>Sound source: <a href="http://freesound.iua.upf.edu/samplesViewSingle.php?id=19987">"Acclivity"</a>, Free Sound Project</p>
+<p>Sound source: <a href="http://www.freesound.org/search/?q=19987">"Acclivity"</a>, freesound.org</p>
</div>
View
32 script/soundmanager2-jsmin.js
@@ -64,9 +64,9 @@ if(a.position&&this.currentTime!==d){c._wD(m+"canplay: setting position to "+d);
this._t,d=a.bytesTotal||1;c._wD(m+"loadeddata: "+this._t.sID);if(!a._loaded&&!V)a.duration=a._get_html5_duration(),a._whileloading(d,d,a._get_html5_duration()),a._onload(!0)}),loadedmetadata:n(function(){c._wD(m+"loadedmetadata: "+this._t.sID)}),loadstart:n(function(){c._wD(m+"loadstart: "+this._t.sID);this._t._onbufferchange(1)}),play:n(function(){c._wD(m+"play: "+this._t.sID+", "+this._t.url);this._t._onbufferchange(0)}),playing:n(function(){c._wD(m+"playing: "+this._t.sID);this._t._onbufferchange(0)}),
progress:n(function(a){var d=this._t,e,b,f;f=0;var g="progress"===a.type;b=a.target.buffered;var h=a.loaded||0,k=a.total||1;if(d.loaded)return!1;if(b&&b.length){for(e=b.length-1;0<=e;e--)f=b.end(e)-b.start(e);h=f/a.target.duration;if(g&&1<b.length){f=[];b=b.length;for(e=0;e<b;e++)f.push(a.target.buffered.start(e)+"-"+a.target.buffered.end(e));c._wD(m+"progress: timeRanges: "+f.join(", "))}g&&!isNaN(h)&&c._wD(m+"progress: "+d.sID+": "+Math.floor(100*h)+"% loaded")}isNaN(h)||(d._onbufferchange(0),d._whileloading(h,
k,d._get_html5_duration()),h&&k&&h===k&&z.load.call(this,a))}),ratechange:n(function(){c._wD(m+"ratechange: "+this._t.sID)}),suspend:n(function(a){var d=this._t;c._wD(m+"suspend: "+d.sID);z.progress.call(this,a);d._onsuspend()}),stalled:n(function(){c._wD(m+"stalled: "+this._t.sID)}),timeupdate:n(function(){this._t._onTimer()}),waiting:n(function(){var a=this._t;c._wD(m+"waiting: "+a.sID);a._onbufferchange(1)})};ja=function(a){return!a.serverURL&&(a.type?U({type:a.type}):U({url:a.url})||c.html5Only)};
-ya=function(a){if(a)a.src=ab?"":"about:blank"};U=function(a){function d(a){return c.preferFlash&&u&&!c.ignoreFlash&&"undefined"!==typeof c.flash[a]&&c.flash[a]}if(!c.useHTML5Audio||!c.hasHTML5)return!1;var e=a.url||null,a=a.type||null,b=c.audioFormats,f;if(a&&"undefined"!==c.html5[a])return c.html5[a]&&!d(a);if(!B){B=[];for(f in b)b.hasOwnProperty(f)&&(B.push(f),b[f].related&&(B=B.concat(b[f].related)));B=RegExp("\\.("+B.join("|")+")(\\?.*)?$","i")}f=e?e.toLowerCase().match(B):null;if(!f||!f.length)if(a)e=
-a.indexOf(";"),f=(-1!==e?a.substr(0,e):a).substr(6);else return!1;else f=f[1];if(f&&"undefined"!==typeof c.html5[f])return c.html5[f]&&!d(f);a="audio/"+f;e=c.html5.canPlayType({type:a});return(c.html5[f]=e)&&c.html5[a]&&!d(a)};Oa=function(){function a(a){var b,e,f=!1;if(!d||"function"!==typeof d.canPlayType)return!1;if(a instanceof Array){for(b=0,e=a.length;b<e&&!f;b++)if(c.html5[a[b]]||d.canPlayType(a[b]).match(c.html5Test))f=!0,c.html5[a[b]]=!0,c.flash[a[b]]=!(!c.preferFlash||!u||!a[b].match(Ua));
-return f}a=d&&"function"===typeof d.canPlayType?d.canPlayType(a):!1;return!(!a||!a.match(c.html5Test))}if(!c.useHTML5Audio||"undefined"===typeof Audio)return!1;var d="undefined"!==typeof Audio?db?new Audio(null):new Audio:null,e,b={},f,g;f=c.audioFormats;for(e in f)if(f.hasOwnProperty(e)&&(b[e]=a(f[e].type),b["audio/"+e]=b[e],c.flash[e]=c.preferFlash&&!c.ignoreFlash&&e.match(Ua)?!0:!1,f[e]&&f[e].related))for(g=f[e].related.length-1;0<=g;g--)b["audio/"+f[e].related[g]]=b[e],c.html5[f[e].related[g]]=
+ya=function(a){if(a)a.src=ab?"":"about:blank"};U=function(a){function d(a){return c.preferFlash&&u&&!c.ignoreFlash&&"undefined"!==typeof c.flash[a]&&c.flash[a]}if(!c.useHTML5Audio||!c.hasHTML5)return!1;var e=a.url||null,a=a.type||null,b=c.audioFormats,f;if(a&&"undefined"!==typeof c.html5[a])return c.html5[a]&&!d(a);if(!B){B=[];for(f in b)b.hasOwnProperty(f)&&(B.push(f),b[f].related&&(B=B.concat(b[f].related)));B=RegExp("\\.("+B.join("|")+")(\\?.*)?$","i")}f=e?e.toLowerCase().match(B):null;if(!f||
+!f.length)if(a)e=a.indexOf(";"),f=(-1!==e?a.substr(0,e):a).substr(6);else return!1;else f=f[1];if(f&&"undefined"!==typeof c.html5[f])return c.html5[f]&&!d(f);a="audio/"+f;e=c.html5.canPlayType({type:a});return(c.html5[f]=e)&&c.html5[a]&&!d(a)};Oa=function(){function a(a){var b,e,f=!1;if(!d||"function"!==typeof d.canPlayType)return!1;if(a instanceof Array){for(b=0,e=a.length;b<e&&!f;b++)if(c.html5[a[b]]||d.canPlayType(a[b]).match(c.html5Test))f=!0,c.html5[a[b]]=!0,c.flash[a[b]]=!(!c.preferFlash||!u||
+!a[b].match(Ua));return f}a=d&&"function"===typeof d.canPlayType?d.canPlayType(a):!1;return!(!a||!a.match(c.html5Test))}if(!c.useHTML5Audio||"undefined"===typeof Audio)return!1;var d="undefined"!==typeof Audio?db?new Audio(null):new Audio:null,e,b={},f,g;f=c.audioFormats;for(e in f)if(f.hasOwnProperty(e)&&(b[e]=a(f[e].type),b["audio/"+e]=b[e],c.flash[e]=c.preferFlash&&!c.ignoreFlash&&e.match(Ua)?!0:!1,f[e]&&f[e].related))for(g=f[e].related.length-1;0<=g;g--)b["audio/"+f[e].related[g]]=b[e],c.html5[f[e].related[g]]=
b[e],c.flash[f[e].related[g]]=b[e];b.canPlayType=d?a:null;c.html5=v(c.html5,b);return!0};$={notReady:"Not loaded yet - wait for soundManager.onload()/onready()",notOK:"Audio support is not available.",domError:"soundManager::createMovie(): appendChild/innerHTML call failed. DOM not ready or other error.",spcWmode:"soundManager::createMovie(): Removing wmode, preventing known SWF loading issue(s)",swf404:"soundManager: Verify that %s is a valid path.",tryDebug:"Try soundManager.debugFlash = true for more security details (output goes to SWF.)",
checkSWF:"See SWF output for more debug info.",localFail:"soundManager: Non-HTTP page ("+k.location.protocol+" URL?) Review Flash player security settings for this special case:\nhttp://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html\nMay need to add/allow path, eg. c:/sm2/ or /users/me/sm2/",waitFocus:"soundManager: Special case: Waiting for focus-related event..",waitImpatient:"soundManager: Getting impatient, still waiting for Flash%s...",waitForever:"soundManager: Waiting indefinitely for Flash (will recover if unblocked)...",
needFunction:"soundManager: Function object expected for %s",badID:'Warning: Sound ID "%s" should be a string, starting with a non-numeric character',currentObj:"--- soundManager._debug(): Current sound objects ---",waitEI:"soundManager::initMovie(): Waiting for ExternalInterface call from Flash..",waitOnload:"soundManager: Waiting for window.onload()",docLoaded:"soundManager: Document already loaded",onload:"soundManager::initComplete(): calling soundManager.onload()",onloadOK:"soundManager.onload() complete",
@@ -90,16 +90,16 @@ ha--};Ma=function(){var a;if(null!==T&&!ha)return F.clearInterval(T),T=null,!1;f
d.type)d.noRemote=!1,d.noLocal=!1};this._externalInterfaceOK=function(a,d){if(c.swfLoaded)return!1;var e,b=(new Date).getTime();c._wD("soundManager::externalInterfaceOK()"+(a?" (~"+(b-a)+" ms)":""));w("swf",!0);w("flashtojs",!0);c.swfLoaded=!0;L=!1;Ca&&Qa();if(!d||d.replace(/\+dev/i,"")!==c.versionNumber.replace(/\+dev/i,""))return e='soundManager: Fatal: JavaScript file build "'+c.versionNumber+'" does not match Flash SWF build "'+d+'" at '+c.url+". Ensure both are up-to-date.",setTimeout(function(){throw Error(e);
},0),!1;C?setTimeout(X,100):X()};ca=function(a,d){function e(){c._wD("-- SoundManager 2 "+c.version+(!c.html5Only&&c.useHTML5Audio?c.hasHTML5?" + HTML5 audio":", no HTML5 audio support":"")+(!c.html5Only?(c.useHighPerformance?", high performance mode, ":", ")+((c.flashPollingInterval?"custom ("+c.flashPollingInterval+"ms)":"normal")+" polling")+(c.wmode?", wmode: "+c.wmode:"")+(c.debugFlash?", flash debug mode":"")+(c.useFlashBlock?", flashBlock mode":""):"")+" --",1)}function b(a,b){return'<param name="'+
a+'" value="'+b+'" />'}if(P&&Q)return!1;if(c.html5Only)return qa(),e(),c.oMC=r(c.movieID),X(),Q=P=!0,!1;var f=d||c.url,g=c.altURL||f,h;h=ba();var i,l,j=K(),m,n=null,n=(n=k.getElementsByTagName("html")[0])&&n.dir&&n.dir.match(/rtl/i),a="undefined"===typeof a?c.id:a;qa();c.url=Ia(M?f:g);d=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode;if(null!==c.wmode&&(t.match(/msie 8/i)||!C&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))o("spcWmode"),c.wmode=null;h={name:a,
-id:a,src:d,width:"auto",height:"auto",quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:Va+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};if(c.debugFlash)h.FlashVars="debug=1";c.wmode||delete h.wmode;if(C)f=k.createElement("div"),l=['<object id="'+a+'" data="'+d+'" type="'+h.type+'" title="'+h.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+
-Va+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+h.width+'" height="'+h.height+'">',b("movie",d),b("AllowScriptAccess",c.allowScriptAccess),b("quality",h.quality),c.wmode?b("wmode",c.wmode):"",b("bgcolor",c.bgColor),b("hasPriority","true"),c.debugFlash?b("FlashVars",h.FlashVars):"","</object>"].join("");else for(i in f=k.createElement("embed"),h)h.hasOwnProperty(i)&&f.setAttribute(i,h[i]);ta();j=K();if(h=ba())if(c.oMC=r(c.movieID)||k.createElement("div"),
-c.oMC.id){m=c.oMC.className;c.oMC.className=(m?m+" ":"movieContainer")+(j?" "+j:"");c.oMC.appendChild(f);if(C)i=c.oMC.appendChild(k.createElement("div")),i.className="sm2-object-box",i.innerHTML=l;Q=!0}else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+j;i=j=null;if(!c.useFlashBlock)if(c.useHighPerformance)j={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(j={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},n)j.left=Math.abs(parseInt(j.left,
-10))+"px";if(cb)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(m in j)j.hasOwnProperty(m)&&(c.oMC.style[m]=j[m]);try{C||c.oMC.appendChild(f);h.appendChild(c.oMC);if(C)i=c.oMC.appendChild(k.createElement("div")),i.className="sm2-object-box",i.innerHTML=l;Q=!0}catch(p){throw Error(q("domError")+" \n"+p.toString());}}P=!0;e();c._wD("soundManager::createMovie(): Trying to load "+d+(!M&&c.altURL?" (alternate URL)":""),1);return!0};aa=function(){if(c.html5Only)return ca(),!1;if(g)return!1;g=c.getMovie(c.id);
-if(!g)S?(C?c.oMC.innerHTML=ua:c.oMC.appendChild(S),S=null,P=!0):ca(c.id,c.url),g=c.getMovie(c.id);g&&o("waitEI");c.oninitmovie instanceof Function&&setTimeout(c.oninitmovie,1);return!0};Z=function(){setTimeout(Fa,1E3)};Fa=function(){if(ga)return!1;ga=!0;l.remove(i,"load",Z);if(L&&!Da)return o("waitFocus"),!1;var a;p||(a=c.getMoviePercent(),c._wD(q("waitImpatient",100===a?" (SWF loaded)":0<a?" (SWF "+a+"% loaded)":"")));setTimeout(function(){a=c.getMoviePercent();p||(c._wD("soundManager: No Flash response within expected time.\nLikely causes: "+
-(0===a?"Loading "+c.movieURL+" may have failed (and/or Flash "+j+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(c.debugFlash?" "+q("checkSWF"):""),2),!M&&a&&(o("localFail",2),c.debugFlash||o("tryDebug",2)),0===a&&c._wD(q("swf404",c.url)),w("flashtojs",!1,": Timed out"+M?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"));!p&&Ta&&(null===a?c.useFlashBlock||0===c.flashLoadTimeout?(c.useFlashBlock&&va(),o("waitForever")):da(!0):0===c.flashLoadTimeout?o("waitForever"):
-da(!0))},c.flashLoadTimeout)};D=function(){function a(){l.remove(i,"focus",D);l.remove(i,"load",D)}if(Da||!L)return a(),!0;Da=Ta=!0;c._wD("soundManager::handleFocus()");V&&L&&l.remove(i,"mousemove",D);ga=!1;a();return!0};Ra=function(){var a,d=[];if(c.useHTML5Audio&&c.hasHTML5){for(a in c.audioFormats)c.audioFormats.hasOwnProperty(a)&&d.push(a+": "+c.html5[a]+(!c.html5[a]&&u&&c.flash[a]?" (using flash)":c.preferFlash&&c.flash[a]&&u?" (preferring flash)":!c.html5[a]?" ("+(c.audioFormats[a].required?
-"required, ":"")+"and no flash support)":""));c._wD("-- SoundManager 2: HTML5 support tests ("+c.html5Test+"): "+d.join(", ")+" --",1)}};R=function(a){if(p)return!1;if(c.html5Only)return c._wD("-- SoundManager 2: loaded --"),p=!0,H(),w("onload",!0),!0;var d;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())p=!0,x&&(d={type:!u&&y?"NO_FLASH":"INIT_TIMEOUT"});c._wD("-- SoundManager 2 "+(x?"failed to load":"loaded")+" ("+(x?"security/load error":"OK")+") --",1);if(x||a){if(c.useFlashBlock&&
-c.oMC)c.oMC.className=K()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error");G({type:"ontimeout",error:d});w("onload",!1);J(d);return!1}w("onload",!0);if(c.waitForWindowLoad&&!Y)return o("waitOnload"),l.add(i,"load",H),!1;c.waitForWindowLoad&&Y&&o("docLoaded");H();return!0};X=function(){o("init");if(p)return o("didInit"),!1;if(c.html5Only){if(!p)l.remove(i,"load",c.beginDelayedInit),c.enabled=!0,R();return!0}aa();try{o("flashJS"),g._externalInterfaceTest(!1),Ga(!0,c.flashPollingInterval||
-(c.useHighPerformance?10:50)),c.debugMode||g._disableDebug(),c.enabled=!0,w("jstoflash",!0),c.html5Only||l.add(i,"unload",na)}catch(a){return c._wD("js/flash exception: "+a.toString()),w("jstoflash",!1),J({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),da(!0),R(),!1}R();l.remove(i,"load",c.beginDelayedInit);return!0};I=function(){if(sa)return!1;sa=!0;ta();var a=O.toLowerCase(),d=null,d=null,e="undefined"!==typeof console&&"undefined"!==typeof console.log;if(-1!==a.indexOf("sm2-usehtml5audio="))d="1"===a.charAt(a.indexOf("sm2-usehtml5audio=")+
-18),e&&console.log((d?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter"),c.useHTML5Audio=d;if(-1!==a.indexOf("sm2-preferflash="))d="1"===a.charAt(a.indexOf("sm2-preferflash=")+16),e&&console.log((d?"Enabling ":"Disabling ")+"preferFlash via URL parameter"),c.preferFlash=d;if(!u&&c.hasHTML5)c._wD("SoundManager: No Flash detected"+(!c.useHTML5Audio?", enabling HTML5.":". Trying HTML5-only mode.")),c.useHTML5Audio=!0,c.preferFlash=!1;Oa();c.html5.usingFlash=Na();y=c.html5.usingFlash;Ra();if(!u&&
-y)c._wD("SoundManager: Fatal error: Flash is needed to play some required formats, but is not available."),c.flashLoadTimeout=1;k.removeEventListener&&k.removeEventListener("DOMContentLoaded",I,!1);aa();return!0};za=function(){"complete"===k.readyState&&(I(),k.detachEvent("onreadystatechange",za));return!0};ra=function(){Y=!0;l.remove(i,"load",ra)};ka();l.add(i,"focus",D);l.add(i,"load",D);l.add(i,"load",Z);l.add(i,"load",ra);V&&L&&l.add(i,"mousemove",D);k.addEventListener?k.addEventListener("DOMContentLoaded",
-I,!1):k.attachEvent?k.attachEvent("onreadystatechange",za):(w("onload",!1),J({type:"NO_DOM2_EVENTS",fatal:!0}));"complete"===k.readyState&&setTimeout(I,100)}var la=null;if("undefined"===typeof SM2_DEFER||!SM2_DEFER)la=new W;F.SoundManager=W;F.soundManager=la})(window);
+id:a,src:d,quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:Va+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};if(c.debugFlash)h.FlashVars="debug=1";c.wmode||delete h.wmode;if(C)f=k.createElement("div"),l=['<object id="'+a+'" data="'+d+'" type="'+h.type+'" title="'+h.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+Va+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+
+h.width+'" height="'+h.height+'">',b("movie",d),b("AllowScriptAccess",c.allowScriptAccess),b("quality",h.quality),c.wmode?b("wmode",c.wmode):"",b("bgcolor",c.bgColor),b("hasPriority","true"),c.debugFlash?b("FlashVars",h.FlashVars):"","</object>"].join("");else for(i in f=k.createElement("embed"),h)h.hasOwnProperty(i)&&f.setAttribute(i,h[i]);ta();j=K();if(h=ba())if(c.oMC=r(c.movieID)||k.createElement("div"),c.oMC.id){m=c.oMC.className;c.oMC.className=(m?m+" ":"movieContainer")+(j?" "+j:"");c.oMC.appendChild(f);
+if(C)i=c.oMC.appendChild(k.createElement("div")),i.className="sm2-object-box",i.innerHTML=l;Q=!0}else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+j;i=j=null;if(!c.useFlashBlock)if(c.useHighPerformance)j={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(j={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},n)j.left=Math.abs(parseInt(j.left,10))+"px";if(cb)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(m in j)j.hasOwnProperty(m)&&
+(c.oMC.style[m]=j[m]);try{C||c.oMC.appendChild(f);h.appendChild(c.oMC);if(C)i=c.oMC.appendChild(k.createElement("div")),i.className="sm2-object-box",i.innerHTML=l;Q=!0}catch(p){throw Error(q("domError")+" \n"+p.toString());}}P=!0;e();c._wD("soundManager::createMovie(): Trying to load "+d+(!M&&c.altURL?" (alternate URL)":""),1);return!0};aa=function(){if(c.html5Only)return ca(),!1;if(g)return!1;g=c.getMovie(c.id);if(!g)S?(C?c.oMC.innerHTML=ua:c.oMC.appendChild(S),S=null,P=!0):ca(c.id,c.url),g=c.getMovie(c.id);
+g&&o("waitEI");c.oninitmovie instanceof Function&&setTimeout(c.oninitmovie,1);return!0};Z=function(){setTimeout(Fa,1E3)};Fa=function(){if(ga)return!1;ga=!0;l.remove(i,"load",Z);if(L&&!Da)return o("waitFocus"),!1;var a;p||(a=c.getMoviePercent(),c._wD(q("waitImpatient",100===a?" (SWF loaded)":0<a?" (SWF "+a+"% loaded)":"")));setTimeout(function(){a=c.getMoviePercent();p||(c._wD("soundManager: No Flash response within expected time.\nLikely causes: "+(0===a?"Loading "+c.movieURL+" may have failed (and/or Flash "+
+j+"+ not present?), ":"")+"Flash blocked or JS-Flash security error."+(c.debugFlash?" "+q("checkSWF"):""),2),!M&&a&&(o("localFail",2),c.debugFlash||o("tryDebug",2)),0===a&&c._wD(q("swf404",c.url)),w("flashtojs",!1,": Timed out"+M?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"));!p&&Ta&&(null===a?c.useFlashBlock||0===c.flashLoadTimeout?(c.useFlashBlock&&va(),o("waitForever")):da(!0):0===c.flashLoadTimeout?o("waitForever"):da(!0))},c.flashLoadTimeout)};D=function(){function a(){l.remove(i,
+"focus",D);l.remove(i,"load",D)}if(Da||!L)return a(),!0;Da=Ta=!0;c._wD("soundManager::handleFocus()");V&&L&&l.remove(i,"mousemove",D);ga=!1;a();return!0};Ra=function(){var a,d=[];if(c.useHTML5Audio&&c.hasHTML5){for(a in c.audioFormats)c.audioFormats.hasOwnProperty(a)&&d.push(a+": "+c.html5[a]+(!c.html5[a]&&u&&c.flash[a]?" (using flash)":c.preferFlash&&c.flash[a]&&u?" (preferring flash)":!c.html5[a]?" ("+(c.audioFormats[a].required?"required, ":"")+"and no flash support)":""));c._wD("-- SoundManager 2: HTML5 support tests ("+
+c.html5Test+"): "+d.join(", ")+" --",1)}};R=function(a){if(p)return!1;if(c.html5Only)return c._wD("-- SoundManager 2: loaded --"),p=!0,H(),w("onload",!0),!0;var d;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())p=!0,x&&(d={type:!u&&y?"NO_FLASH":"INIT_TIMEOUT"});c._wD("-- SoundManager 2 "+(x?"failed to load":"loaded")+" ("+(x?"security/load error":"OK")+") --",1);if(x||a){if(c.useFlashBlock&&c.oMC)c.oMC.className=K()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error");G({type:"ontimeout",
+error:d});w("onload",!1);J(d);return!1}w("onload",!0);if(c.waitForWindowLoad&&!Y)return o("waitOnload"),l.add(i,"load",H),!1;c.waitForWindowLoad&&Y&&o("docLoaded");H();return!0};X=function(){o("init");if(p)return o("didInit"),!1;if(c.html5Only){if(!p)l.remove(i,"load",c.beginDelayedInit),c.enabled=!0,R();return!0}aa();try{o("flashJS"),g._externalInterfaceTest(!1),Ga(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||g._disableDebug(),c.enabled=!0,w("jstoflash",!0),c.html5Only||
+l.add(i,"unload",na)}catch(a){return c._wD("js/flash exception: "+a.toString()),w("jstoflash",!1),J({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),da(!0),R(),!1}R();l.remove(i,"load",c.beginDelayedInit);return!0};I=function(){if(sa)return!1;sa=!0;ta();var a=O.toLowerCase(),d=null,d=null,e="undefined"!==typeof console&&"undefined"!==typeof console.log;if(-1!==a.indexOf("sm2-usehtml5audio="))d="1"===a.charAt(a.indexOf("sm2-usehtml5audio=")+18),e&&console.log((d?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter"),
+c.useHTML5Audio=d;if(-1!==a.indexOf("sm2-preferflash="))d="1"===a.charAt(a.indexOf("sm2-preferflash=")+16),e&&console.log((d?"Enabling ":"Disabling ")+"preferFlash via URL parameter"),c.preferFlash=d;if(!u&&c.hasHTML5)c._wD("SoundManager: No Flash detected"+(!c.useHTML5Audio?", enabling HTML5.":". Trying HTML5-only mode.")),c.useHTML5Audio=!0,c.preferFlash=!1;Oa();c.html5.usingFlash=Na();y=c.html5.usingFlash;Ra();if(!u&&y)c._wD("SoundManager: Fatal error: Flash is needed to play some required formats, but is not available."),
+c.flashLoadTimeout=1;k.removeEventListener&&k.removeEventListener("DOMContentLoaded",I,!1);aa();return!0};za=function(){"complete"===k.readyState&&(I(),k.detachEvent("onreadystatechange",za));return!0};ra=function(){Y=!0;l.remove(i,"load",ra)};ka();l.add(i,"focus",D);l.add(i,"load",D);l.add(i,"load",Z);l.add(i,"load",ra);V&&L&&l.add(i,"mousemove",D);k.addEventListener?k.addEventListener("DOMContentLoaded",I,!1):k.attachEvent?k.attachEvent("onreadystatechange",za):(w("onload",!1),J({type:"NO_DOM2_EVENTS",
+fatal:!0}));"complete"===k.readyState&&setTimeout(I,100)}var la=null;if("undefined"===typeof SM2_DEFER||!SM2_DEFER)la=new W;F.SoundManager=W;F.soundManager=la})(window);
View
22 script/soundmanager2-nodebug-jsmin.js
@@ -51,7 +51,7 @@ b._iO.ondataerror.apply(b)}};la=function(){return k.body||k._docElement||k.getEl
if(e)g[h](a[0],a[1]);else g[h].apply(g,a)}var e=g.attachEvent,b={add:e?"attachEvent":"addEventListener",remove:e?"detachEvent":"removeEventListener"};return{add:function(){c(a(arguments),"add")},remove:function(){c(a(arguments),"remove")}}}();u={abort:l(function(){}),canplay:l(function(){var a=this._t,c;if(a._html5_canplay)return!0;a._html5_canplay=!0;a._onbufferchange(0);c=!isNaN(a.position)?a.position/1E3:null;if(a.position&&this.currentTime!==c)try{this.currentTime=c}catch(e){}a._iO._oncanplay&&
a._iO._oncanplay()}),load:l(function(){var a=this._t;a.loaded||(a._onbufferchange(0),a._whileloading(a.bytesTotal,a.bytesTotal,a._get_html5_duration()),a._onload(!0))}),ended:l(function(){this._t._onfinish()}),error:l(function(){this._t._onload(!1)}),loadeddata:l(function(){var a=this._t,c=a.bytesTotal||1;if(!a._loaded&&!O)a.duration=a._get_html5_duration(),a._whileloading(c,c,a._get_html5_duration()),a._onload(!0)}),loadedmetadata:l(function(){}),loadstart:l(function(){this._t._onbufferchange(1)}),
play:l(function(){this._t._onbufferchange(0)}),playing:l(function(){this._t._onbufferchange(0)}),progress:l(function(a){var c=this._t,e,b=0,f=a.target.buffered;e=a.loaded||0;var i=a.total||1;if(c.loaded)return!1;if(f&&f.length){for(e=f.length-1;0<=e;e--)b=f.end(e)-f.start(e);e=b/a.target.duration}isNaN(e)||(c._onbufferchange(0),c._whileloading(e,i,c._get_html5_duration()),e&&i&&e===i&&u.load.call(this,a))}),ratechange:l(function(){}),suspend:l(function(a){var c=this._t;u.progress.call(this,a);c._onsuspend()}),
-stalled:l(function(){}),timeupdate:l(function(){this._t._onTimer()}),waiting:l(function(){this._t._onbufferchange(1)})};aa=function(a){return!a.serverURL&&(a.type?N({type:a.type}):N({url:a.url})||c.html5Only)};ra=function(a){if(a)a.src=Ra?"":"about:blank"};N=function(a){function d(a){return c.preferFlash&&r&&!c.ignoreFlash&&"undefined"!==typeof c.flash[a]&&c.flash[a]}if(!c.useHTML5Audio||!c.hasHTML5)return!1;var e=a.url||null,a=a.type||null,b=c.audioFormats,f;if(a&&"undefined"!==c.html5[a])return c.html5[a]&&
+stalled:l(function(){}),timeupdate:l(function(){this._t._onTimer()}),waiting:l(function(){this._t._onbufferchange(1)})};aa=function(a){return!a.serverURL&&(a.type?N({type:a.type}):N({url:a.url})||c.html5Only)};ra=function(a){if(a)a.src=Ra?"":"about:blank"};N=function(a){function d(a){return c.preferFlash&&r&&!c.ignoreFlash&&"undefined"!==typeof c.flash[a]&&c.flash[a]}if(!c.useHTML5Audio||!c.hasHTML5)return!1;var e=a.url||null,a=a.type||null,b=c.audioFormats,f;if(a&&"undefined"!==typeof c.html5[a])return c.html5[a]&&
!d(a);if(!w){w=[];for(f in b)b.hasOwnProperty(f)&&(w.push(f),b[f].related&&(w=w.concat(b[f].related)));w=RegExp("\\.("+w.join("|")+")(\\?.*)?$","i")}f=e?e.toLowerCase().match(w):null;if(!f||!f.length)if(a)e=a.indexOf(";"),f=(-1!==e?a.substr(0,e):a).substr(6);else return!1;else f=f[1];if(f&&"undefined"!==typeof c.html5[f])return c.html5[f]&&!d(f);a="audio/"+f;e=c.html5.canPlayType({type:a});return(c.html5[f]=e)&&c.html5[a]&&!d(a)};Ha=function(){function a(a){var b,e,f=!1;if(!d||"function"!==typeof d.canPlayType)return!1;
if(a instanceof Array){for(b=0,e=a.length;b<e&&!f;b++)if(c.html5[a[b]]||d.canPlayType(a[b]).match(c.html5Test))f=!0,c.html5[a[b]]=!0,c.flash[a[b]]=!(!c.preferFlash||!r||!a[b].match(La));return f}a=d&&"function"===typeof d.canPlayType?d.canPlayType(a):!1;return!(!a||!a.match(c.html5Test))}if(!c.useHTML5Audio||"undefined"===typeof Audio)return!1;var d="undefined"!==typeof Audio?Ua?new Audio(null):new Audio:null,e,b={},f,i;f=c.audioFormats;for(e in f)if(f.hasOwnProperty(e)&&(b[e]=a(f[e].type),b["audio/"+
e]=b[e],c.flash[e]=c.preferFlash&&!c.ignoreFlash&&e.match(La)?!0:!1,f[e]&&f[e].related))for(i=f[e].related.length-1;0<=i;i--)b["audio/"+f[e].related[i]]=b[e],c.html5[f[e].related[i]]=b[e],c.flash[f[e].related[i]]=b[e];b.canPlayType=d?a:null;c.html5=s(c.html5,b);return!0};E=function(){};W=function(a){if(8===j&&1<a.loops&&a.stream)a.stream=!1;return a};X=function(a){if(a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData))a.usePolicyFile=!0;return a};pa=function(){};fa=function(){return!1};
@@ -65,13 +65,13 @@ n.match(/os (1|2|3_0|3_1)/i)){c.hasHTML5=!1;c.html5Only=!0;if(c.oMC)c.oMC.style.
$=function(a){var d,e,b=0;if(a instanceof Array){for(d=0,e=a.length;d<e;d++)if(a[d]instanceof Object){if(c.canPlayMIME(a[d].type)){b=d;break}}else if(c.canPlayURL(a[d])){b=d;break}if(a[b].url)a[b]=a[b].url;return a[b]}return a};Da=function(a){if(!a._hasTimer)a._hasTimer=!0,!ua&&c.html5PollingInterval&&(null===M&&0===Z&&(M=H.setInterval(Fa,c.html5PollingInterval)),Z++)};Ea=function(a){if(a._hasTimer)a._hasTimer=!1,!ua&&c.html5PollingInterval&&Z--};Fa=function(){var a;if(null!==M&&!Z)return H.clearInterval(M),
M=null,!1;for(a=c.soundIDs.length-1;0<=a;a--)c.sounds[c.soundIDs[a]].isHTML5&&c.sounds[c.soundIDs[a]]._hasTimer&&c.sounds[c.soundIDs[a]]._onTimer()};D=function(a){a="undefined"!==typeof a?a:{};c.onerror instanceof Function&&c.onerror.apply(g,[{type:"undefined"!==typeof a.type?a.type:null}]);"undefined"!==typeof a.fatal&&a.fatal&&c.disable()};Ia=function(){if(!va||!ba())return!1;var a=c.audioFormats,d,e;for(e in a)if(a.hasOwnProperty(e)&&("mp3"===e||"mp4"===e))if(c.html5[e]=!1,a[e]&&a[e].related)for(d=
a[e].related.length-1;0<=d;d--)c.html5[a[e].related[d]]=!1};this._setSandboxType=function(){};this._externalInterfaceOK=function(){if(c.swfLoaded)return!1;(new Date).getTime();c.swfLoaded=!0;G=!1;va&&Ia();x?setTimeout(R,100):R()};U=function(a,d){function e(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(I&&J)return!1;if(c.html5Only)return ia(),c.oMC=Q(c.movieID),R(),J=I=!0,!1;var b=d||c.url,f=c.altURL||b,i;i=la();var g,h,j=F(),l,m=null,m=(m=k.getElementsByTagName("html")[0])&&m.dir&&m.dir.match(/rtl/i),
-a="undefined"===typeof a?c.id:a;ia();c.url=Ca(xa?b:f);d=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode;if(null!==c.wmode&&(n.match(/msie 8/i)||!x&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))c.wmode=null;i={name:a,id:a,src:d,width:"auto",height:"auto",quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:Ma+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",
-wmode:c.wmode,hasPriority:"true"};if(c.debugFlash)i.FlashVars="debug=1";c.wmode||delete i.wmode;if(x)b=k.createElement("div"),h=['<object id="'+a+'" data="'+d+'" type="'+i.type+'" title="'+i.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+Ma+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+i.width+'" height="'+i.height+'">',e("movie",d),e("AllowScriptAccess",c.allowScriptAccess),e("quality",i.quality),c.wmode?e("wmode",c.wmode):"",
-e("bgcolor",c.bgColor),e("hasPriority","true"),c.debugFlash?e("FlashVars",i.FlashVars):"","</object>"].join("");else for(g in b=k.createElement("embed"),i)i.hasOwnProperty(g)&&b.setAttribute(g,i[g]);ma();j=F();if(i=la())if(c.oMC=Q(c.movieID)||k.createElement("div"),c.oMC.id){l=c.oMC.className;c.oMC.className=(l?l+" ":"movieContainer")+(j?" "+j:"");c.oMC.appendChild(b);if(x)g=c.oMC.appendChild(k.createElement("div")),g.className="sm2-object-box",g.innerHTML=h;J=!0}else{c.oMC.id=c.movieID;c.oMC.className=
-"movieContainer "+j;g=j=null;if(!c.useFlashBlock)if(c.useHighPerformance)j={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(j={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},m)j.left=Math.abs(parseInt(j.left,10))+"px";if(Ta)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(l in j)j.hasOwnProperty(l)&&(c.oMC.style[l]=j[l]);try{x||c.oMC.appendChild(b);i.appendChild(c.oMC);if(x)g=c.oMC.appendChild(k.createElement("div")),g.className=
-"sm2-object-box",g.innerHTML=h;J=!0}catch(o){throw Error(E("domError")+" \n"+o.toString());}}return I=!0};T=function(){if(c.html5Only)return U(),!1;if(h)return!1;h=c.getMovie(c.id);if(!h)L?(x?c.oMC.innerHTML=na:c.oMC.appendChild(L),L=null,I=!0):U(c.id,c.url),h=c.getMovie(c.id);c.oninitmovie instanceof Function&&setTimeout(c.oninitmovie,1);return!0};S=function(){setTimeout(za,1E3)};za=function(){if(Y)return!1;Y=!0;m.remove(g,"load",S);if(G&&!wa)return!1;var a;o||(a=c.getMoviePercent());setTimeout(function(){a=
-c.getMoviePercent();!o&&Ka&&(null===a?c.useFlashBlock||0===c.flashLoadTimeout?c.useFlashBlock&&oa():V(!0):0!==c.flashLoadTimeout&&V(!0))},c.flashLoadTimeout)};y=function(){function a(){m.remove(g,"focus",y);m.remove(g,"load",y)}if(wa||!G)return a(),!0;wa=Ka=!0;O&&G&&m.remove(g,"mousemove",y);Y=!1;a();return!0};Ja=function(){var a,d=[];if(c.useHTML5Audio&&c.hasHTML5)for(a in c.audioFormats)c.audioFormats.hasOwnProperty(a)&&d.push(a+": "+c.html5[a]+(!c.html5[a]&&r&&c.flash[a]?" (using flash)":c.preferFlash&&
-c.flash[a]&&r?" (preferring flash)":!c.html5[a]?" ("+(c.audioFormats[a].required?"required, ":"")+"and no flash support)":""))};K=function(a){if(o)return!1;if(c.html5Only)return o=!0,B(),!0;var d;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())o=!0,v&&(d={type:!r&&t?"NO_FLASH":"INIT_TIMEOUT"});if(v||a){if(c.useFlashBlock&&c.oMC)c.oMC.className=F()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error");A({type:"ontimeout",error:d});D(d);return!1}if(c.waitForWindowLoad&&!ga)return m.add(g,
-"load",B),!1;B();return!0};R=function(){if(o)return!1;if(c.html5Only){if(!o)m.remove(g,"load",c.beginDelayedInit),c.enabled=!0,K();return!0}T();try{h._externalInterfaceTest(!1),Aa(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||h._disableDebug(),c.enabled=!0,c.html5Only||m.add(g,"unload",fa)}catch(a){return D({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),V(!0),K(),!1}K();m.remove(g,"load",c.beginDelayedInit);return!0};C=function(){if(ka)return!1;ka=!0;ma();if(!r&&c.hasHTML5)c.useHTML5Audio=
-!0,c.preferFlash=!1;Ha();c.html5.usingFlash=Ga();t=c.html5.usingFlash;Ja();if(!r&&t)c.flashLoadTimeout=1;k.removeEventListener&&k.removeEventListener("DOMContentLoaded",C,!1);T();return!0};sa=function(){"complete"===k.readyState&&(C(),k.detachEvent("onreadystatechange",sa));return!0};ja=function(){ga=!0;m.remove(g,"load",ja)};ba();m.add(g,"focus",y);m.add(g,"load",y);m.add(g,"load",S);m.add(g,"load",ja);O&&G&&m.add(g,"mousemove",y);k.addEventListener?k.addEventListener("DOMContentLoaded",C,!1):k.attachEvent?
-k.attachEvent("onreadystatechange",sa):D({type:"NO_DOM2_EVENTS",fatal:!0});"complete"===k.readyState&&setTimeout(C,100)}var ca=null;if("undefined"===typeof SM2_DEFER||!SM2_DEFER)ca=new P;H.SoundManager=P;H.soundManager=ca})(window);
+a="undefined"===typeof a?c.id:a;ia();c.url=Ca(xa?b:f);d=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode;if(null!==c.wmode&&(n.match(/msie 8/i)||!x&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))c.wmode=null;i={name:a,id:a,src:d,quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:Ma+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};
+if(c.debugFlash)i.FlashVars="debug=1";c.wmode||delete i.wmode;if(x)b=k.createElement("div"),h=['<object id="'+a+'" data="'+d+'" type="'+i.type+'" title="'+i.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+Ma+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="'+i.width+'" height="'+i.height+'">',e("movie",d),e("AllowScriptAccess",c.allowScriptAccess),e("quality",i.quality),c.wmode?e("wmode",c.wmode):"",e("bgcolor",c.bgColor),e("hasPriority",
+"true"),c.debugFlash?e("FlashVars",i.FlashVars):"","</object>"].join("");else for(g in b=k.createElement("embed"),i)i.hasOwnProperty(g)&&b.setAttribute(g,i[g]);ma();j=F();if(i=la())if(c.oMC=Q(c.movieID)||k.createElement("div"),c.oMC.id){l=c.oMC.className;c.oMC.className=(l?l+" ":"movieContainer")+(j?" "+j:"");c.oMC.appendChild(b);if(x)g=c.oMC.appendChild(k.createElement("div")),g.className="sm2-object-box",g.innerHTML=h;J=!0}else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+j;g=j=null;if(!c.useFlashBlock)if(c.useHighPerformance)j=
+{position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(j={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},m)j.left=Math.abs(parseInt(j.left,10))+"px";if(Ta)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(l in j)j.hasOwnProperty(l)&&(c.oMC.style[l]=j[l]);try{x||c.oMC.appendChild(b);i.appendChild(c.oMC);if(x)g=c.oMC.appendChild(k.createElement("div")),g.className="sm2-object-box",g.innerHTML=h;J=!0}catch(o){throw Error(E("domError")+" \n"+
+o.toString());}}return I=!0};T=function(){if(c.html5Only)return U(),!1;if(h)return!1;h=c.getMovie(c.id);if(!h)L?(x?c.oMC.innerHTML=na:c.oMC.appendChild(L),L=null,I=!0):U(c.id,c.url),h=c.getMovie(c.id);c.oninitmovie instanceof Function&&setTimeout(c.oninitmovie,1);return!0};S=function(){setTimeout(za,1E3)};za=function(){if(Y)return!1;Y=!0;m.remove(g,"load",S);if(G&&!wa)return!1;var a;o||(a=c.getMoviePercent());setTimeout(function(){a=c.getMoviePercent();!o&&Ka&&(null===a?c.useFlashBlock||0===c.flashLoadTimeout?
+c.useFlashBlock&&oa():V(!0):0!==c.flashLoadTimeout&&V(!0))},c.flashLoadTimeout)};y=function(){function a(){m.remove(g,"focus",y);m.remove(g,"load",y)}if(wa||!G)return a(),!0;wa=Ka=!0;O&&G&&m.remove(g,"mousemove",y);Y=!1;a();return!0};Ja=function(){var a,d=[];if(c.useHTML5Audio&&c.hasHTML5)for(a in c.audioFormats)c.audioFormats.hasOwnProperty(a)&&d.push(a+": "+c.html5[a]+(!c.html5[a]&&r&&c.flash[a]?" (using flash)":c.preferFlash&&c.flash[a]&&r?" (preferring flash)":!c.html5[a]?" ("+(c.audioFormats[a].required?
+"required, ":"")+"and no flash support)":""))};K=function(a){if(o)return!1;if(c.html5Only)return o=!0,B(),!0;var d;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())o=!0,v&&(d={type:!r&&t?"NO_FLASH":"INIT_TIMEOUT"});if(v||a){if(c.useFlashBlock&&c.oMC)c.oMC.className=F()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error");A({type:"ontimeout",error:d});D(d);return!1}if(c.waitForWindowLoad&&!ga)return m.add(g,"load",B),!1;B();return!0};R=function(){if(o)return!1;if(c.html5Only){if(!o)m.remove(g,
+"load",c.beginDelayedInit),c.enabled=!0,K();return!0}T();try{h._externalInterfaceTest(!1),Aa(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||h._disableDebug(),c.enabled=!0,c.html5Only||m.add(g,"unload",fa)}catch(a){return D({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),V(!0),K(),!1}K();m.remove(g,"load",c.beginDelayedInit);return!0};C=function(){if(ka)return!1;ka=!0;ma();if(!r&&c.hasHTML5)c.useHTML5Audio=!0,c.preferFlash=!1;Ha();c.html5.usingFlash=Ga();t=c.html5.usingFlash;Ja();if(!r&&
+t)c.flashLoadTimeout=1;k.removeEventListener&&k.removeEventListener("DOMContentLoaded",C,!1);T();return!0};sa=function(){"complete"===k.readyState&&(C(),k.detachEvent("onreadystatechange",sa));return!0};ja=function(){ga=!0;m.remove(g,"load",ja)};ba();m.add(g,"focus",y);m.add(g,"load",y);m.add(g,"load",S);m.add(g,"load",ja);O&&G&&m.add(g,"mousemove",y);k.addEventListener?k.addEventListener("DOMContentLoaded",C,!1):k.attachEvent?k.attachEvent("onreadystatechange",sa):D({type:"NO_DOM2_EVENTS",fatal:!0});
+"complete"===k.readyState&&setTimeout(C,100)}var ca=null;if("undefined"===typeof SM2_DEFER||!SM2_DEFER)ca=new P;H.SoundManager=P;H.soundManager=ca})(window);
View
12 script/soundmanager2-nodebug.js
@@ -1574,7 +1574,7 @@ function SoundManager(smURL, smID) {
function preferFlashCheck(kind) {
return (_s.preferFlash && _hasFlash && !_s.ignoreFlash && (typeof _s.flash[kind] !== 'undefined' && _s.flash[kind]));
}
- if (mime && _s.html5[mime] !== 'undefined') {
+ if (mime && typeof _s.html5[mime] !== 'undefined') {
return (_s.html5[mime] && !preferFlashCheck(mime));
}
if (!_html5Ext) {
@@ -2025,7 +2025,7 @@ function SoundManager(smURL, smID) {
localURL = (_s.altURL || remoteURL),
swfTitle = 'JS/Flash audio component (SoundManager 2)',
oEmbed, oMovie, oTarget = _getDocument(), tmp, movieHTML, oEl, extraClass = _getSWFCSS(),
- s, x, sClass, side = 'auto', isRTL = null,
+ s, x, sClass, side = null, isRTL = null,
html = _doc.getElementsByTagName('html')[0];
isRTL = (html && html.dir && html.dir.match(/rtl/i));
smID = (typeof smID === 'undefined'?_s.id:smID);
@@ -2043,8 +2043,6 @@ function SoundManager(smURL, smID) {
'name': smID,
'id': smID,
'src': smURL,
- 'width': side,
- 'height': side,
'quality': 'high',
'allowScriptAccess': _s.allowScriptAccess,
'bgcolor': _s.bgColor,
@@ -2054,6 +2052,10 @@ function SoundManager(smURL, smID) {
'wmode': _s.wmode,
'hasPriority': 'true'
};
+ if (side !== null) {
+ oEmbed.width = side;
+ oEmbed.height = side;
+ }
if (_s.debugFlash) {
oEmbed.FlashVars = 'debug=1';
}
@@ -2375,4 +2377,4 @@ if (typeof SM2_DEFER === 'undefined' || !SM2_DEFER) {
}
window.SoundManager = SoundManager;
window.soundManager = soundManager;
-}(window));
+}(window));
View
14 script/soundmanager2.js
@@ -3379,7 +3379,7 @@ function SoundManager(smURL, smID) {
// account for known cases like audio/mp3
- if (mime && _s.html5[mime] !== 'undefined') {
+ if (mime && typeof _s.html5[mime] !== 'undefined') {
return (_s.html5[mime] && !preferFlashCheck(mime));
}
@@ -4410,7 +4410,7 @@ function SoundManager(smURL, smID) {
localURL = (_s.altURL || remoteURL),
swfTitle = 'JS/Flash audio component (SoundManager 2)',
oEmbed, oMovie, oTarget = _getDocument(), tmp, movieHTML, oEl, extraClass = _getSWFCSS(),
- s, x, sClass, side = 'auto', isRTL = null,
+ s, x, sClass, side = null, isRTL = null,
html = _doc.getElementsByTagName('html')[0];
isRTL = (html && html.dir && html.dir.match(/rtl/i));
@@ -4441,8 +4441,6 @@ function SoundManager(smURL, smID) {
'name': smID,
'id': smID,
'src': smURL,
- 'width': side,
- 'height': side,
'quality': 'high',
'allowScriptAccess': _s.allowScriptAccess,
'bgcolor': _s.bgColor,
@@ -4454,6 +4452,12 @@ function SoundManager(smURL, smID) {
'hasPriority': 'true'
};
+ if (side !== null) {
+ // don't specify width/height if null.
+ oEmbed.width = side;
+ oEmbed.height = side;
+ }
+
if (_s.debugFlash) {
oEmbed.FlashVars = 'debug=1';
}
@@ -5018,4 +5022,4 @@ if (typeof SM2_DEFER === 'undefined' || !SM2_DEFER) {
window.SoundManager = SoundManager; // constructor
window.soundManager = soundManager; // public API, flash callbacks etc.
-}(window));
+}(window));

No commit comments for this range

Something went wrong with that request. Please try again.