From 87bcb444aae4cb5eb48ebafc1a687b7ca89893eb Mon Sep 17 00:00:00 2001 From: yomguy Date: Tue, 2 Oct 2012 13:56:56 +0200 Subject: [PATCH] * ui > static/timeside * upgrade SM2 * upgrade js scripts from telemeta --- README.rst | 4 +- timeside/{ui => static/timeside}/README.rst | 0 .../timeside}/js/libs/jquery-1.6.min.js | 0 .../timeside}/js/libs/raphael-min.js | 0 .../timeside/js/libs/soundmanager2-jsmin.js | 110 + .../js/libs/soundmanager2-nodebug-jsmin.js | 80 + .../timeside/js/libs/soundmanager2-nodebug.js | 2511 ++++++++ .../static/timeside/js/libs/soundmanager2.js | 5530 +++++++++++++++++ .../{ui => static/timeside}/js/markermap.js | 0 timeside/{ui => static/timeside}/js/player.js | 296 +- timeside/{ui => static/timeside}/js/ruler.js | 0 .../{ui => static/timeside}/js/rulermarker.js | 0 .../{ui => static/timeside}/js/timeside.js | 40 +- .../timeside}/skins/classic/img/forward.png | Bin .../timeside}/skins/classic/img/pause.png | Bin .../timeside}/skins/classic/img/play.png | Bin .../skins/classic/img/player_controlbg.png | Bin .../timeside}/skins/classic/img/rewind.png | Bin .../timeside}/skins/classic/img/setmarker.png | Bin .../timeside}/skins/classic/img/volumeoff.png | Bin .../timeside}/skins/classic/img/volumeon.png | Bin .../timeside}/skins/classic/img/wait.gif | Bin .../timeside}/skins/classic/style.css | 0 .../skins/lab/img/controlbg-inverted.png | Bin .../timeside}/skins/lab/img/controlbg.png | Bin .../timeside}/skins/lab/img/empty.png | Bin .../timeside}/skins/lab/img/forward.png | Bin .../timeside}/skins/lab/img/pause.png | Bin .../timeside}/skins/lab/img/play.png | Bin .../timeside}/skins/lab/img/rewind.png | Bin .../timeside}/skins/lab/img/setmarker.png | Bin .../timeside}/skins/lab/img/volume.png | Bin .../timeside}/skins/lab/img/volumeoff.png | Bin .../timeside}/skins/lab/img/volumeon.png | Bin .../timeside}/skins/lab/img/wait.gif | Bin .../timeside}/skins/lab/img/wait2.gif | Bin .../timeside}/skins/lab/img/wait3.gif | Bin .../timeside}/skins/lab/style.css | 0 .../static/timeside/swf/soundmanager2.swf | Bin 0 -> 2888 bytes .../timeside/swf/soundmanager2_debug.swf | Bin 0 -> 3304 bytes .../timeside/swf/soundmanager2_flash9.swf | Bin 0 -> 8700 bytes .../swf/soundmanager2_flash9_debug.swf | Bin 0 -> 17103 bytes .../swf/soundmanager2_flash_xdomain.zip | Bin 0 -> 32791 bytes .../ui/js/libs/soundmanager2-nodebug-jsmin.js | 75 - timeside/ui/js/libs/soundmanager2.js | 3015 --------- timeside/ui/swf/soundmanager2.swf | Bin 2867 -> 0 bytes timeside/ui/swf/soundmanager2_debug.swf | Bin 3302 -> 0 bytes timeside/ui/swf/soundmanager2_flash9.swf | Bin 8606 -> 0 bytes .../ui/swf/soundmanager2_flash9_debug.swf | Bin 16524 -> 0 bytes 49 files changed, 8394 insertions(+), 3267 deletions(-) rename timeside/{ui => static/timeside}/README.rst (100%) rename timeside/{ui => static/timeside}/js/libs/jquery-1.6.min.js (100%) rename timeside/{ui => static/timeside}/js/libs/raphael-min.js (100%) create mode 100755 timeside/static/timeside/js/libs/soundmanager2-jsmin.js create mode 100755 timeside/static/timeside/js/libs/soundmanager2-nodebug-jsmin.js create mode 100755 timeside/static/timeside/js/libs/soundmanager2-nodebug.js create mode 100755 timeside/static/timeside/js/libs/soundmanager2.js rename timeside/{ui => static/timeside}/js/markermap.js (100%) rename timeside/{ui => static/timeside}/js/player.js (87%) rename timeside/{ui => static/timeside}/js/ruler.js (100%) rename timeside/{ui => static/timeside}/js/rulermarker.js (100%) rename timeside/{ui => static/timeside}/js/timeside.js (99%) rename timeside/{ui => static/timeside}/skins/classic/img/forward.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/pause.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/play.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/player_controlbg.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/rewind.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/setmarker.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/volumeoff.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/volumeon.png (100%) rename timeside/{ui => static/timeside}/skins/classic/img/wait.gif (100%) rename timeside/{ui => static/timeside}/skins/classic/style.css (100%) rename timeside/{ui => static/timeside}/skins/lab/img/controlbg-inverted.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/controlbg.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/empty.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/forward.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/pause.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/play.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/rewind.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/setmarker.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/volume.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/volumeoff.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/volumeon.png (100%) rename timeside/{ui => static/timeside}/skins/lab/img/wait.gif (100%) rename timeside/{ui => static/timeside}/skins/lab/img/wait2.gif (100%) rename timeside/{ui => static/timeside}/skins/lab/img/wait3.gif (100%) rename timeside/{ui => static/timeside}/skins/lab/style.css (100%) create mode 100755 timeside/static/timeside/swf/soundmanager2.swf create mode 100755 timeside/static/timeside/swf/soundmanager2_debug.swf create mode 100755 timeside/static/timeside/swf/soundmanager2_flash9.swf create mode 100755 timeside/static/timeside/swf/soundmanager2_flash9_debug.swf create mode 100755 timeside/static/timeside/swf/soundmanager2_flash_xdomain.zip delete mode 100755 timeside/ui/js/libs/soundmanager2-nodebug-jsmin.js delete mode 100755 timeside/ui/js/libs/soundmanager2.js delete mode 100755 timeside/ui/swf/soundmanager2.swf delete mode 100755 timeside/ui/swf/soundmanager2_debug.swf delete mode 100755 timeside/ui/swf/soundmanager2_flash9.swf delete mode 100755 timeside/ui/swf/soundmanager2_flash9_debug.swf diff --git a/README.rst b/README.rst index 4f95f97..902ae01 100644 --- a/README.rst +++ b/README.rst @@ -108,11 +108,11 @@ TimeSide needs some other python modules to run. The following methods explain h $ sudo pip install timeside -To get non-free MP3, MP4 or AAC decoding and encoding features, add Debian Multimedia repository and install the modules:: +To get non-free (MP3, MP4, AAC, etc) decoding and encoding features, add Debian Multimedia repository and install the modules:: $ echo "deb http://www.deb-multimedia.org stable main non-free" | sudo tee -a /etc/apt/sources.list $ sudo apt-get update - $ apt-get install gstreamer0.10-lame gstreamer0.10-plugins-really-bad + $ apt-get install gstreamer0.10-lame gstreamer0.10-plugins-really-bad gstreamer0.10-plugins-ugly Batching diff --git a/timeside/ui/README.rst b/timeside/static/timeside/README.rst similarity index 100% rename from timeside/ui/README.rst rename to timeside/static/timeside/README.rst diff --git a/timeside/ui/js/libs/jquery-1.6.min.js b/timeside/static/timeside/js/libs/jquery-1.6.min.js similarity index 100% rename from timeside/ui/js/libs/jquery-1.6.min.js rename to timeside/static/timeside/js/libs/jquery-1.6.min.js diff --git a/timeside/ui/js/libs/raphael-min.js b/timeside/static/timeside/js/libs/raphael-min.js similarity index 100% rename from timeside/ui/js/libs/raphael-min.js rename to timeside/static/timeside/js/libs/raphael-min.js diff --git a/timeside/static/timeside/js/libs/soundmanager2-jsmin.js b/timeside/static/timeside/js/libs/soundmanager2-jsmin.js new file mode 100755 index 0000000..2f52e5f --- /dev/null +++ b/timeside/static/timeside/js/libs/soundmanager2-jsmin.js @@ -0,0 +1,110 @@ +/** @license + + + SoundManager 2: JavaScript Sound for the Web + ---------------------------------------------- + http://schillmania.com/projects/soundmanager2/ + + Copyright (c) 2007, Scott Schiller. All rights reserved. + Code provided under the BSD License: + http://schillmania.com/projects/soundmanager2/license.txt + + V2.97a.20120916 +*/ +(function(Z){function $($,oa){function aa(a){return c.preferFlash&&z&&!c.ignoreFlash&&"undefined"!==typeof c.flash[a]&&c.flash[a]}function q(a){return function(d){var e=this._t;!e||!e._a?(e&&e.id?c._wD(s+"ignoring "+d.type+": "+e.id):c._wD(s+"ignoring "+d.type),d=null):d=a.call(this,d);return d}}this.setupOptions={url:$||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null, +flashLoadTimeout:1E3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1,useHTML5Audio:!0,html5Test:/^(probably|maybe)$/i,preferFlash:!0,noSWFCache:!1};this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100};this.flash9Options= +{isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null,ondataerror:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null};this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"], +required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}};this.movieID="sm2-container";this.id=oa||"sm2movie";this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.versionNumber="V2.97a.20120916";this.altURL=this.movieURL=this.version=null;this.enabled=this.swfLoaded=!1;this.oMC=null;this.sounds={};this.soundIDs=[];this.didFlashBlock=this.muted=!1;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i}; +this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1};this.sandbox={type:null,types:{remote:"remote (domain-based) rules",localWithFile:"local with file access (no internet access)",localWithNetwork:"local with network (internet access only, no local access)",localTrusted:"local, trusted (local+internet access)"},description:null,noRemote:null,noLocal:null};var pa;try{pa="undefined"!==typeof Audio&&"undefined"!==typeof(qa&&10>opera.version()?new Audio(null):new Audio).canPlayType}catch(ib){pa= +!1}this.hasHTML5=pa;this.html5={usingFlash:null};this.flash={};this.ignoreFlash=this.html5Only=!1;var Ka,c=this,h=null,s="HTML5::",A,v=navigator.userAgent,k=Z,Q=k.location.href.toString(),i=document,ra,La,sa,j,D=[],ta=!0,x,R=!1,S=!1,m=!1,o=!1,ba=!1,n,eb=0,T,w,ua,H,va,I,J,K,Ma,wa,ca,da,ea,L,xa,U,fa,ga,M,Na,ya,fb=["log","info","warn","error"],Oa,ha,Pa,V=null,za=null,p,Aa,N,Qa,ia,ja,O,t,W=!1,Ba=!1,Ra,Sa,Ta,ka=0,X=null,la,B=null,Ua,ma,Y,E,Ca,Da,Va,u,Wa=Array.prototype.slice,G=!1,z,Ea,Xa,C,Ya,Fa=v.match(/(ipad|iphone|ipod)/i), +F=v.match(/msie/i),gb=v.match(/webkit/i),Ga=v.match(/safari/i)&&!v.match(/chrome/i),qa=v.match(/opera/i),Ha=v.match(/(mobile|pre\/|xoom)/i)||Fa,Ia=!Q.match(/usehtml5audio/i)&&!Q.match(/sm2\-ignorebadua/i)&&Ga&&!v.match(/silk/i)&&v.match(/OS X 10_6_([3-7])/i),Za="undefined"!==typeof console&&"undefined"!==typeof console.log,Ja="undefined"!==typeof i.hasFocus?i.hasFocus():null,na=Ga&&("undefined"===typeof i.hasFocus||!i.hasFocus()),$a=!na,ab=/(mp3|mp4|mpa|m4a|m4b)/i,P=i.location?i.location.protocol.match(/http/i): +null,bb=!P?"http://":"",cb=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,db="mpeg4,aac,flv,mov,mp4,m4v,f4v,m4a,m4b,mp4v,3gp,3g2".split(","),hb=RegExp("\\.("+db.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.useAltURL=!P;this._global_a=null;if(Ha&&(c.useHTML5Audio=!0,c.preferFlash=!1,Fa))G=c.ignoreFlash=!0;this.setup=function(a){var d=!c.url;"undefined"!==typeof a&&m&&B&&c.ok()&&("undefined"!==typeof a.flashVersion|| +"undefined"!==typeof a.url)&&O(p("setupLate"));ua(a);d&&U&&"undefined"!==typeof a.url&&c.beginDelayedInit();!U&&"undefined"!==typeof a.url&&"complete"===i.readyState&&setTimeout(L,1);return c};this.supported=this.ok=function(){return B?m&&!o:c.useHTML5Audio&&c.hasHTML5};this.getMovie=function(c){return A(c)||i[c]||k[c]};this.createSound=function(a,d){function e(){g=ia(g);c.sounds[f.id]=new Ka(f);c.soundIDs.push(f.id);return c.sounds[f.id]}var b,g=null,f=b=null;b="soundManager.createSound(): "+p(!m? +"notReady":"notOK");if(!m||!c.ok())return O(b),!1;"undefined"!==typeof d&&(a={id:a,url:d});g=w(a);g.url=la(g.url);f=g;f.id.toString().charAt(0).match(/^[0-9]$/)&&c._wD("soundManager.createSound(): "+p("badID",f.id),2);c._wD("soundManager.createSound(): "+f.id+" ("+f.url+")",1);if(t(f.id,!0))return c._wD("soundManager.createSound(): "+f.id+" exists",1),c.sounds[f.id];if(ma(f))b=e(),c._wD("Creating sound "+f.id+", using HTML5"),b._setup_html5(f);else{if(8=a)return!1;for(a-=1;0<=a;a--)if(c=y[a],!c.fired&&b.position>=c.position)c.fired=!0,q++,c.method.apply(c.scope,[c.position]);return!0};this._resetOnPosition=function(b){var a,c;a=y.length;if(!a)return!1;for(a-=1;0<=a;a--)if(c=y[a],c.fired&&b<=c.position)c.fired=!1,q--; +return!0};v=function(){var a=b._iO,d=a.from,e=a.to,f,g;g=function(){c._wD(b.id+': "to" time of '+e+" reached.");b.clearOnPosition(e,g);b.stop()};f=function(){c._wD(b.id+': playing "from" '+d);if(null!==e&&!isNaN(e))b.onPosition(e,g)};if(null!==d&&!isNaN(d))a.position=d,a.multiShot=!1,f();return a};k=function(){var a,c=b._iO.onposition;if(c)for(a in c)if(c.hasOwnProperty(a))b.onPosition(parseInt(a,10),c[a])};u=function(){var a,c=b._iO.onposition;if(c)for(a in c)c.hasOwnProperty(a)&&b.clearOnPosition(parseInt(a, +10))};i=function(){b.isHTML5&&Ra(b)};l=function(){b.isHTML5&&Sa(b)};g=function(a){a||(y=[],q=0);m=!1;b._hasTimer=null;b._a=null;b._html5_canplay=!1;b.bytesLoaded=null;b.bytesTotal=null;b.duration=b._iO&&b._iO.duration?b._iO.duration:null;b.durationEstimate=null;b.buffered=[];b.eqData=[];b.eqData.left=[];b.eqData.right=[];b.failures=0;b.isBuffering=!1;b.instanceOptions={};b.instanceCount=0;b.loaded=!1;b.metadata={};b.readyState=0;b.muted=!1;b.paused=!1;b.peakData={left:0,right:0};b.waveformData={left:[], +right:[]};b.playState=0;b.position=null;b.id3={}};g();this._onTimer=function(a){var c,f=!1,g={};if(b._hasTimer||a){if(b._a&&(a||(0opera.version()?new Audio(null):new Audio,e=b._a,e._called_load=!1,G)c._global_a=e;b.isHTML5=!0;b._a=e;e._t=b;f();b._apply_loop(e,a.loops);a.autoLoad||a.autoPlay?b.load():(e.autobuffer=!1,e.preload="auto");return e};f=function(){if(b._a._added_events)return!1;var a;b._a._added_events=!0;for(a in C)C.hasOwnProperty(a)&&b._a&&b._a.addEventListener(a,C[a],!1); +return!0};r=function(){var a;c._wD(s+"removing event listeners: "+b.id);b._a._added_events=!1;for(a in C)C.hasOwnProperty(a)&&b._a&&b._a.removeEventListener(a,C[a],!1)};this._onload=function(a){a=!!a||!b.isHTML5&&8===j&&b.duration;c._wD('SMSound._onload(): "'+b.id+'"'+(a?" loaded.":" failed to load? - "+b.url),a?1:2);!a&&!b.isHTML5&&(!0===c.sandbox.noRemote&&c._wD("SMSound._onload(): "+p("noNet"),1),!0===c.sandbox.noLocal&&c._wD("SMSound._onload(): "+p("noLocal"),1));b.loaded=a;b.readyState=a?3:2; +b._onbufferchange(0);b._iO.onload&&b._iO.onload.apply(b,[a]);return!0};this._onbufferchange=function(a){if(0===b.playState||a&&b.isBuffering||!a&&!b.isBuffering)return!1;b.isBuffering=1===a;b._iO.onbufferchange&&(c._wD("SMSound._onbufferchange(): "+a),b._iO.onbufferchange.apply(b));return!0};this._onsuspend=function(){b._iO.onsuspend&&(c._wD("SMSound._onsuspend()"),b._iO.onsuspend.apply(b));return!0};this._onfailure=function(a,d,e){b.failures++;c._wD('SMSound._onfailure(): "'+b.id+'" count '+b.failures); +if(b._iO.onfailure&&1===b.failures)b._iO.onfailure(b,a,d,e);else c._wD("SMSound._onfailure(): ignoring")};this._onfinish=function(){var a=b._iO.onfinish;b._onbufferchange(0);b._resetOnPosition(0);if(b.instanceCount){b.instanceCount--;if(!b.instanceCount&&(u(),b.playState=0,b.paused=!1,b.instanceCount=0,b.instanceOptions={},b._iO={},l(),b.isHTML5))b.position=0;if((!b.instanceCount||b._iO.multiShotEvents)&&a)c._wD('SMSound._onfinish(): "'+b.id+'"'),a.apply(b)}};this._whileloading=function(a,c,d,e){var f= +b._iO;b.bytesLoaded=a;b.bytesTotal=c;b.duration=Math.floor(d);b.bufferLength=e;b.durationEstimate=!b.isHTML5&&!f.isMovieStar?f.duration?b.duration>f.duration?b.duration:f.duration:parseInt(b.bytesTotal/b.bytesLoaded*b.duration,10):b.duration;if(!b.isHTML5)b.buffered=[{start:0,end:b.duration}];(3!==b.readyState||b.isHTML5)&&f.whileloading&&f.whileloading.apply(b)};this._whileplaying=function(a,c,d,e,f){var g=b._iO;if(isNaN(a)||null===a)return!1;b.position=Math.max(0,a);b._processOnPosition();if(!b.isHTML5&& +8opera.version()?new Audio(null): +new Audio:null,e,b,g={},f;f=c.audioFormats;for(e in f)if(f.hasOwnProperty(e)&&(b="audio/"+e,g[e]=a(f[e].type),g[b]=g[e],e.match(ab)?(c.flash[e]=!0,c.flash[b]=!0):(c.flash[e]=!1,c.flash[b]=!1),f[e]&&f[e].related))for(b=f[e].related.length-1;0<=b;b--)g["audio/"+f[e].related[b]]=g[e],c.html5[f[e].related[b]]=g[e],c.flash[f[e].related[b]]=g[e];g.canPlayType=d?a:null;c.html5=w(c.html5,g);return!0};da={notReady:"Not loaded yet - wait for soundManager.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 ("+i.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 SWF to load with window focus...",waitImpatient:"soundManager: Getting impatient, still waiting for Flash%s...",waitForever:"soundManager: Waiting indefinitely for Flash (will recover if unblocked)...",waitSWF:"soundManager: Retrying, waiting for 100% SWF load...",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",init:"soundManager::init()",didInit:"soundManager::init(): Already called?",flashJS:"soundManager: Attempting JS to Flash call...",secNote:"Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html", +badRemove:"Warning: Failed to remove flash movie.",shutdown:"soundManager.disable(): Shutting down",queue:"soundManager: Queueing %s handler",smFail:"soundManager: Failed to initialise.",smError:"SMSound.load(): Exception: JS-Flash communication failed, or JS error.",fbTimeout:"No flash response, applying .swf_timedout CSS...",fbLoaded:"Flash loaded",fbHandler:"soundManager::flashBlockHandler()",manURL:"SMSound.load(): Using manually-assigned URL",onURL:"soundManager.load(): current URL already assigned.", +badFV:'soundManager.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.',as2loop:"Note: Setting stream:false so looping can work (flash 8 limitation)",noNSLoop:"Note: Looping not implemented for MovieStar formats",needfl9:"Note: Switching to flash 9, required for MP4 formats.",mfTimeout:"Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case",needFlash:"soundManager: Fatal error: Flash is needed to play some required formats, but is not available.",gotFocus:"soundManager: Got window focus.", +mfOn:"mobileFlash::enabling on-screen flash repositioning",policy:"Enabling usePolicyFile for data access",setup:"soundManager.setup(): allowed parameters: %s",setupError:'soundManager.setup(): "%s" cannot be assigned with this method.',setupUndef:'soundManager.setup(): Could not find option "%s"',setupLate:"soundManager.setup(): url + flashVersion changes will not take effect until reboot().",h5a:"creating HTML5 Audio() object",noURL:"soundManager: Flash URL required. Call soundManager.setup({url:...}) to get started."}; +p=function(){var a=Wa.call(arguments),c=a.shift(),c=da&&da[c]?da[c]:"",e,b;if(c&&a&&a.length)for(e=0,b=a.length;ej)c._wD(p("needfl9")),c.flashVersion=j=9;c.version=c.versionNumber+(c.html5Only?" (HTML5-only mode)":9===j?" (AS3/Flash 9)":" (AS2/Flash 8)");8'}if(R&&S)return!1;if(c.html5Only)return wa(),e(),c.oMC=A(c.movieID),sa(),S=R=!0,!1;var g=d||c.url,f=c.altURL||g,h=fa(),l=N(),k=null,k=i.getElementsByTagName("html")[0],j,o,m,k=k&&k.dir&&k.dir.match(/rtl/i),a="undefined"===typeof a?c.id:a;wa();c.url=Pa(P?g:f);d=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode;if(null!== +c.wmode&&(v.match(/msie 8/i)||!F&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))n("spcWmode"),c.wmode=null;h={name:a,id:a,src:d,quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:bb+"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(F)g=i.createElement("div"),o=['',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):"",""].join("");else for(j in g=i.createElement("embed"),h)h.hasOwnProperty(j)&&g.setAttribute(j, +h[j]);ya();l=N();if(h=fa())if(c.oMC=A(c.movieID)||i.createElement("div"),c.oMC.id){m=c.oMC.className;c.oMC.className=(m?m+" ":"movieContainer")+(l?" "+l:"");c.oMC.appendChild(g);if(F)j=c.oMC.appendChild(i.createElement("div")),j.className="sm2-object-box",j.innerHTML=o;S=!0}else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+l;j=l=null;if(!c.useFlashBlock)if(c.useHighPerformance)l={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(l={position:"absolute", +width:"6px",height:"6px",top:"-9999px",left:"-9999px"},k)l.left=Math.abs(parseInt(l.left,10))+"px";if(gb)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(m in l)l.hasOwnProperty(m)&&(c.oMC.style[m]=l[m]);try{F||c.oMC.appendChild(g);h.appendChild(c.oMC);if(F)j=c.oMC.appendChild(i.createElement("div")),j.className="sm2-object-box",j.innerHTML=o;S=!0}catch(q){throw Error(p("domError")+" \n"+q.toString());}}R=!0;e();c._wD("soundManager::createMovie(): Trying to load "+d+(!P&&c.altURL?" (alternate URL)":""), +1);return!0};ea=function(){if(c.html5Only)return ga(),!1;if(h)return!1;if(!c.url)return n("noURL"),!1;h=c.getMovie(c.id);if(!h)V?(F?c.oMC.innerHTML=za:c.oMC.appendChild(V),V=null,R=!0):ga(c.id,c.url),h=c.getMovie(c.id);h&&n("waitEI");"function"===typeof c.oninitmovie&&setTimeout(c.oninitmovie,1);return!0};K=function(){setTimeout(Ma,1E3)};Ma=function(){var a,d=!1;if(!c.url||W)return!1;W=!0;u.remove(k,"load",K);if(na&&!Ja)return n("waitFocus"),!1;m||(a=c.getMoviePercent(),c._wD(p("waitImpatient",0< +a?" (SWF "+a+"% loaded)":"")),0a&&(d=!0));setTimeout(function(){a=c.getMoviePercent();if(d)return W=!1,c._wD(p("waitSWF")),k.setTimeout(K,1),!1;m||(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?" "+p("checkSWF"):""),2),!P&&a&&(n("localFail",2),c.debugFlash||n("tryDebug",2)),0===a&&c._wD(p("swf404",c.url)),x("flashtojs", +!1,": Timed out"+P?" (Check flash security or flash blockers)":" (No plugin/missing SWF?)"));!m&&$a&&(null===a?c.useFlashBlock||0===c.flashLoadTimeout?(c.useFlashBlock&&Aa(),n("waitForever")):ha(!0):0===c.flashLoadTimeout?n("waitForever"):ha(!0))},c.flashLoadTimeout)};ca=function(){if(Ja||!na)return u.remove(k,"focus",ca),!0;Ja=$a=!0;n("gotFocus");W=!1;K();u.remove(k,"focus",ca);return!0};Ya=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]&&z&&c.flash[a]?" (using flash)":c.preferFlash&&c.flash[a]&&z?" (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)}};T=function(a){if(m)return!1;if(c.html5Only)return c._wD("-- SoundManager 2: loaded --"),m=!0,J(),x("onload",!0),!0;var d=!0,e;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())m=!0,o&&(e= +{type:!z&&B?"NO_FLASH":"INIT_TIMEOUT"});c._wD("-- SoundManager 2 "+(o?"failed to load":"loaded")+" ("+(o?"Flash security/load error":"OK")+") --",1);if(o||a){if(c.useFlashBlock&&c.oMC)c.oMC.className=N()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error");I({type:"ontimeout",error:e,ignoreInit:!0});x("onload",!1);M(e);d=!1}else x("onload",!0);o||(c.waitForWindowLoad&&!ba?(n("waitOnload"),u.add(k,"load",J)):(c.waitForWindowLoad&&ba&&n("docLoaded"),J()));return d};La=function(){var a,d=c.setupOptions; +for(a in d)d.hasOwnProperty(a)&&("undefined"===typeof c[a]?c[a]=d[a]:c[a]!==d[a]&&(c.setupOptions[a]=c[a]))};sa=function(){n("init");if(m)return n("didInit"),!1;if(c.html5Only){if(!m)u.remove(k,"load",c.beginDelayedInit),c.enabled=!0,T();return!0}ea();try{n("flashJS"),h._externalInterfaceTest(!1),Na(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||h._disableDebug(),c.enabled=!0,x("jstoflash",!0),c.html5Only||u.add(k,"unload",ra)}catch(a){return c._wD("js/flash exception: "+a.toString()), +x("jstoflash",!1),M({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),ha(!0),T(),!1}T();u.remove(k,"load",c.beginDelayedInit);return!0};L=function(){if(U)return!1;U=!0;La();ya();var a=null,a=null,d="undefined"!==typeof console&&"function"===typeof console.log,e=Q.toLowerCase();-1!==e.indexOf("sm2-usehtml5audio=")&&(a="1"===e.charAt(e.indexOf("sm2-usehtml5audio=")+18),d&&console.log((a?"Enabling ":"Disabling ")+"useHTML5Audio via URL parameter"),c.setup({useHTML5Audio:a}));-1!==e.indexOf("sm2-preferflash=")&& +(a="1"===e.charAt(e.indexOf("sm2-preferflash=")+16),d&&console.log((a?"Enabling ":"Disabling ")+"preferFlash via URL parameter"),c.setup({preferFlash:a}));!z&&c.hasHTML5&&(c._wD("SoundManager: No Flash detected"+(!c.useHTML5Audio?", enabling HTML5.":". Trying HTML5-only mode.")),c.setup({useHTML5Audio:!0,preferFlash:!1}));Va();c.html5.usingFlash=Ua();B=c.html5.usingFlash;Ya();!z&&B&&(n("needFlash"),c.setup({flashLoadTimeout:1}));i.removeEventListener&&i.removeEventListener("DOMContentLoaded",L,!1); +ea();return!0};Da=function(){"complete"===i.readyState&&(L(),i.detachEvent("onreadystatechange",Da));return!0};xa=function(){ba=!0;u.remove(k,"load",xa)};Ea();u.add(k,"focus",ca);u.add(k,"load",K);u.add(k,"load",xa);i.addEventListener?i.addEventListener("DOMContentLoaded",L,!1):i.attachEvent?i.attachEvent("onreadystatechange",Da):(x("onload",!1),M({type:"NO_DOM2_EVENTS",fatal:!0}))}var oa=null;if("undefined"===typeof SM2_DEFER||!SM2_DEFER)oa=new $;Z.SoundManager=$;Z.soundManager=oa})(window); \ No newline at end of file diff --git a/timeside/static/timeside/js/libs/soundmanager2-nodebug-jsmin.js b/timeside/static/timeside/js/libs/soundmanager2-nodebug-jsmin.js new file mode 100755 index 0000000..ca2fc0e --- /dev/null +++ b/timeside/static/timeside/js/libs/soundmanager2-nodebug-jsmin.js @@ -0,0 +1,80 @@ +/** @license + * + * SoundManager 2: JavaScript Sound for the Web + * ---------------------------------------------- + * http://schillmania.com/projects/soundmanager2/ + * + * Copyright (c) 2007, Scott Schiller. All rights reserved. + * Code provided under the BSD License: + * http://schillmania.com/projects/soundmanager2/license.txt + * + * V2.97a.20120916 + */ +(function(fa){function R(R,ea){function S(a){return c.preferFlash&&y&&!c.ignoreFlash&&"undefined"!==typeof c.flash[a]&&c.flash[a]}function l(a){return function(c){var d=this._t;return!d||!d._a?null:a.call(this,c)}}this.setupOptions={url:R||null,flashVersion:8,debugMode:!0,debugFlash:!1,useConsole:!0,consoleOnly:!0,waitForWindowLoad:!1,bgColor:"#ffffff",useHighPerformance:!1,flashPollingInterval:null,html5PollingInterval:null,flashLoadTimeout:1E3,wmode:null,allowScriptAccess:"always",useFlashBlock:!1, +useHTML5Audio:!0,html5Test:/^(probably|maybe)$/i,preferFlash:!0,noSWFCache:!1};this.defaultOptions={autoLoad:!1,autoPlay:!1,from:null,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onposition:null,onstop:null,onfailure:null,onfinish:null,multiShot:!0,multiShotEvents:!1,position:null,pan:0,stream:!0,to:null,type:null,usePolicyFile:!1,volume:100};this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1,useEQData:!1,onbufferchange:null, +ondataerror:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null};this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a","m4b"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!1},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"], +required:!1}};this.movieID="sm2-container";this.id=ea||"sm2movie";this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.versionNumber="V2.97a.20120916";this.altURL=this.movieURL=this.version=null;this.enabled=this.swfLoaded=!1;this.oMC=null;this.sounds={};this.soundIDs=[];this.didFlashBlock=this.muted=!1;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1};this.sandbox= +{};var ga;try{ga="undefined"!==typeof Audio&&"undefined"!==typeof(ha&&10>opera.version()?new Audio(null):new Audio).canPlayType}catch(Za){ga=!1}this.hasHTML5=ga;this.html5={usingFlash:null};this.flash={};this.ignoreFlash=this.html5Only=!1;var Da,c=this,i=null,T,q=navigator.userAgent,h=fa,ia=h.location.href.toString(),m=document,ja,Ea,ka,j,v=[],J=!1,K=!1,k=!1,s=!1,la=!1,L,r,ma,U,na,B,C,D,Fa,oa,V,W,E,pa,M,qa,X,F,Ga,ra,Ha,Y,Ia,N=null,sa=null,t,ta,G,Z,$,H,p,O=!1,ua=!1,Ja,Ka,La,aa=0,P=null,ba,n=null,Ma, +ca,Q,w,va,wa,Na,o,Wa=Array.prototype.slice,z=!1,y,xa,Oa,u,Pa,ya=q.match(/(ipad|iphone|ipod)/i),x=q.match(/msie/i),Xa=q.match(/webkit/i),za=q.match(/safari/i)&&!q.match(/chrome/i),ha=q.match(/opera/i),Aa=q.match(/(mobile|pre\/|xoom)/i)||ya,Qa=!ia.match(/usehtml5audio/i)&&!ia.match(/sm2\-ignorebadua/i)&&za&&!q.match(/silk/i)&&q.match(/OS X 10_6_([3-7])/i),Ba="undefined"!==typeof m.hasFocus?m.hasFocus():null,da=za&&("undefined"===typeof m.hasFocus||!m.hasFocus()),Ra=!da,Sa=/(mp3|mp4|mpa|m4a|m4b)/i,Ca= +m.location?m.location.protocol.match(/http/i):null,Ta=!Ca?"http://":"",Ua=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,Va="mpeg4,aac,flv,mov,mp4,m4v,f4v,m4a,m4b,mp4v,3gp,3g2".split(","),Ya=RegExp("\\.("+Va.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.useAltURL=!Ca;this._global_a=null;if(Aa&&(c.useHTML5Audio=!0,c.preferFlash=!1,ya))z=c.ignoreFlash=!0;this.setup=function(a){var e=!c.url;"undefined"!==typeof a&& +k&&n&&c.ok()&&("undefined"!==typeof a.flashVersion||"undefined"!==typeof a.url)&&H(t("setupLate"));ma(a);e&&M&&"undefined"!==typeof a.url&&c.beginDelayedInit();!M&&"undefined"!==typeof a.url&&"complete"===m.readyState&&setTimeout(E,1);return c};this.supported=this.ok=function(){return n?k&&!s:c.useHTML5Audio&&c.hasHTML5};this.getMovie=function(a){return T(a)||m[a]||h[a]};this.createSound=function(a,e){function d(){b=Z(b);c.sounds[f.id]=new Da(f);c.soundIDs.push(f.id);return c.sounds[f.id]}var b=null, +g=null,f=null;if(!k||!c.ok())return H(void 0),!1;"undefined"!==typeof e&&(a={id:a,url:e});b=r(a);b.url=ba(b.url);f=b;if(p(f.id,!0))return c.sounds[f.id];if(ca(f))g=d(),g._setup_html5(f);else{if(8=a)return!1;for(a-=1;0<=a;a--)if(c=k[a],!c.fired&&b.position>=c.position)c.fired=!0,o++,c.method.apply(c.scope,[c.position]);return!0};this._resetOnPosition=function(b){var a,c;a=k.length;if(!a)return!1;for(a-=1;0<=a;a--)if(c=k[a],c.fired&&b<=c.position)c.fired=!1,o--;return!0};s=function(){var a=b._iO,c=a.from,e=a.to,d,f;f=function(){b.clearOnPosition(e, +f);b.stop()};d=function(){if(null!==e&&!isNaN(e))b.onPosition(e,f)};if(null!==c&&!isNaN(c))a.position=c,a.multiShot=!1,d();return a};m=function(){var a,c=b._iO.onposition;if(c)for(a in c)if(c.hasOwnProperty(a))b.onPosition(parseInt(a,10),c[a])};q=function(){var a,c=b._iO.onposition;if(c)for(a in c)c.hasOwnProperty(a)&&b.clearOnPosition(parseInt(a,10))};h=function(){b.isHTML5&&Ja(b)};I=function(){b.isHTML5&&Ka(b)};g=function(a){a||(k=[],o=0);l=!1;b._hasTimer=null;b._a=null;b._html5_canplay=!1;b.bytesLoaded= +null;b.bytesTotal=null;b.duration=b._iO&&b._iO.duration?b._iO.duration:null;b.durationEstimate=null;b.buffered=[];b.eqData=[];b.eqData.left=[];b.eqData.right=[];b.failures=0;b.isBuffering=!1;b.instanceOptions={};b.instanceCount=0;b.loaded=!1;b.metadata={};b.readyState=0;b.muted=!1;b.paused=!1;b.peakData={left:0,right:0};b.waveformData={left:[],right:[]};b.playState=0;b.position=null;b.id3={}};g();this._onTimer=function(a){var c,f=!1,g={};if(b._hasTimer||a){if(b._a&&(a||(0opera.version()?new Audio(null):new Audio,d=b._a,d._called_load=!1,z)c._global_a=d;b.isHTML5=!0;b._a=d;d._t=b;f();b._apply_loop(d,a.loops);a.autoLoad||a.autoPlay? +b.load():(d.autobuffer=!1,d.preload="auto");return d};f=function(){if(b._a._added_events)return!1;var a;b._a._added_events=!0;for(a in u)u.hasOwnProperty(a)&&b._a&&b._a.addEventListener(a,u[a],!1);return!0};A=function(){var a;b._a._added_events=!1;for(a in u)u.hasOwnProperty(a)&&b._a&&b._a.removeEventListener(a,u[a],!1)};this._onload=function(a){a=!!a||!b.isHTML5&&8===j&&b.duration;b.loaded=a;b.readyState=a?3:2;b._onbufferchange(0);b._iO.onload&&b._iO.onload.apply(b,[a]);return!0};this._onbufferchange= +function(a){if(0===b.playState||a&&b.isBuffering||!a&&!b.isBuffering)return!1;b.isBuffering=1===a;b._iO.onbufferchange&&b._iO.onbufferchange.apply(b);return!0};this._onsuspend=function(){b._iO.onsuspend&&b._iO.onsuspend.apply(b);return!0};this._onfailure=function(a,c,e){b.failures++;if(b._iO.onfailure&&1===b.failures)b._iO.onfailure(b,a,c,e)};this._onfinish=function(){var a=b._iO.onfinish;b._onbufferchange(0);b._resetOnPosition(0);if(b.instanceCount){b.instanceCount--;if(!b.instanceCount&&(q(),b.playState= +0,b.paused=!1,b.instanceCount=0,b.instanceOptions={},b._iO={},I(),b.isHTML5))b.position=0;(!b.instanceCount||b._iO.multiShotEvents)&&a&&a.apply(b)}};this._whileloading=function(a,c,e,d){var f=b._iO;b.bytesLoaded=a;b.bytesTotal=c;b.duration=Math.floor(e);b.bufferLength=d;b.durationEstimate=!b.isHTML5&&!f.isMovieStar?f.duration?b.duration>f.duration?b.duration:f.duration:parseInt(b.bytesTotal/b.bytesLoaded*b.duration,10):b.duration;if(!b.isHTML5)b.buffered=[{start:0,end:b.duration}];(3!==b.readyState|| +b.isHTML5)&&f.whileloading&&f.whileloading.apply(b)};this._whileplaying=function(a,c,e,d,f){var g=b._iO;if(isNaN(a)||null===a)return!1;b.position=Math.max(0,a);b._processOnPosition();if(!b.isHTML5&&8opera.version()?new Audio(null):new Audio:null,d,b,g={},f;f=c.audioFormats;for(d in f)if(f.hasOwnProperty(d)&&(b="audio/"+d,g[d]=a(f[d].type),g[b]=g[d],d.match(Sa)?(c.flash[d]=!0,c.flash[b]=!0):(c.flash[d]=!1,c.flash[b]=!1),f[d]&&f[d].related))for(b=f[d].related.length- +1;0<=b;b--)g["audio/"+f[d].related[b]]=g[d],c.html5[f[d].related[b]]=g[d],c.flash[f[d].related[b]]=g[d];g.canPlayType=e?a:null;c.html5=r(c.html5,g);return!0};t=function(){};Z=function(a){if(8===j&&1j)c.flashVersion=j=9;c.version=c.versionNumber+(c.html5Only?" (HTML5-only mode)":9===j?" (AS3/Flash 9)":" (AS2/Flash 8)");8'}if(J&&K)return!1;if(c.html5Only)return oa(),c.oMC=T(c.movieID),ka(),K=J=!0,!1;var b=e||c.url,g=c.altURL||b,f=qa(),h=G(),i=null,i=m.getElementsByTagName("html")[0],j,k,l,i=i&&i.dir&&i.dir.match(/rtl/i),a="undefined"===typeof a?c.id:a;oa();c.url=Ia(Ca?b:g);e=c.url;c.wmode=!c.wmode&&c.useHighPerformance?"transparent":c.wmode;if(null!==c.wmode&&(q.match(/msie 8/i)||!x&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))c.wmode= +null;f={name:a,id:a,src:e,quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:Ta+"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)f.FlashVars="debug=1";c.wmode||delete f.wmode;if(x)b=m.createElement("div"),k=['',d("movie",e),d("AllowScriptAccess",c.allowScriptAccess),d("quality",f.quality),c.wmode?d("wmode",c.wmode):"",d("bgcolor",c.bgColor),d("hasPriority","true"),c.debugFlash?d("FlashVars",f.FlashVars):"",""].join("");else for(j in b=m.createElement("embed"),f)f.hasOwnProperty(j)&&b.setAttribute(j,f[j]);ra();h=G();if(f=qa())if(c.oMC=T(c.movieID)||m.createElement("div"),c.oMC.id){l=c.oMC.className;c.oMC.className= +(l?l+" ":"movieContainer")+(h?" "+h:"");c.oMC.appendChild(b);if(x)j=c.oMC.appendChild(m.createElement("div")),j.className="sm2-object-box",j.innerHTML=k;K=!0}else{c.oMC.id=c.movieID;c.oMC.className="movieContainer "+h;j=h=null;if(!c.useFlashBlock)if(c.useHighPerformance)h={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(h={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},i)h.left=Math.abs(parseInt(h.left,10))+"px";if(Xa)c.oMC.style.zIndex= +1E4;if(!c.debugFlash)for(l in h)h.hasOwnProperty(l)&&(c.oMC.style[l]=h[l]);try{x||c.oMC.appendChild(b);f.appendChild(c.oMC);if(x)j=c.oMC.appendChild(m.createElement("div")),j.className="sm2-object-box",j.innerHTML=k;K=!0}catch(n){throw Error(t("domError")+" \n"+n.toString());}}return J=!0};W=function(){if(c.html5Only)return X(),!1;if(i||!c.url)return!1;i=c.getMovie(c.id);if(!i)N?(x?c.oMC.innerHTML=sa:c.oMC.appendChild(N),N=null,J=!0):X(c.id,c.url),i=c.getMovie(c.id);"function"===typeof c.oninitmovie&& +setTimeout(c.oninitmovie,1);return!0};D=function(){setTimeout(Fa,1E3)};Fa=function(){var a,e=!1;if(!c.url||O)return!1;O=!0;o.remove(h,"load",D);if(da&&!Ba)return!1;k||(a=c.getMoviePercent(),0a&&(e=!0));setTimeout(function(){a=c.getMoviePercent();if(e)return O=!1,h.setTimeout(D,1),!1;!k&&Ra&&(null===a?c.useFlashBlock||0===c.flashLoadTimeout?c.useFlashBlock&&ta():Y(!0):0!==c.flashLoadTimeout&&Y(!0))},c.flashLoadTimeout)};V=function(){if(Ba||!da)return o.remove(h,"focus",V),!0;Ba=Ra=!0;O=!1; +D();o.remove(h,"focus",V);return!0};Pa=function(){};L=function(a){if(k)return!1;if(c.html5Only)return k=!0,C(),!0;var e=!0,d;if(!c.useFlashBlock||!c.flashLoadTimeout||c.getMoviePercent())k=!0,s&&(d={type:!y&&n?"NO_FLASH":"INIT_TIMEOUT"});if(s||a){if(c.useFlashBlock&&c.oMC)c.oMC.className=G()+" "+(null===c.getMoviePercent()?"swf_timedout":"swf_error");B({type:"ontimeout",error:d,ignoreInit:!0});F(d);e=!1}s||(c.waitForWindowLoad&&!la?o.add(h,"load",C):C());return e};Ea=function(){var a,e=c.setupOptions; +for(a in e)e.hasOwnProperty(a)&&("undefined"===typeof c[a]?c[a]=e[a]:c[a]!==e[a]&&(c.setupOptions[a]=c[a]))};ka=function(){if(k)return!1;if(c.html5Only){if(!k)o.remove(h,"load",c.beginDelayedInit),c.enabled=!0,L();return!0}W();try{i._externalInterfaceTest(!1),Ga(!0,c.flashPollingInterval||(c.useHighPerformance?10:50)),c.debugMode||i._disableDebug(),c.enabled=!0,c.html5Only||o.add(h,"unload",ja)}catch(a){return F({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),Y(!0),L(),!1}L();o.remove(h,"load",c.beginDelayedInit); +return!0};E=function(){if(M)return!1;M=!0;Ea();ra();!y&&c.hasHTML5&&c.setup({useHTML5Audio:!0,preferFlash:!1});Na();c.html5.usingFlash=Ma();n=c.html5.usingFlash;Pa();!y&&n&&c.setup({flashLoadTimeout:1});m.removeEventListener&&m.removeEventListener("DOMContentLoaded",E,!1);W();return!0};wa=function(){"complete"===m.readyState&&(E(),m.detachEvent("onreadystatechange",wa));return!0};pa=function(){la=!0;o.remove(h,"load",pa)};xa();o.add(h,"focus",V);o.add(h,"load",D);o.add(h,"load",pa);m.addEventListener? +m.addEventListener("DOMContentLoaded",E,!1):m.attachEvent?m.attachEvent("onreadystatechange",wa):F({type:"NO_DOM2_EVENTS",fatal:!0})}var ea=null;if("undefined"===typeof SM2_DEFER||!SM2_DEFER)ea=new R;fa.SoundManager=R;fa.soundManager=ea})(window); \ No newline at end of file diff --git a/timeside/static/timeside/js/libs/soundmanager2-nodebug.js b/timeside/static/timeside/js/libs/soundmanager2-nodebug.js new file mode 100755 index 0000000..856175b --- /dev/null +++ b/timeside/static/timeside/js/libs/soundmanager2-nodebug.js @@ -0,0 +1,2511 @@ +/** @license + * + * SoundManager 2: JavaScript Sound for the Web + * ---------------------------------------------- + * http://schillmania.com/projects/soundmanager2/ + * + * Copyright (c) 2007, Scott Schiller. All rights reserved. + * Code provided under the BSD License: + * http://schillmania.com/projects/soundmanager2/license.txt + * + * V2.97a.20120916 + */ + +/*global window, SM2_DEFER, sm2Debugger, console, document, navigator, setTimeout, setInterval, clearInterval, Audio */ +/*jslint regexp: true, sloppy: true, white: true, nomen: true, plusplus: true */ + +(function(window) { +var soundManager = null; +function SoundManager(smURL, smID) { + this.setupOptions = { + 'url': (smURL || null), + 'flashVersion': 8, + 'debugMode': true, + 'debugFlash': false, + 'useConsole': true, + 'consoleOnly': true, + 'waitForWindowLoad': false, + 'bgColor': '#ffffff', + 'useHighPerformance': false, + 'flashPollingInterval': null, + 'html5PollingInterval': null, + 'flashLoadTimeout': 1000, + 'wmode': null, + 'allowScriptAccess': 'always', + 'useFlashBlock': false, + 'useHTML5Audio': true, + 'html5Test': /^(probably|maybe)$/i, + 'preferFlash': true, + 'noSWFCache': false + }; + this.defaultOptions = { + 'autoLoad': false, + 'autoPlay': false, + 'from': null, + 'loops': 1, + 'onid3': null, + 'onload': null, + 'whileloading': null, + 'onplay': null, + 'onpause': null, + 'onresume': null, + 'whileplaying': null, + 'onposition': null, + 'onstop': null, + 'onfailure': null, + 'onfinish': null, + 'multiShot': true, + 'multiShotEvents': false, + 'position': null, + 'pan': 0, + 'stream': true, + 'to': null, + 'type': null, + 'usePolicyFile': false, + 'volume': 100 + }; + this.flash9Options = { + 'isMovieStar': null, + 'usePeakData': false, + 'useWaveformData': false, + 'useEQData': false, + 'onbufferchange': null, + 'ondataerror': null + }; + this.movieStarOptions = { + 'bufferTime': 3, + 'serverURL': null, + 'onconnect': null, + 'duration': null + }; + this.audioFormats = { + 'mp3': { + 'type': ['audio/mpeg; codecs="mp3"', 'audio/mpeg', 'audio/mp3', 'audio/MPA', 'audio/mpa-robust'], + 'required': true + }, + 'mp4': { + 'related': ['aac','m4a','m4b'], + 'type': ['audio/mp4; codecs="mp4a.40.2"', 'audio/aac', 'audio/x-m4a', 'audio/MP4A-LATM', 'audio/mpeg4-generic'], + 'required': false + }, + 'ogg': { + 'type': ['audio/ogg; codecs=vorbis'], + 'required': false + }, + 'wav': { + 'type': ['audio/wav; codecs="1"', 'audio/wav', 'audio/wave', 'audio/x-wav'], + 'required': false + } + }; + this.movieID = 'sm2-container'; + this.id = (smID || 'sm2movie'); + this.debugID = 'soundmanager-debug'; + this.debugURLParam = /([#?&])debug=1/i; + this.versionNumber = 'V2.97a.20120916'; + this.version = null; + this.movieURL = null; + this.altURL = null; + this.swfLoaded = false; + this.enabled = false; + this.oMC = null; + this.sounds = {}; + this.soundIDs = []; + this.muted = false; + this.didFlashBlock = false; + this.filePattern = null; + this.filePatterns = { + 'flash8': /\.mp3(\?.*)?$/i, + 'flash9': /\.mp3(\?.*)?$/i + }; + this.features = { + 'buffering': false, + 'peakData': false, + 'waveformData': false, + 'eqData': false, + 'movieStar': false + }; + this.sandbox = { + }; + this.hasHTML5 = (function() { + try { + return (typeof Audio !== 'undefined' && typeof (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()).canPlayType !== 'undefined'); + } catch(e) { + return false; + } + }()); + this.html5 = { + 'usingFlash': null + }; + this.flash = {}; + this.html5Only = false; + this.ignoreFlash = false; + var SMSound, + _s = this, _flash = null, _sm = 'soundManager', _smc = _sm+'::', _h5 = 'HTML5::', _id, _ua = navigator.userAgent, _win = window, _wl = _win.location.href.toString(), _doc = document, _doNothing, _setProperties, _init, _fV, _on_queue = [], _debugOpen = true, _debugTS, _didAppend = false, _appendSuccess = false, _didInit = false, _disabled = false, _windowLoaded = false, _wDS, _wdCount = 0, _initComplete, _mixin, _assign, _extraOptions, _addOnEvent, _processOnEvents, _initUserOnload, _delayWaitForEI, _waitForEI, _setVersionInfo, _handleFocus, _strings, _initMovie, _domContentLoaded, _winOnLoad, _didDCLoaded, _getDocument, _createMovie, _catchError, _setPolling, _initDebug, _debugLevels = ['log', 'info', 'warn', 'error'], _defaultFlashVersion = 8, _disableObject, _failSafely, _normalizeMovieURL, _oRemoved = null, _oRemovedHTML = null, _str, _flashBlockHandler, _getSWFCSS, _swfCSS, _toggleDebug, _loopFix, _policyFix, _complain, _idCheck, _waitingForEI = false, _initPending = false, _startTimer, _stopTimer, _timerExecute, _h5TimerCount = 0, _h5IntervalTimer = null, _parseURL, + _needsFlash = null, _featureCheck, _html5OK, _html5CanPlay, _html5Ext, _html5Unload, _domContentLoadedIE, _testHTML5, _event, _slice = Array.prototype.slice, _useGlobalHTML5Audio = false, _hasFlash, _detectFlash, _badSafariFix, _html5_events, _showSupport, + _is_iDevice = _ua.match(/(ipad|iphone|ipod)/i), _isIE = _ua.match(/msie/i), _isWebkit = _ua.match(/webkit/i), _isSafari = (_ua.match(/safari/i) && !_ua.match(/chrome/i)), _isOpera = (_ua.match(/opera/i)), + _mobileHTML5 = (_ua.match(/(mobile|pre\/|xoom)/i) || _is_iDevice), + _isBadSafari = (!_wl.match(/usehtml5audio/i) && !_wl.match(/sm2\-ignorebadua/i) && _isSafari && !_ua.match(/silk/i) && _ua.match(/OS X 10_6_([3-7])/i)), + _hasConsole = (typeof console !== 'undefined' && typeof console.log !== 'undefined'), _isFocused = (typeof _doc.hasFocus !== 'undefined'?_doc.hasFocus():null), _tryInitOnFocus = (_isSafari && (typeof _doc.hasFocus === 'undefined' || !_doc.hasFocus())), _okToDisable = !_tryInitOnFocus, _flashMIME = /(mp3|mp4|mpa|m4a|m4b)/i, + _emptyURL = 'about:blank', + _overHTTP = (_doc.location?_doc.location.protocol.match(/http/i):null), + _http = (!_overHTTP ? 'http:/'+'/' : ''), + _netStreamMimeTypes = /^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i, + _netStreamTypes = ['mpeg4', 'aac', 'flv', 'mov', 'mp4', 'm4v', 'f4v', 'm4a', 'm4b', 'mp4v', '3gp', '3g2'], + _netStreamPattern = new RegExp('\\.(' + _netStreamTypes.join('|') + ')(\\?.*)?$', 'i'); + this.mimePattern = /^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i; + this.useAltURL = !_overHTTP; + this._global_a = null; + _swfCSS = { + 'swfBox': 'sm2-object-box', + 'swfDefault': 'movieContainer', + 'swfError': 'swf_error', + 'swfTimedout': 'swf_timedout', + 'swfLoaded': 'swf_loaded', + 'swfUnblocked': 'swf_unblocked', + 'sm2Debug': 'sm2_debug', + 'highPerf': 'high_performance', + 'flashDebug': 'flash_debug' + }; + if (_mobileHTML5) { + _s.useHTML5Audio = true; + _s.preferFlash = false; + if (_is_iDevice) { + _s.ignoreFlash = true; + _useGlobalHTML5Audio = true; + } + } + this.setup = function(options) { + var noURL = (!_s.url); + if (typeof options !== 'undefined' && _didInit && _needsFlash && _s.ok() && (typeof options.flashVersion !== 'undefined' || typeof options.url !== 'undefined')) { + _complain(_str('setupLate')); + } + _assign(options); + if (noURL && _didDCLoaded && typeof options.url !== 'undefined') { + _s.beginDelayedInit(); + } + if (!_didDCLoaded && typeof options.url !== 'undefined' && _doc.readyState === 'complete') { + setTimeout(_domContentLoaded, 1); + } + return _s; + }; + this.ok = function() { + return (_needsFlash?(_didInit && !_disabled):(_s.useHTML5Audio && _s.hasHTML5)); + }; + this.supported = this.ok; + this.getMovie = function(smID) { + return _id(smID) || _doc[smID] || _win[smID]; + }; + this.createSound = function(oOptions, _url) { + var _cs, _cs_string, thisOptions = null, oSound = null, _tO = null; + if (!_didInit || !_s.ok()) { + _complain(_cs_string); + return false; + } + if (typeof _url !== 'undefined') { + oOptions = { + 'id': oOptions, + 'url': _url + }; + } + thisOptions = _mixin(oOptions); + thisOptions.url = _parseURL(thisOptions.url); + _tO = thisOptions; + if (_idCheck(_tO.id, true)) { + return _s.sounds[_tO.id]; + } + function make() { + thisOptions = _loopFix(thisOptions); + _s.sounds[_tO.id] = new SMSound(_tO); + _s.soundIDs.push(_tO.id); + return _s.sounds[_tO.id]; + } + if (_html5OK(_tO)) { + oSound = make(); + oSound._setup_html5(_tO); + } else { + if (_fV > 8) { + if (_tO.isMovieStar === null) { + _tO.isMovieStar = !!(_tO.serverURL || (_tO.type ? _tO.type.match(_netStreamMimeTypes) : false) || _tO.url.match(_netStreamPattern)); + } + } + _tO = _policyFix(_tO, _cs); + oSound = make(); + if (_fV === 8) { + _flash._createSound(_tO.id, _tO.loops||1, _tO.usePolicyFile); + } else { + _flash._createSound(_tO.id, _tO.url, _tO.usePeakData, _tO.useWaveformData, _tO.useEQData, _tO.isMovieStar, (_tO.isMovieStar?_tO.bufferTime:false), _tO.loops||1, _tO.serverURL, _tO.duration||null, _tO.autoPlay, true, _tO.autoLoad, _tO.usePolicyFile); + if (!_tO.serverURL) { + oSound.connected = true; + if (_tO.onconnect) { + _tO.onconnect.apply(oSound); + } + } + } + if (!_tO.serverURL && (_tO.autoLoad || _tO.autoPlay)) { + oSound.load(_tO); + } + } + if (!_tO.serverURL && _tO.autoPlay) { + oSound.play(); + } + return oSound; + }; + this.destroySound = function(sID, _bFromSound) { + if (!_idCheck(sID)) { + return false; + } + var oS = _s.sounds[sID], i; + oS._iO = {}; + oS.stop(); + oS.unload(); + for (i = 0; i < _s.soundIDs.length; i++) { + if (_s.soundIDs[i] === sID) { + _s.soundIDs.splice(i, 1); + break; + } + } + if (!_bFromSound) { + oS.destruct(true); + } + oS = null; + delete _s.sounds[sID]; + return true; + }; + this.load = function(sID, oOptions) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].load(oOptions); + }; + this.unload = function(sID) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].unload(); + }; + this.onPosition = function(sID, nPosition, oMethod, oScope) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].onposition(nPosition, oMethod, oScope); + }; + this.onposition = this.onPosition; + this.clearOnPosition = function(sID, nPosition, oMethod) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].clearOnPosition(nPosition, oMethod); + }; + this.play = function(sID, oOptions) { + var result = false; + if (!_didInit || !_s.ok()) { + _complain(_sm+'.play(): ' + _str(!_didInit?'notReady':'notOK')); + return result; + } + if (!_idCheck(sID)) { + if (!(oOptions instanceof Object)) { + oOptions = { + url: oOptions + }; + } + if (oOptions && oOptions.url) { + oOptions.id = sID; + result = _s.createSound(oOptions).play(); + } + return result; + } + return _s.sounds[sID].play(oOptions); + }; + this.start = this.play; + this.setPosition = function(sID, nMsecOffset) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].setPosition(nMsecOffset); + }; + this.stop = function(sID) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].stop(); + }; + this.stopAll = function() { + var oSound; + for (oSound in _s.sounds) { + if (_s.sounds.hasOwnProperty(oSound)) { + _s.sounds[oSound].stop(); + } + } + }; + this.pause = function(sID) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].pause(); + }; + this.pauseAll = function() { + var i; + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].pause(); + } + }; + this.resume = function(sID) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].resume(); + }; + this.resumeAll = function() { + var i; + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].resume(); + } + }; + this.togglePause = function(sID) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].togglePause(); + }; + this.setPan = function(sID, nPan) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].setPan(nPan); + }; + this.setVolume = function(sID, nVol) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].setVolume(nVol); + }; + this.mute = function(sID) { + var i = 0; + if (typeof sID !== 'string') { + sID = null; + } + if (!sID) { + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].mute(); + } + _s.muted = true; + } else { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].mute(); + } + return true; + }; + this.muteAll = function() { + _s.mute(); + }; + this.unmute = function(sID) { + var i; + if (typeof sID !== 'string') { + sID = null; + } + if (!sID) { + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].unmute(); + } + _s.muted = false; + } else { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].unmute(); + } + return true; + }; + this.unmuteAll = function() { + _s.unmute(); + }; + this.toggleMute = function(sID) { + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].toggleMute(); + }; + this.getMemoryUse = function() { + var ram = 0; + if (_flash && _fV !== 8) { + ram = parseInt(_flash._getMemoryUse(), 10); + } + return ram; + }; + this.disable = function(bNoDisable) { + var i; + if (typeof bNoDisable === 'undefined') { + bNoDisable = false; + } + if (_disabled) { + return false; + } + _disabled = true; + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _disableObject(_s.sounds[_s.soundIDs[i]]); + } + _initComplete(bNoDisable); + _event.remove(_win, 'load', _initUserOnload); + return true; + }; + this.canPlayMIME = function(sMIME) { + var result; + if (_s.hasHTML5) { + result = _html5CanPlay({type:sMIME}); + } + if (!result && _needsFlash) { + result = (sMIME && _s.ok() ? !!((_fV > 8 ? sMIME.match(_netStreamMimeTypes) : null) || sMIME.match(_s.mimePattern)) : null); + } + return result; + }; + this.canPlayURL = function(sURL) { + var result; + if (_s.hasHTML5) { + result = _html5CanPlay({url: sURL}); + } + if (!result && _needsFlash) { + result = (sURL && _s.ok() ? !!(sURL.match(_s.filePattern)) : null); + } + return result; + }; + this.canPlayLink = function(oLink) { + if (typeof oLink.type !== 'undefined' && oLink.type) { + if (_s.canPlayMIME(oLink.type)) { + return true; + } + } + return _s.canPlayURL(oLink.href); + }; + this.getSoundById = function(sID, _suppressDebug) { + if (!sID) { + throw new Error(_sm+'.getSoundById(): sID is null/undefined'); + } + var result = _s.sounds[sID]; + return result; + }; + this.onready = function(oMethod, oScope) { + var sType = 'onready', + result = false; + if (typeof oMethod === 'function') { + if (!oScope) { + oScope = _win; + } + _addOnEvent(sType, oMethod, oScope); + _processOnEvents(); + result = true; + } else { + throw _str('needFunction', sType); + } + return result; + }; + this.ontimeout = function(oMethod, oScope) { + var sType = 'ontimeout', + result = false; + if (typeof oMethod === 'function') { + if (!oScope) { + oScope = _win; + } + _addOnEvent(sType, oMethod, oScope); + _processOnEvents({type:sType}); + result = true; + } else { + throw _str('needFunction', sType); + } + return result; + }; + this._writeDebug = function(sText, sType, _bTimestamp) { + return true; + }; + this._wD = this._writeDebug; + this._debug = function() { + }; + this.reboot = function() { + var i, j; + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].destruct(); + } + if (_flash) { + try { + if (_isIE) { + _oRemovedHTML = _flash.innerHTML; + } + _oRemoved = _flash.parentNode.removeChild(_flash); + } catch(e) { + } + } + _oRemovedHTML = _oRemoved = _needsFlash = null; + _s.enabled = _didDCLoaded = _didInit = _waitingForEI = _initPending = _didAppend = _appendSuccess = _disabled = _s.swfLoaded = false; + _s.soundIDs = []; + _s.sounds = {}; + _flash = null; + for (i in _on_queue) { + if (_on_queue.hasOwnProperty(i)) { + for (j = _on_queue[i].length-1; j >= 0; j--) { + _on_queue[i][j].fired = false; + } + } + } + _win.setTimeout(_s.beginDelayedInit, 20); + }; + this.getMoviePercent = function() { + return (_flash && typeof _flash.PercentLoaded !== 'undefined' ? _flash.PercentLoaded() : null); + }; + this.beginDelayedInit = function() { + _windowLoaded = true; + _domContentLoaded(); + setTimeout(function() { + if (_initPending) { + return false; + } + _createMovie(); + _initMovie(); + _initPending = true; + return true; + }, 20); + _delayWaitForEI(); + }; + this.destruct = function() { + _s.disable(true); + }; + SMSound = function(oOptions) { + var _t = this, _resetProperties, _add_html5_events, _remove_html5_events, _stop_html5_timer, _start_html5_timer, _attachOnPosition, _onplay_called = false, _onPositionItems = [], _onPositionFired = 0, _detachOnPosition, _applyFromTo, _lastURL = null, _lastHTML5State; + _lastHTML5State = { + duration: null, + time: null + }; + this.id = oOptions.id; + this.sID = this.id; + this.url = oOptions.url; + this.options = _mixin(oOptions); + this.instanceOptions = this.options; + this._iO = this.instanceOptions; + this.pan = this.options.pan; + this.volume = this.options.volume; + this.isHTML5 = false; + this._a = null; + this.id3 = {}; + this._debug = function() { + }; + this.load = function(oOptions) { + var oS = null, _iO; + if (typeof oOptions !== 'undefined') { + _t._iO = _mixin(oOptions, _t.options); + _t.instanceOptions = _t._iO; + } else { + oOptions = _t.options; + _t._iO = oOptions; + _t.instanceOptions = _t._iO; + if (_lastURL && _lastURL !== _t.url) { + _t._iO.url = _t.url; + _t.url = null; + } + } + if (!_t._iO.url) { + _t._iO.url = _t.url; + } + _t._iO.url = _parseURL(_t._iO.url); + if (_t._iO.url === _t.url && _t.readyState !== 0 && _t.readyState !== 2) { + if (_t.readyState === 3 && _t._iO.onload) { + _t._iO.onload.apply(_t, [(!!_t.duration)]); + } + return _t; + } + _iO = _t._iO; + _lastURL = (_t.url && _t.url.toString ? _t.url.toString() : null); + _t.loaded = false; + _t.readyState = 1; + _t.playState = 0; + _t.id3 = {}; + if (_html5OK(_iO)) { + oS = _t._setup_html5(_iO); + if (!oS._called_load) { + _t._html5_canplay = false; + if (_t._a.src !== _iO.url) { + _t._a.src = _iO.url; + _t.setPosition(0); + } + _t._a.autobuffer = 'auto'; + _t._a.preload = 'auto'; + oS._called_load = true; + if (_iO.autoPlay) { + _t.play(); + } + } else { + } + } else { + try { + _t.isHTML5 = false; + _t._iO = _policyFix(_loopFix(_iO)); + _iO = _t._iO; + if (_fV === 8) { + _flash._load(_t.id, _iO.url, _iO.stream, _iO.autoPlay, (_iO.whileloading?1:0), _iO.loops||1, _iO.usePolicyFile); + } else { + _flash._load(_t.id, _iO.url, !!(_iO.stream), !!(_iO.autoPlay), _iO.loops||1, !!(_iO.autoLoad), _iO.usePolicyFile); + } + } catch(e) { + _catchError({type:'SMSOUND_LOAD_JS_EXCEPTION', fatal:true}); + } + } + _t.url = _iO.url; + return _t; + }; + this.unload = function() { + if (_t.readyState !== 0) { + if (!_t.isHTML5) { + if (_fV === 8) { + _flash._unload(_t.id, _emptyURL); + } else { + _flash._unload(_t.id); + } + } else { + _stop_html5_timer(); + if (_t._a) { + _t._a.pause(); + _html5Unload(_t._a, _emptyURL); + _t.url = _emptyURL; + } + } + _resetProperties(); + } + return _t; + }; + this.destruct = function(_bFromSM) { + if (!_t.isHTML5) { + _t._iO.onfailure = null; + _flash._destroySound(_t.id); + } else { + _stop_html5_timer(); + if (_t._a) { + _t._a.pause(); + _html5Unload(_t._a); + if (!_useGlobalHTML5Audio) { + _remove_html5_events(); + } + _t._a._t = null; + _t._a = null; + } + } + if (!_bFromSM) { + _s.destroySound(_t.id, true); + } + }; + this.play = function(oOptions, _updatePlayState) { + var fN, allowMulti, a, onready, startOK = true, + exit = null; + _updatePlayState = (typeof _updatePlayState === 'undefined' ? true : _updatePlayState); + if (!oOptions) { + oOptions = {}; + } + if (_t.url) { + _t._iO.url = _t.url; + } + _t._iO = _mixin(_t._iO, _t.options); + _t._iO = _mixin(oOptions, _t._iO); + _t._iO.url = _parseURL(_t._iO.url); + _t.instanceOptions = _t._iO; + if (_t._iO.serverURL && !_t.connected) { + if (!_t.getAutoPlay()) { + _t.setAutoPlay(true); + } + return _t; + } + if (_html5OK(_t._iO)) { + _t._setup_html5(_t._iO); + _start_html5_timer(); + } + if (_t.playState === 1 && !_t.paused) { + allowMulti = _t._iO.multiShot; + if (!allowMulti) { + exit = _t; + } else { + } + } + if (exit !== null) { + return exit; + } + if (oOptions.url && oOptions.url !== _t.url) { + _t.load(_t._iO); + } + if (!_t.loaded) { + if (_t.readyState === 0) { + if (!_t.isHTML5) { + _t._iO.autoPlay = true; + _t.load(_t._iO); + } else { + _t.load(_t._iO); + } + } else if (_t.readyState === 2) { + exit = _t; + } else { + } + } else { + } + if (exit !== null) { + return exit; + } + if (!_t.isHTML5 && _fV === 9 && _t.position > 0 && _t.position === _t.duration) { + oOptions.position = 0; + } + if (_t.paused && _t.position >= 0 && (!_t._iO.serverURL || _t.position > 0)) { + _t.resume(); + } else { + _t._iO = _mixin(oOptions, _t._iO); + if (_t._iO.from !== null && _t._iO.to !== null && _t.instanceCount === 0 && _t.playState === 0 && !_t._iO.serverURL) { + onready = function() { + _t._iO = _mixin(oOptions, _t._iO); + _t.play(_t._iO); + }; + if (_t.isHTML5 && !_t._html5_canplay) { + _t.load({ + _oncanplay: onready + }); + exit = false; + } else if (!_t.isHTML5 && !_t.loaded && (!_t.readyState || _t.readyState !== 2)) { + _t.load({ + onload: onready + }); + exit = false; + } + if (exit !== null) { + return exit; + } + _t._iO = _applyFromTo(); + } + if (!_t.instanceCount || _t._iO.multiShotEvents || (!_t.isHTML5 && _fV > 8 && !_t.getAutoPlay())) { + _t.instanceCount++; + } + if (_t._iO.onposition && _t.playState === 0) { + _attachOnPosition(_t); + } + _t.playState = 1; + _t.paused = false; + _t.position = (typeof _t._iO.position !== 'undefined' && !isNaN(_t._iO.position) ? _t._iO.position : 0); + if (!_t.isHTML5) { + _t._iO = _policyFix(_loopFix(_t._iO)); + } + if (_t._iO.onplay && _updatePlayState) { + _t._iO.onplay.apply(_t); + _onplay_called = true; + } + _t.setVolume(_t._iO.volume, true); + _t.setPan(_t._iO.pan, true); + if (!_t.isHTML5) { + startOK = _flash._start(_t.id, _t._iO.loops || 1, (_fV === 9 ? _t._iO.position : _t._iO.position / 1000), _t._iO.multiShot); + if (_fV === 9 && !startOK) { + if (_t._iO.onplayerror) { + _t._iO.onplayerror.apply(_t); + } + } + } else { + _start_html5_timer(); + a = _t._setup_html5(); + _t.setPosition(_t._iO.position); + a.play(); + } + } + return _t; + }; + this.start = this.play; + this.stop = function(bAll) { + var _iO = _t._iO, _oP; + if (_t.playState === 1) { + _t._onbufferchange(0); + _t._resetOnPosition(0); + _t.paused = false; + if (!_t.isHTML5) { + _t.playState = 0; + } + _detachOnPosition(); + if (_iO.to) { + _t.clearOnPosition(_iO.to); + } + if (!_t.isHTML5) { + _flash._stop(_t.id, bAll); + if (_iO.serverURL) { + _t.unload(); + } + } else { + if (_t._a) { + _oP = _t.position; + _t.setPosition(0); + _t.position = _oP; + _t._a.pause(); + _t.playState = 0; + _t._onTimer(); + _stop_html5_timer(); + } + } + _t.instanceCount = 0; + _t._iO = {}; + if (_iO.onstop) { + _iO.onstop.apply(_t); + } + } + return _t; + }; + this.setAutoPlay = function(autoPlay) { + _t._iO.autoPlay = autoPlay; + if (!_t.isHTML5) { + _flash._setAutoPlay(_t.id, autoPlay); + if (autoPlay) { + if (!_t.instanceCount && _t.readyState === 1) { + _t.instanceCount++; + } + } + } + }; + this.getAutoPlay = function() { + return _t._iO.autoPlay; + }; + this.setPosition = function(nMsecOffset) { + if (typeof nMsecOffset === 'undefined') { + nMsecOffset = 0; + } + var original_pos, + position, position1K, + offset = (_t.isHTML5 ? Math.max(nMsecOffset, 0) : Math.min(_t.duration || _t._iO.duration, Math.max(nMsecOffset, 0))); + original_pos = _t.position; + _t.position = offset; + position1K = _t.position/1000; + _t._resetOnPosition(_t.position); + _t._iO.position = offset; + if (!_t.isHTML5) { + position = (_fV === 9 ? _t.position : position1K); + if (_t.readyState && _t.readyState !== 2) { + _flash._setPosition(_t.id, position, (_t.paused || !_t.playState), _t._iO.multiShot); + } + } else if (_t._a) { + if (_t._html5_canplay) { + if (_t._a.currentTime !== position1K) { + try { + _t._a.currentTime = position1K; + if (_t.playState === 0 || _t.paused) { + _t._a.pause(); + } + } catch(e) { + } + } + } else { + } + } + if (_t.isHTML5) { + if (_t.paused) { + _t._onTimer(true); + } + } + return _t; + }; + this.pause = function(_bCallFlash) { + if (_t.paused || (_t.playState === 0 && _t.readyState !== 1)) { + return _t; + } + _t.paused = true; + if (!_t.isHTML5) { + if (_bCallFlash || typeof _bCallFlash === 'undefined') { + _flash._pause(_t.id, _t._iO.multiShot); + } + } else { + _t._setup_html5().pause(); + _stop_html5_timer(); + } + if (_t._iO.onpause) { + _t._iO.onpause.apply(_t); + } + return _t; + }; + this.resume = function() { + var _iO = _t._iO; + if (!_t.paused) { + return _t; + } + _t.paused = false; + _t.playState = 1; + if (!_t.isHTML5) { + if (_iO.isMovieStar && !_iO.serverURL) { + _t.setPosition(_t.position); + } + _flash._pause(_t.id, _iO.multiShot); + } else { + _t._setup_html5().play(); + _start_html5_timer(); + } + if (!_onplay_called && _iO.onplay) { + _iO.onplay.apply(_t); + _onplay_called = true; + } else if (_iO.onresume) { + _iO.onresume.apply(_t); + } + return _t; + }; + this.togglePause = function() { + if (_t.playState === 0) { + _t.play({ + position: (_fV === 9 && !_t.isHTML5 ? _t.position : _t.position / 1000) + }); + return _t; + } + if (_t.paused) { + _t.resume(); + } else { + _t.pause(); + } + return _t; + }; + this.setPan = function(nPan, bInstanceOnly) { + if (typeof nPan === 'undefined') { + nPan = 0; + } + if (typeof bInstanceOnly === 'undefined') { + bInstanceOnly = false; + } + if (!_t.isHTML5) { + _flash._setPan(_t.id, nPan); + } + _t._iO.pan = nPan; + if (!bInstanceOnly) { + _t.pan = nPan; + _t.options.pan = nPan; + } + return _t; + }; + this.setVolume = function(nVol, _bInstanceOnly) { + if (typeof nVol === 'undefined') { + nVol = 100; + } + if (typeof _bInstanceOnly === 'undefined') { + _bInstanceOnly = false; + } + if (!_t.isHTML5) { + _flash._setVolume(_t.id, (_s.muted && !_t.muted) || _t.muted?0:nVol); + } else if (_t._a) { + _t._a.volume = Math.max(0, Math.min(1, nVol/100)); + } + _t._iO.volume = nVol; + if (!_bInstanceOnly) { + _t.volume = nVol; + _t.options.volume = nVol; + } + return _t; + }; + this.mute = function() { + _t.muted = true; + if (!_t.isHTML5) { + _flash._setVolume(_t.id, 0); + } else if (_t._a) { + _t._a.muted = true; + } + return _t; + }; + this.unmute = function() { + _t.muted = false; + var hasIO = (typeof _t._iO.volume !== 'undefined'); + if (!_t.isHTML5) { + _flash._setVolume(_t.id, hasIO?_t._iO.volume:_t.options.volume); + } else if (_t._a) { + _t._a.muted = false; + } + return _t; + }; + this.toggleMute = function() { + return (_t.muted?_t.unmute():_t.mute()); + }; + this.onPosition = function(nPosition, oMethod, oScope) { + _onPositionItems.push({ + position: parseInt(nPosition, 10), + method: oMethod, + scope: (typeof oScope !== 'undefined' ? oScope : _t), + fired: false + }); + return _t; + }; + this.onposition = this.onPosition; + this.clearOnPosition = function(nPosition, oMethod) { + var i; + nPosition = parseInt(nPosition, 10); + if (isNaN(nPosition)) { + return false; + } + for (i=0; i < _onPositionItems.length; i++) { + if (nPosition === _onPositionItems[i].position) { + if (!oMethod || (oMethod === _onPositionItems[i].method)) { + if (_onPositionItems[i].fired) { + _onPositionFired--; + } + _onPositionItems.splice(i, 1); + } + } + } + }; + this._processOnPosition = function() { + var i, item, j = _onPositionItems.length; + if (!j || !_t.playState || _onPositionFired >= j) { + return false; + } + for (i=j-1; i >= 0; i--) { + item = _onPositionItems[i]; + if (!item.fired && _t.position >= item.position) { + item.fired = true; + _onPositionFired++; + item.method.apply(item.scope, [item.position]); + } + } + return true; + }; + this._resetOnPosition = function(nPosition) { + var i, item, j = _onPositionItems.length; + if (!j) { + return false; + } + for (i=j-1; i >= 0; i--) { + item = _onPositionItems[i]; + if (item.fired && nPosition <= item.position) { + item.fired = false; + _onPositionFired--; + } + } + return true; + }; + _applyFromTo = function() { + var _iO = _t._iO, + f = _iO.from, + t = _iO.to, + start, end; + end = function() { + _t.clearOnPosition(t, end); + _t.stop(); + }; + start = function() { + if (t !== null && !isNaN(t)) { + _t.onPosition(t, end); + } + }; + if (f !== null && !isNaN(f)) { + _iO.position = f; + _iO.multiShot = false; + start(); + } + return _iO; + }; + _attachOnPosition = function() { + var item, + op = _t._iO.onposition; + if (op) { + for (item in op) { + if (op.hasOwnProperty(item)) { + _t.onPosition(parseInt(item, 10), op[item]); + } + } + } + }; + _detachOnPosition = function() { + var item, + op = _t._iO.onposition; + if (op) { + for (item in op) { + if (op.hasOwnProperty(item)) { + _t.clearOnPosition(parseInt(item, 10)); + } + } + } + }; + _start_html5_timer = function() { + if (_t.isHTML5) { + _startTimer(_t); + } + }; + _stop_html5_timer = function() { + if (_t.isHTML5) { + _stopTimer(_t); + } + }; + _resetProperties = function(retainPosition) { + if (!retainPosition) { + _onPositionItems = []; + _onPositionFired = 0; + } + _onplay_called = false; + _t._hasTimer = null; + _t._a = null; + _t._html5_canplay = false; + _t.bytesLoaded = null; + _t.bytesTotal = null; + _t.duration = (_t._iO && _t._iO.duration ? _t._iO.duration : null); + _t.durationEstimate = null; + _t.buffered = []; + _t.eqData = []; + _t.eqData.left = []; + _t.eqData.right = []; + _t.failures = 0; + _t.isBuffering = false; + _t.instanceOptions = {}; + _t.instanceCount = 0; + _t.loaded = false; + _t.metadata = {}; + _t.readyState = 0; + _t.muted = false; + _t.paused = false; + _t.peakData = { + left: 0, + right: 0 + }; + _t.waveformData = { + left: [], + right: [] + }; + _t.playState = 0; + _t.position = null; + _t.id3 = {}; + }; + _resetProperties(); + this._onTimer = function(bForce) { + var duration, isNew = false, time, x = {}; + if (_t._hasTimer || bForce) { + if (_t._a && (bForce || ((_t.playState > 0 || _t.readyState === 1) && !_t.paused))) { + duration = _t._get_html5_duration(); + if (duration !== _lastHTML5State.duration) { + _lastHTML5State.duration = duration; + _t.duration = duration; + isNew = true; + } + _t.durationEstimate = _t.duration; + time = (_t._a.currentTime * 1000 || 0); + if (time !== _lastHTML5State.time) { + _lastHTML5State.time = time; + isNew = true; + } + if (isNew || bForce) { + _t._whileplaying(time,x,x,x,x); + } + } + return isNew; + } + }; + this._get_html5_duration = function() { + var _iO = _t._iO, + d = (_t._a && _t._a.duration ? _t._a.duration*1000 : (_iO && _iO.duration ? _iO.duration : null)), + result = (d && !isNaN(d) && d !== Infinity ? d : null); + return result; + }; + this._apply_loop = function(a, nLoops) { + a.loop = (nLoops > 1 ? 'loop' : ''); + }; + this._setup_html5 = function(oOptions) { + var _iO = _mixin(_t._iO, oOptions), d = decodeURI, + _a = _useGlobalHTML5Audio ? _s._global_a : _t._a, + _dURL = d(_iO.url), + _oldIO = (_a && _a._t ? _a._t.instanceOptions : null), + result; + if (_a) { + if (_a._t) { + if (!_useGlobalHTML5Audio && _dURL === d(_lastURL)) { + result = _a; + } else if (_useGlobalHTML5Audio && _oldIO.url === _iO.url && (!_lastURL || (_lastURL === _oldIO.url))) { + result = _a; + } + if (result) { + _t._apply_loop(_a, _iO.loops); + return result; + } + } + if (_useGlobalHTML5Audio && _a._t && _a._t.playState && _iO.url !== _oldIO.url) { + _a._t.stop(); + } + _resetProperties((_oldIO && _oldIO.url ? _iO.url === _oldIO.url : (_lastURL ? _lastURL === _iO.url : false))); + _a.src = _iO.url; + _t.url = _iO.url; + _lastURL = _iO.url; + _a._called_load = false; + } else { + if (_iO.autoLoad || _iO.autoPlay) { + _t._a = new Audio(_iO.url); + } else { + _t._a = (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()); + } + _a = _t._a; + _a._called_load = false; + if (_useGlobalHTML5Audio) { + _s._global_a = _a; + } + } + _t.isHTML5 = true; + _t._a = _a; + _a._t = _t; + _add_html5_events(); + _t._apply_loop(_a, _iO.loops); + if (_iO.autoLoad || _iO.autoPlay) { + _t.load(); + } else { + _a.autobuffer = false; + _a.preload = 'auto'; + } + return _a; + }; + _add_html5_events = function() { + if (_t._a._added_events) { + return false; + } + var f; + function add(oEvt, oFn, bCapture) { + return _t._a ? _t._a.addEventListener(oEvt, oFn, bCapture||false) : null; + } + _t._a._added_events = true; + for (f in _html5_events) { + if (_html5_events.hasOwnProperty(f)) { + add(f, _html5_events[f]); + } + } + return true; + }; + _remove_html5_events = function() { + var f; + function remove(oEvt, oFn, bCapture) { + return (_t._a ? _t._a.removeEventListener(oEvt, oFn, bCapture||false) : null); + } + _t._a._added_events = false; + for (f in _html5_events) { + if (_html5_events.hasOwnProperty(f)) { + remove(f, _html5_events[f]); + } + } + }; + this._onload = function(nSuccess) { + var fN, + loadOK = (!!(nSuccess) || (!_t.isHTML5 && _fV === 8 && _t.duration)); + _t.loaded = loadOK; + _t.readyState = loadOK?3:2; + _t._onbufferchange(0); + if (_t._iO.onload) { + _t._iO.onload.apply(_t, [loadOK]); + } + return true; + }; + this._onbufferchange = function(nIsBuffering) { + if (_t.playState === 0) { + return false; + } + if ((nIsBuffering && _t.isBuffering) || (!nIsBuffering && !_t.isBuffering)) { + return false; + } + _t.isBuffering = (nIsBuffering === 1); + if (_t._iO.onbufferchange) { + _t._iO.onbufferchange.apply(_t); + } + return true; + }; + this._onsuspend = function() { + if (_t._iO.onsuspend) { + _t._iO.onsuspend.apply(_t); + } + return true; + }; + this._onfailure = function(msg, level, code) { + _t.failures++; + if (_t._iO.onfailure && _t.failures === 1) { + _t._iO.onfailure(_t, msg, level, code); + } else { + } + }; + this._onfinish = function() { + var _io_onfinish = _t._iO.onfinish; + _t._onbufferchange(0); + _t._resetOnPosition(0); + if (_t.instanceCount) { + _t.instanceCount--; + if (!_t.instanceCount) { + _detachOnPosition(); + _t.playState = 0; + _t.paused = false; + _t.instanceCount = 0; + _t.instanceOptions = {}; + _t._iO = {}; + _stop_html5_timer(); + if (_t.isHTML5) { + _t.position = 0; + } + } + if (!_t.instanceCount || _t._iO.multiShotEvents) { + if (_io_onfinish) { + _io_onfinish.apply(_t); + } + } + } + }; + this._whileloading = function(nBytesLoaded, nBytesTotal, nDuration, nBufferLength) { + var _iO = _t._iO; + _t.bytesLoaded = nBytesLoaded; + _t.bytesTotal = nBytesTotal; + _t.duration = Math.floor(nDuration); + _t.bufferLength = nBufferLength; + if (!_t.isHTML5 && !_iO.isMovieStar) { + if (_iO.duration) { + _t.durationEstimate = (_t.duration > _iO.duration) ? _t.duration : _iO.duration; + } else { + _t.durationEstimate = parseInt((_t.bytesTotal / _t.bytesLoaded) * _t.duration, 10); + } + } else { + _t.durationEstimate = _t.duration; + } + if (!_t.isHTML5) { + _t.buffered = [{ + 'start': 0, + 'end': _t.duration + }]; + } + if ((_t.readyState !== 3 || _t.isHTML5) && _iO.whileloading) { + _iO.whileloading.apply(_t); + } + }; + this._whileplaying = function(nPosition, oPeakData, oWaveformDataLeft, oWaveformDataRight, oEQData) { + var _iO = _t._iO, + eqLeft; + if (isNaN(nPosition) || nPosition === null) { + return false; + } + _t.position = Math.max(0, nPosition); + _t._processOnPosition(); + if (!_t.isHTML5 && _fV > 8) { + if (_iO.usePeakData && typeof oPeakData !== 'undefined' && oPeakData) { + _t.peakData = { + left: oPeakData.leftPeak, + right: oPeakData.rightPeak + }; + } + if (_iO.useWaveformData && typeof oWaveformDataLeft !== 'undefined' && oWaveformDataLeft) { + _t.waveformData = { + left: oWaveformDataLeft.split(','), + right: oWaveformDataRight.split(',') + }; + } + if (_iO.useEQData) { + if (typeof oEQData !== 'undefined' && oEQData && oEQData.leftEQ) { + eqLeft = oEQData.leftEQ.split(','); + _t.eqData = eqLeft; + _t.eqData.left = eqLeft; + if (typeof oEQData.rightEQ !== 'undefined' && oEQData.rightEQ) { + _t.eqData.right = oEQData.rightEQ.split(','); + } + } + } + } + if (_t.playState === 1) { + if (!_t.isHTML5 && _fV === 8 && !_t.position && _t.isBuffering) { + _t._onbufferchange(0); + } + if (_iO.whileplaying) { + _iO.whileplaying.apply(_t); + } + } + return true; + }; + this._oncaptiondata = function(oData) { + _t.captiondata = oData; + if (_t._iO.oncaptiondata) { + _t._iO.oncaptiondata.apply(_t, [oData]); + } + }; + this._onmetadata = function(oMDProps, oMDData) { + var oData = {}, i, j; + for (i = 0, j = oMDProps.length; i < j; i++) { + oData[oMDProps[i]] = oMDData[i]; + } + _t.metadata = oData; + if (_t._iO.onmetadata) { + _t._iO.onmetadata.apply(_t); + } + }; + this._onid3 = function(oID3Props, oID3Data) { + var oData = [], i, j; + for (i = 0, j = oID3Props.length; i < j; i++) { + oData[oID3Props[i]] = oID3Data[i]; + } + _t.id3 = _mixin(_t.id3, oData); + if (_t._iO.onid3) { + _t._iO.onid3.apply(_t); + } + }; + this._onconnect = function(bSuccess) { + bSuccess = (bSuccess === 1); + _t.connected = bSuccess; + if (bSuccess) { + _t.failures = 0; + if (_idCheck(_t.id)) { + if (_t.getAutoPlay()) { + _t.play(undefined, _t.getAutoPlay()); + } else if (_t._iO.autoLoad) { + _t.load(); + } + } + if (_t._iO.onconnect) { + _t._iO.onconnect.apply(_t, [bSuccess]); + } + } + }; + this._ondataerror = function(sError) { + if (_t.playState > 0) { + if (_t._iO.ondataerror) { + _t._iO.ondataerror.apply(_t); + } + } + }; + }; + _getDocument = function() { + return (_doc.body || _doc._docElement || _doc.getElementsByTagName('div')[0]); + }; + _id = function(sID) { + return _doc.getElementById(sID); + }; + _mixin = function(oMain, oAdd) { + var o1 = (oMain || {}), o2, o; + o2 = (typeof oAdd === 'undefined' ? _s.defaultOptions : oAdd); + for (o in o2) { + if (o2.hasOwnProperty(o) && typeof o1[o] === 'undefined') { + if (typeof o2[o] !== 'object' || o2[o] === null) { + o1[o] = o2[o]; + } else { + o1[o] = _mixin(o1[o], o2[o]); + } + } + } + return o1; + }; + _extraOptions = { + 'onready': 1, + 'ontimeout': 1, + 'defaultOptions': 1, + 'flash9Options': 1, + 'movieStarOptions': 1 + }; + _assign = function(o, oParent) { + var i, + result = true, + hasParent = (typeof oParent !== 'undefined'), + setupOptions = _s.setupOptions, + extraOptions = _extraOptions; + for (i in o) { + if (o.hasOwnProperty(i)) { + if (typeof o[i] !== 'object' || o[i] === null || o[i] instanceof Array) { + if (hasParent && typeof extraOptions[oParent] !== 'undefined') { + _s[oParent][i] = o[i]; + } else if (typeof setupOptions[i] !== 'undefined') { + _s.setupOptions[i] = o[i]; + _s[i] = o[i]; + } else if (typeof extraOptions[i] === 'undefined') { + _complain(_str((typeof _s[i] === 'undefined' ? 'setupUndef' : 'setupError'), i), 2); + result = false; + } else { + if (_s[i] instanceof Function) { + _s[i].apply(_s, (o[i] instanceof Array? o[i] : [o[i]])); + } else { + _s[i] = o[i]; + } + } + } else { + if (typeof extraOptions[i] === 'undefined') { + _complain(_str((typeof _s[i] === 'undefined' ? 'setupUndef' : 'setupError'), i), 2); + result = false; + } else { + return _assign(o[i], i); + } + } + } + } + return result; + }; + function _preferFlashCheck(kind) { + return (_s.preferFlash && _hasFlash && !_s.ignoreFlash && (typeof _s.flash[kind] !== 'undefined' && _s.flash[kind])); + } + _event = (function() { + var old = (_win.attachEvent), + evt = { + add: (old?'attachEvent':'addEventListener'), + remove: (old?'detachEvent':'removeEventListener') + }; + function getArgs(oArgs) { + var args = _slice.call(oArgs), + len = args.length; + if (old) { + args[1] = 'on' + args[1]; + if (len > 3) { + args.pop(); + } + } else if (len === 3) { + args.push(false); + } + return args; + } + function apply(args, sType) { + var element = args.shift(), + method = [evt[sType]]; + if (old) { + element[method](args[0], args[1]); + } else { + element[method].apply(element, args); + } + } + function add() { + apply(getArgs(arguments), 'add'); + } + function remove() { + apply(getArgs(arguments), 'remove'); + } + return { + 'add': add, + 'remove': remove + }; + }()); + function _html5_event(oFn) { + return function(e) { + var t = this._t, + result; + if (!t || !t._a) { + result = null; + } else { + result = oFn.call(this, e); + } + return result; + }; + } + _html5_events = { + abort: _html5_event(function() { + }), + canplay: _html5_event(function() { + var t = this._t, + position1K; + if (t._html5_canplay) { + return true; + } + t._html5_canplay = true; + t._onbufferchange(0); + position1K = (typeof t._iO.position !== 'undefined' && !isNaN(t._iO.position)?t._iO.position/1000:null); + if (t.position && this.currentTime !== position1K) { + try { + this.currentTime = position1K; + } catch(ee) { + } + } + if (t._iO._oncanplay) { + t._iO._oncanplay(); + } + }), + canplaythrough: _html5_event(function() { + var t = this._t; + if (!t.loaded) { + t._onbufferchange(0); + t._whileloading(t.bytesLoaded, t.bytesTotal, t._get_html5_duration()); + t._onload(true); + } + }), + ended: _html5_event(function() { + var t = this._t; + t._onfinish(); + }), + error: _html5_event(function() { + this._t._onload(false); + }), + loadeddata: _html5_event(function() { + var t = this._t; + if (!t._loaded && !_isSafari) { + t.duration = t._get_html5_duration(); + } + }), + loadedmetadata: _html5_event(function() { + }), + loadstart: _html5_event(function() { + this._t._onbufferchange(1); + }), + play: _html5_event(function() { + this._t._onbufferchange(0); + }), + playing: _html5_event(function() { + this._t._onbufferchange(0); + }), + progress: _html5_event(function(e) { + var t = this._t, + i, j, str, buffered = 0, + isProgress = (e.type === 'progress'), + ranges = e.target.buffered, + loaded = (e.loaded||0), + total = (e.total||1), + scale = 1000; + t.buffered = []; + if (ranges && ranges.length) { + for (i=0, j=ranges.length; i= 0; i--) { + support['audio/'+aF[item].related[i]] = support[item]; + _s.html5[aF[item].related[i]] = support[item]; + _s.flash[aF[item].related[i]] = support[item]; + } + } + } + } + support.canPlayType = (a?_cp:null); + _s.html5 = _mixin(_s.html5, support); + return true; + }; + _strings = { + }; + _str = function() { + }; + _loopFix = function(sOpt) { + if (_fV === 8 && sOpt.loops > 1 && sOpt.stream) { + sOpt.stream = false; + } + return sOpt; + }; + _policyFix = function(sOpt, sPre) { + if (sOpt && !sOpt.usePolicyFile && (sOpt.onid3 || sOpt.usePeakData || sOpt.useWaveformData || sOpt.useEQData)) { + sOpt.usePolicyFile = true; + } + return sOpt; + }; + _complain = function(sMsg) { + }; + _doNothing = function() { + return false; + }; + _disableObject = function(o) { + var oProp; + for (oProp in o) { + if (o.hasOwnProperty(oProp) && typeof o[oProp] === 'function') { + o[oProp] = _doNothing; + } + } + oProp = null; + }; + _failSafely = function(bNoDisable) { + if (typeof bNoDisable === 'undefined') { + bNoDisable = false; + } + if (_disabled || bNoDisable) { + _s.disable(bNoDisable); + } + }; + _normalizeMovieURL = function(smURL) { + var urlParams = null, url; + if (smURL) { + if (smURL.match(/\.swf(\?.*)?$/i)) { + urlParams = smURL.substr(smURL.toLowerCase().lastIndexOf('.swf?') + 4); + if (urlParams) { + return smURL; + } + } else if (smURL.lastIndexOf('/') !== smURL.length - 1) { + smURL += '/'; + } + } + url = (smURL && smURL.lastIndexOf('/') !== - 1 ? smURL.substr(0, smURL.lastIndexOf('/') + 1) : './') + _s.movieURL; + if (_s.noSWFCache) { + url += ('?ts=' + new Date().getTime()); + } + return url; + }; + _setVersionInfo = function() { + _fV = parseInt(_s.flashVersion, 10); + if (_fV !== 8 && _fV !== 9) { + _s.flashVersion = _fV = _defaultFlashVersion; + } + var isDebug = (_s.debugMode || _s.debugFlash?'_debug.swf':'.swf'); + if (_s.useHTML5Audio && !_s.html5Only && _s.audioFormats.mp4.required && _fV < 9) { + _s.flashVersion = _fV = 9; + } + _s.version = _s.versionNumber + (_s.html5Only?' (HTML5-only mode)':(_fV === 9?' (AS3/Flash 9)':' (AS2/Flash 8)')); + if (_fV > 8) { + _s.defaultOptions = _mixin(_s.defaultOptions, _s.flash9Options); + _s.features.buffering = true; + _s.defaultOptions = _mixin(_s.defaultOptions, _s.movieStarOptions); + _s.filePatterns.flash9 = new RegExp('\\.(mp3|' + _netStreamTypes.join('|') + ')(\\?.*)?$', 'i'); + _s.features.movieStar = true; + } else { + _s.features.movieStar = false; + } + _s.filePattern = _s.filePatterns[(_fV !== 8?'flash9':'flash8')]; + _s.movieURL = (_fV === 8?'soundmanager2.swf':'soundmanager2_flash9.swf').replace('.swf', isDebug); + _s.features.peakData = _s.features.waveformData = _s.features.eqData = (_fV > 8); + }; + _setPolling = function(bPolling, bHighPerformance) { + if (!_flash) { + return false; + } + _flash._setPolling(bPolling, bHighPerformance); + }; + _initDebug = function() { + if (_s.debugURLParam.test(_wl)) { + _s.debugMode = true; + } + }; + _idCheck = this.getSoundById; + _getSWFCSS = function() { + var css = []; + if (_s.debugMode) { + css.push(_swfCSS.sm2Debug); + } + if (_s.debugFlash) { + css.push(_swfCSS.flashDebug); + } + if (_s.useHighPerformance) { + css.push(_swfCSS.highPerf); + } + return css.join(' '); + }; + _flashBlockHandler = function() { + var name = _str('fbHandler'), + p = _s.getMoviePercent(), + css = _swfCSS, + error = {type:'FLASHBLOCK'}; + if (_s.html5Only) { + return false; + } + if (!_s.ok()) { + if (_needsFlash) { + _s.oMC.className = _getSWFCSS() + ' ' + css.swfDefault + ' ' + (p === null?css.swfTimedout:css.swfError); + } + _s.didFlashBlock = true; + _processOnEvents({type:'ontimeout', ignoreInit:true, error:error}); + _catchError(error); + } else { + if (_s.oMC) { + _s.oMC.className = [_getSWFCSS(), css.swfDefault, css.swfLoaded + (_s.didFlashBlock?' '+css.swfUnblocked:'')].join(' '); + } + } + }; + _addOnEvent = function(sType, oMethod, oScope) { + if (typeof _on_queue[sType] === 'undefined') { + _on_queue[sType] = []; + } + _on_queue[sType].push({ + 'method': oMethod, + 'scope': (oScope || null), + 'fired': false + }); + }; + _processOnEvents = function(oOptions) { + if (!oOptions) { + oOptions = { + type: (_s.ok() ? 'onready' : 'ontimeout') + }; + } + if (!_didInit && oOptions && !oOptions.ignoreInit) { + return false; + } + if (oOptions.type === 'ontimeout' && (_s.ok() || (_disabled && !oOptions.ignoreInit))) { + return false; + } + var status = { + success: (oOptions && oOptions.ignoreInit?_s.ok():!_disabled) + }, + srcQueue = (oOptions && oOptions.type?_on_queue[oOptions.type]||[]:[]), + queue = [], i, j, + args = [status], + canRetry = (_needsFlash && _s.useFlashBlock && !_s.ok()); + if (oOptions.error) { + args[0].error = oOptions.error; + } + for (i = 0, j = srcQueue.length; i < j; i++) { + if (srcQueue[i].fired !== true) { + queue.push(srcQueue[i]); + } + } + if (queue.length) { + for (i = 0, j = queue.length; i < j; i++) { + if (queue[i].scope) { + queue[i].method.apply(queue[i].scope, args); + } else { + queue[i].method.apply(this, args); + } + if (!canRetry) { + queue[i].fired = true; + } + } + } + return true; + }; + _initUserOnload = function() { + _win.setTimeout(function() { + if (_s.useFlashBlock) { + _flashBlockHandler(); + } + _processOnEvents(); + if (typeof _s.onload === 'function') { + _s.onload.apply(_win); + } + if (_s.waitForWindowLoad) { + _event.add(_win, 'load', _initUserOnload); + } + },1); + }; + _detectFlash = function() { + if (typeof _hasFlash !== 'undefined') { + return _hasFlash; + } + var hasPlugin = false, n = navigator, nP = n.plugins, obj, type, types, AX = _win.ActiveXObject; + if (nP && nP.length) { + type = 'application/x-shockwave-flash'; + types = n.mimeTypes; + if (types && types[type] && types[type].enabledPlugin && types[type].enabledPlugin.description) { + hasPlugin = true; + } + } else if (typeof AX !== 'undefined') { + try { + obj = new AX('ShockwaveFlash.ShockwaveFlash'); + } catch(e) { + } + hasPlugin = (!!obj); + } + _hasFlash = hasPlugin; + return hasPlugin; + }; + _featureCheck = function() { + var needsFlash, + item, + result = true, + formats = _s.audioFormats, + isSpecial = (_is_iDevice && !!(_ua.match(/os (1|2|3_0|3_1)/i))); + if (isSpecial) { + _s.hasHTML5 = false; + _s.html5Only = true; + if (_s.oMC) { + _s.oMC.style.display = 'none'; + } + result = false; + } else { + if (_s.useHTML5Audio) { + if (!_s.html5 || !_s.html5.canPlayType) { + _s.hasHTML5 = false; + } + } + } + if (_s.useHTML5Audio && _s.hasHTML5) { + for (item in formats) { + if (formats.hasOwnProperty(item)) { + if ((formats[item].required && !_s.html5.canPlayType(formats[item].type)) || (_s.preferFlash && (_s.flash[item] || _s.flash[formats[item].type]))) { + needsFlash = true; + } + } + } + } + if (_s.ignoreFlash) { + needsFlash = false; + } + _s.html5Only = (_s.hasHTML5 && _s.useHTML5Audio && !needsFlash); + return (!_s.html5Only); + }; + _parseURL = function(url) { + var i, j, urlResult = 0, result; + if (url instanceof Array) { + for (i=0, j=url.length; i= 0; i--) { + if (_s.sounds[_s.soundIDs[i]].isHTML5 && _s.sounds[_s.soundIDs[i]]._hasTimer) { + _s.sounds[_s.soundIDs[i]]._onTimer(); + } + } + }; + _catchError = function(options) { + options = (typeof options !== 'undefined' ? options : {}); + if (typeof _s.onerror === 'function') { + _s.onerror.apply(_win, [{type:(typeof options.type !== 'undefined' ? options.type : null)}]); + } + if (typeof options.fatal !== 'undefined' && options.fatal) { + _s.disable(); + } + }; + _badSafariFix = function() { + if (!_isBadSafari || !_detectFlash()) { + return false; + } + var aF = _s.audioFormats, i, item; + for (item in aF) { + if (aF.hasOwnProperty(item)) { + if (item === 'mp3' || item === 'mp4') { + _s.html5[item] = false; + if (aF[item] && aF[item].related) { + for (i = aF[item].related.length-1; i >= 0; i--) { + _s.html5[aF[item].related[i]] = false; + } + } + } + } + } + }; + this._setSandboxType = function(sandboxType) { + }; + this._externalInterfaceOK = function(flashDate, swfVersion) { + if (_s.swfLoaded) { + return false; + } + var e, eiTime = new Date().getTime(); + _s.swfLoaded = true; + _tryInitOnFocus = false; + if (_isBadSafari) { + _badSafariFix(); + } + setTimeout(_init, _isIE ? 100 : 1); + }; + _createMovie = function(smID, smURL) { + if (_didAppend && _appendSuccess) { + return false; + } + function _initMsg() { + } + if (_s.html5Only) { + _setVersionInfo(); + _initMsg(); + _s.oMC = _id(_s.movieID); + _init(); + _didAppend = true; + _appendSuccess = true; + return false; + } + var remoteURL = (smURL || _s.url), + localURL = (_s.altURL || remoteURL), + swfTitle = 'JS/Flash audio component (SoundManager 2)', + oTarget = _getDocument(), + extraClass = _getSWFCSS(), + isRTL = null, + html = _doc.getElementsByTagName('html')[0], + oEmbed, oMovie, tmp, movieHTML, oEl, s, x, sClass; + isRTL = (html && html.dir && html.dir.match(/rtl/i)); + smID = (typeof smID === 'undefined'?_s.id:smID); + function param(name, value) { + return ''; + } + _setVersionInfo(); + _s.url = _normalizeMovieURL(_overHTTP?remoteURL:localURL); + smURL = _s.url; + _s.wmode = (!_s.wmode && _s.useHighPerformance ? 'transparent' : _s.wmode); + if (_s.wmode !== null && (_ua.match(/msie 8/i) || (!_isIE && !_s.useHighPerformance)) && navigator.platform.match(/win32|win64/i)) { + _s.wmode = null; + } + oEmbed = { + 'name': smID, + 'id': smID, + 'src': smURL, + 'quality': 'high', + 'allowScriptAccess': _s.allowScriptAccess, + 'bgcolor': _s.bgColor, + 'pluginspage': _http+'www.macromedia.com/go/getflashplayer', + 'title': swfTitle, + 'type': 'application/x-shockwave-flash', + 'wmode': _s.wmode, + 'hasPriority': 'true' + }; + if (_s.debugFlash) { + oEmbed.FlashVars = 'debug=1'; + } + if (!_s.wmode) { + delete oEmbed.wmode; + } + if (_isIE) { + oMovie = _doc.createElement('div'); + movieHTML = [ + '', + param('movie', smURL), + param('AllowScriptAccess', _s.allowScriptAccess), + param('quality', oEmbed.quality), + (_s.wmode? param('wmode', _s.wmode): ''), + param('bgcolor', _s.bgColor), + param('hasPriority', 'true'), + (_s.debugFlash ? param('FlashVars', oEmbed.FlashVars) : ''), + '' + ].join(''); + } else { + oMovie = _doc.createElement('embed'); + for (tmp in oEmbed) { + if (oEmbed.hasOwnProperty(tmp)) { + oMovie.setAttribute(tmp, oEmbed[tmp]); + } + } + } + _initDebug(); + extraClass = _getSWFCSS(); + oTarget = _getDocument(); + if (oTarget) { + _s.oMC = (_id(_s.movieID) || _doc.createElement('div')); + if (!_s.oMC.id) { + _s.oMC.id = _s.movieID; + _s.oMC.className = _swfCSS.swfDefault + ' ' + extraClass; + s = null; + oEl = null; + if (!_s.useFlashBlock) { + if (_s.useHighPerformance) { + s = { + 'position': 'fixed', + 'width': '8px', + 'height': '8px', + 'bottom': '0px', + 'left': '0px', + 'overflow': 'hidden' + }; + } else { + s = { + 'position': 'absolute', + 'width': '6px', + 'height': '6px', + 'top': '-9999px', + 'left': '-9999px' + }; + if (isRTL) { + s.left = Math.abs(parseInt(s.left,10))+'px'; + } + } + } + if (_isWebkit) { + _s.oMC.style.zIndex = 10000; + } + if (!_s.debugFlash) { + for (x in s) { + if (s.hasOwnProperty(x)) { + _s.oMC.style[x] = s[x]; + } + } + } + try { + if (!_isIE) { + _s.oMC.appendChild(oMovie); + } + oTarget.appendChild(_s.oMC); + if (_isIE) { + oEl = _s.oMC.appendChild(_doc.createElement('div')); + oEl.className = _swfCSS.swfBox; + oEl.innerHTML = movieHTML; + } + _appendSuccess = true; + } catch(e) { + throw new Error(_str('domError')+' \n'+e.toString()); + } + } else { + sClass = _s.oMC.className; + _s.oMC.className = (sClass?sClass+' ':_swfCSS.swfDefault) + (extraClass?' '+extraClass:''); + _s.oMC.appendChild(oMovie); + if (_isIE) { + oEl = _s.oMC.appendChild(_doc.createElement('div')); + oEl.className = _swfCSS.swfBox; + oEl.innerHTML = movieHTML; + } + _appendSuccess = true; + } + } + _didAppend = true; + _initMsg(); + return true; + }; + _initMovie = function() { + if (_s.html5Only) { + _createMovie(); + return false; + } + if (_flash) { + return false; + } + if (!_s.url) { + return false; + } + _flash = _s.getMovie(_s.id); + if (!_flash) { + if (!_oRemoved) { + _createMovie(_s.id, _s.url); + } else { + if (!_isIE) { + _s.oMC.appendChild(_oRemoved); + } else { + _s.oMC.innerHTML = _oRemovedHTML; + } + _oRemoved = null; + _didAppend = true; + } + _flash = _s.getMovie(_s.id); + } + if (typeof _s.oninitmovie === 'function') { + setTimeout(_s.oninitmovie, 1); + } + return true; + }; + _delayWaitForEI = function() { + setTimeout(_waitForEI, 1000); + }; + _waitForEI = function() { + var p, + loadIncomplete = false; + if (!_s.url) { + return false; + } + if (_waitingForEI) { + return false; + } + _waitingForEI = true; + _event.remove(_win, 'load', _delayWaitForEI); + if (_tryInitOnFocus && !_isFocused) { + return false; + } + if (!_didInit) { + p = _s.getMoviePercent(); + if (p > 0 && p < 100) { + loadIncomplete = true; + } + } + setTimeout(function() { + p = _s.getMoviePercent(); + if (loadIncomplete) { + _waitingForEI = false; + _win.setTimeout(_delayWaitForEI, 1); + return false; + } + if (!_didInit && _okToDisable) { + if (p === null) { + if (_s.useFlashBlock || _s.flashLoadTimeout === 0) { + if (_s.useFlashBlock) { + _flashBlockHandler(); + } + } else { + _failSafely(true); + } + } else { + if (_s.flashLoadTimeout === 0) { + } else { + _failSafely(true); + } + } + } + }, _s.flashLoadTimeout); + }; + _handleFocus = function() { + function cleanup() { + _event.remove(_win, 'focus', _handleFocus); + } + if (_isFocused || !_tryInitOnFocus) { + cleanup(); + return true; + } + _okToDisable = true; + _isFocused = true; + _waitingForEI = false; + _delayWaitForEI(); + cleanup(); + return true; + }; + _showSupport = function() { + }; + _initComplete = function(bNoDisable) { + if (_didInit) { + return false; + } + if (_s.html5Only) { + _didInit = true; + _initUserOnload(); + return true; + } + var wasTimeout = (_s.useFlashBlock && _s.flashLoadTimeout && !_s.getMoviePercent()), + result = true, + error; + if (!wasTimeout) { + _didInit = true; + if (_disabled) { + error = {type: (!_hasFlash && _needsFlash ? 'NO_FLASH' : 'INIT_TIMEOUT')}; + } + } + if (_disabled || bNoDisable) { + if (_s.useFlashBlock && _s.oMC) { + _s.oMC.className = _getSWFCSS() + ' ' + (_s.getMoviePercent() === null?_swfCSS.swfTimedout:_swfCSS.swfError); + } + _processOnEvents({type:'ontimeout', error:error, ignoreInit: true}); + _catchError(error); + result = false; + } else { + } + if (!_disabled) { + if (_s.waitForWindowLoad && !_windowLoaded) { + _event.add(_win, 'load', _initUserOnload); + } else { + _initUserOnload(); + } + } + return result; + }; + _setProperties = function() { + var i, + o = _s.setupOptions; + for (i in o) { + if (o.hasOwnProperty(i)) { + if (typeof _s[i] === 'undefined') { + _s[i] = o[i]; + } else if (_s[i] !== o[i]) { + _s.setupOptions[i] = _s[i]; + } + } + } + }; + _init = function() { + if (_didInit) { + return false; + } + function _cleanup() { + _event.remove(_win, 'load', _s.beginDelayedInit); + } + if (_s.html5Only) { + if (!_didInit) { + _cleanup(); + _s.enabled = true; + _initComplete(); + } + return true; + } + _initMovie(); + try { + _flash._externalInterfaceTest(false); + _setPolling(true, (_s.flashPollingInterval || (_s.useHighPerformance ? 10 : 50))); + if (!_s.debugMode) { + _flash._disableDebug(); + } + _s.enabled = true; + if (!_s.html5Only) { + _event.add(_win, 'unload', _doNothing); + } + } catch(e) { + _catchError({type:'JS_TO_FLASH_EXCEPTION', fatal:true}); + _failSafely(true); + _initComplete(); + return false; + } + _initComplete(); + _cleanup(); + return true; + }; + _domContentLoaded = function() { + if (_didDCLoaded) { + return false; + } + _didDCLoaded = true; + _setProperties(); + _initDebug(); + if (!_hasFlash && _s.hasHTML5) { + _s.setup({ + 'useHTML5Audio': true, + 'preferFlash': false + }); + } + _testHTML5(); + _s.html5.usingFlash = _featureCheck(); + _needsFlash = _s.html5.usingFlash; + _showSupport(); + if (!_hasFlash && _needsFlash) { + _s.setup({ + 'flashLoadTimeout': 1 + }); + } + if (_doc.removeEventListener) { + _doc.removeEventListener('DOMContentLoaded', _domContentLoaded, false); + } + _initMovie(); + return true; + }; + _domContentLoadedIE = function() { + if (_doc.readyState === 'complete') { + _domContentLoaded(); + _doc.detachEvent('onreadystatechange', _domContentLoadedIE); + } + return true; + }; + _winOnLoad = function() { + _windowLoaded = true; + _event.remove(_win, 'load', _winOnLoad); + }; + _detectFlash(); + _event.add(_win, 'focus', _handleFocus); + _event.add(_win, 'load', _delayWaitForEI); + _event.add(_win, 'load', _winOnLoad); + if (_doc.addEventListener) { + _doc.addEventListener('DOMContentLoaded', _domContentLoaded, false); + } else if (_doc.attachEvent) { + _doc.attachEvent('onreadystatechange', _domContentLoadedIE); + } else { + _catchError({type:'NO_DOM2_EVENTS', fatal:true}); + } +} +// SM2_DEFER details: http://www.schillmania.com/projects/soundmanager2/doc/getstarted/#lazy-loading +if (typeof SM2_DEFER === 'undefined' || !SM2_DEFER) { + soundManager = new SoundManager(); +} +window.SoundManager = SoundManager; +window.soundManager = soundManager; +}(window)); \ No newline at end of file diff --git a/timeside/static/timeside/js/libs/soundmanager2.js b/timeside/static/timeside/js/libs/soundmanager2.js new file mode 100755 index 0000000..d9d4422 --- /dev/null +++ b/timeside/static/timeside/js/libs/soundmanager2.js @@ -0,0 +1,5530 @@ +/** @license + * + * SoundManager 2: JavaScript Sound for the Web + * ---------------------------------------------- + * http://schillmania.com/projects/soundmanager2/ + * + * Copyright (c) 2007, Scott Schiller. All rights reserved. + * Code provided under the BSD License: + * http://schillmania.com/projects/soundmanager2/license.txt + * + * V2.97a.20120916 + */ + +/*global window, SM2_DEFER, sm2Debugger, console, document, navigator, setTimeout, setInterval, clearInterval, Audio */ +/*jslint regexp: true, sloppy: true, white: true, nomen: true, plusplus: true */ + +/** + * About this file + * --------------- + * This is the fully-commented source version of the SoundManager 2 API, + * recommended for use during development and testing. + * + * See soundmanager2-nodebug-jsmin.js for an optimized build (~11KB with gzip.) + * http://schillmania.com/projects/soundmanager2/doc/getstarted/#basic-inclusion + * Alternately, serve this file with gzip for 75% compression savings (~30KB over HTTP.) + * + * You may notice and comments in this source; these are delimiters for + * debug blocks which are removed in the -nodebug builds, further optimizing code size. + * + * Also, as you may note: Whoa, reliable cross-platform/device audio support is hard! ;) + */ + +(function(window) { + +var soundManager = null; + +/** + * The SoundManager constructor. + * + * @constructor + * @param {string} smURL Optional: Path to SWF files + * @param {string} smID Optional: The ID to use for the SWF container element + * @this {SoundManager} + * @return {SoundManager} The new SoundManager instance + */ + +function SoundManager(smURL, smID) { + + /** + * soundManager configuration options list + * defines top-level configuration properties to be applied to the soundManager instance (eg. soundManager.flashVersion) + * to set these properties, use the setup() method - eg., soundManager.setup({url: '/swf/', flashVersion: 9}) + */ + + this.setupOptions = { + + 'url': (smURL || null), // path (directory) where SoundManager 2 SWFs exist, eg., /path/to/swfs/ + 'flashVersion': 8, // flash build to use (8 or 9.) Some API features require 9. + 'debugMode': true, // enable debugging output (console.log() with HTML fallback) + 'debugFlash': false, // enable debugging output inside SWF, troubleshoot Flash/browser issues + 'useConsole': true, // use console.log() if available (otherwise, writes to #soundmanager-debug element) + 'consoleOnly': true, // if console is being used, do not create/write to #soundmanager-debug + 'waitForWindowLoad': false, // force SM2 to wait for window.onload() before trying to call soundManager.onload() + 'bgColor': '#ffffff', // SWF background color. N/A when wmode = 'transparent' + 'useHighPerformance': false, // position:fixed flash movie can help increase js/flash speed, minimize lag + 'flashPollingInterval': null, // msec affecting whileplaying/loading callback frequency. If null, default of 50 msec is used. + 'html5PollingInterval': null, // msec affecting whileplaying() for HTML5 audio, excluding mobile devices. If null, native HTML5 update events are used. + 'flashLoadTimeout': 1000, // msec to wait for flash movie to load before failing (0 = infinity) + 'wmode': null, // flash rendering mode - null, 'transparent', or 'opaque' (last two allow z-index to work) + 'allowScriptAccess': 'always', // for scripting the SWF (object/embed property), 'always' or 'sameDomain' + 'useFlashBlock': false, // *requires flashblock.css, see demos* - allow recovery from flash blockers. Wait indefinitely and apply timeout CSS to SWF, if applicable. + 'useHTML5Audio': true, // use HTML5 Audio() where API is supported (most Safari, Chrome versions), Firefox (no MP3/MP4.) Ideally, transparent vs. Flash API where possible. + 'html5Test': /^(probably|maybe)$/i, // HTML5 Audio() format support test. Use /^probably$/i; if you want to be more conservative. + 'preferFlash': true, // overrides useHTML5audio. if true and flash support present, will try to use flash for MP3/MP4 as needed since HTML5 audio support is still quirky in browsers. + 'noSWFCache': false // if true, appends ?ts={date} to break aggressive SWF caching. + + }; + + this.defaultOptions = { + + /** + * the default configuration for sound objects made with createSound() and related methods + * eg., volume, auto-load behaviour and so forth + */ + + 'autoLoad': false, // enable automatic loading (otherwise .load() will be called on demand with .play(), the latter being nicer on bandwidth - if you want to .load yourself, you also can) + 'autoPlay': false, // enable playing of file as soon as possible (much faster if "stream" is true) + 'from': null, // position to start playback within a sound (msec), default = beginning + 'loops': 1, // how many times to repeat the sound (position will wrap around to 0, setPosition() will break out of loop when >0) + 'onid3': null, // callback function for "ID3 data is added/available" + 'onload': null, // callback function for "load finished" + 'whileloading': null, // callback function for "download progress update" (X of Y bytes received) + 'onplay': null, // callback for "play" start + 'onpause': null, // callback for "pause" + 'onresume': null, // callback for "resume" (pause toggle) + 'whileplaying': null, // callback during play (position update) + 'onposition': null, // object containing times and function callbacks for positions of interest + 'onstop': null, // callback for "user stop" + 'onfailure': null, // callback function for when playing fails + 'onfinish': null, // callback function for "sound finished playing" + 'multiShot': true, // let sounds "restart" or layer on top of each other when played multiple times, rather than one-shot/one at a time + 'multiShotEvents': false, // fire multiple sound events (currently onfinish() only) when multiShot is enabled + 'position': null, // offset (milliseconds) to seek to within loaded sound data. + 'pan': 0, // "pan" settings, left-to-right, -100 to 100 + 'stream': true, // allows playing before entire file has loaded (recommended) + 'to': null, // position to end playback within a sound (msec), default = end + 'type': null, // MIME-like hint for file pattern / canPlay() tests, eg. audio/mp3 + 'usePolicyFile': false, // enable crossdomain.xml request for audio on remote domains (for ID3/waveform access) + 'volume': 100 // self-explanatory. 0-100, the latter being the max. + + }; + + this.flash9Options = { + + /** + * flash 9-only options, + * merged into defaultOptions if flash 9 is being used + */ + + 'isMovieStar': null, // "MovieStar" MPEG4 audio mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL + 'usePeakData': false, // enable left/right channel peak (level) data + 'useWaveformData': false, // enable sound spectrum (raw waveform data) - NOTE: May increase CPU load. + 'useEQData': false, // enable sound EQ (frequency spectrum data) - NOTE: May increase CPU load. + 'onbufferchange': null, // callback for "isBuffering" property change + 'ondataerror': null // callback for waveform/eq data access error (flash playing audio in other tabs/domains) + + }; + + this.movieStarOptions = { + + /** + * flash 9.0r115+ MPEG4 audio options, + * merged into defaultOptions if flash 9+movieStar mode is enabled + */ + + 'bufferTime': 3, // seconds of data to buffer before playback begins (null = flash default of 0.1 seconds - if AAC playback is gappy, try increasing.) + 'serverURL': null, // rtmp: FMS or FMIS server to connect to, required when requesting media via RTMP or one of its variants + 'onconnect': null, // rtmp: callback for connection to flash media server + 'duration': null // rtmp: song duration (msec) + + }; + + this.audioFormats = { + + /** + * determines HTML5 support + flash requirements. + * if no support (via flash and/or HTML5) for a "required" format, SM2 will fail to start. + * flash fallback is used for MP3 or MP4 if HTML5 can't play it (or if preferFlash = true) + */ + + 'mp3': { + 'type': ['audio/mpeg; codecs="mp3"', 'audio/mpeg', 'audio/mp3', 'audio/MPA', 'audio/mpa-robust'], + 'required': true + }, + + 'mp4': { + 'related': ['aac','m4a','m4b'], // additional formats under the MP4 container + 'type': ['audio/mp4; codecs="mp4a.40.2"', 'audio/aac', 'audio/x-m4a', 'audio/MP4A-LATM', 'audio/mpeg4-generic'], + 'required': false + }, + + 'ogg': { + 'type': ['audio/ogg; codecs=vorbis'], + 'required': false + }, + + 'wav': { + 'type': ['audio/wav; codecs="1"', 'audio/wav', 'audio/wave', 'audio/x-wav'], + 'required': false + } + + }; + + // HTML attributes (id + class names) for the SWF container + + this.movieID = 'sm2-container'; + this.id = (smID || 'sm2movie'); + + this.debugID = 'soundmanager-debug'; + this.debugURLParam = /([#?&])debug=1/i; + + // dynamic attributes + + this.versionNumber = 'V2.97a.20120916'; + this.version = null; + this.movieURL = null; + this.altURL = null; + this.swfLoaded = false; + this.enabled = false; + this.oMC = null; + this.sounds = {}; + this.soundIDs = []; + this.muted = false; + this.didFlashBlock = false; + this.filePattern = null; + + this.filePatterns = { + + 'flash8': /\.mp3(\?.*)?$/i, + 'flash9': /\.mp3(\?.*)?$/i + + }; + + // support indicators, set at init + + this.features = { + + 'buffering': false, + 'peakData': false, + 'waveformData': false, + 'eqData': false, + 'movieStar': false + + }; + + // flash sandbox info, used primarily in troubleshooting + + this.sandbox = { + + // + 'type': null, + 'types': { + 'remote': 'remote (domain-based) rules', + 'localWithFile': 'local with file access (no internet access)', + 'localWithNetwork': 'local with network (internet access only, no local access)', + 'localTrusted': 'local, trusted (local+internet access)' + }, + 'description': null, + 'noRemote': null, + 'noLocal': null + // + + }; + + /** + * basic HTML5 Audio() support test + * try...catch because of IE 9 "not implemented" nonsense + * https://github.com/Modernizr/Modernizr/issues/224 + */ + + this.hasHTML5 = (function() { + try { + // new Audio(null) for stupid Opera 9.64 case, which throws not_enough_arguments exception otherwise. + return (typeof Audio !== 'undefined' && typeof (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()).canPlayType !== 'undefined'); + } catch(e) { + return false; + } + }()); + + /** + * format support (html5/flash) + * stores canPlayType() results based on audioFormats. + * eg. { mp3: boolean, mp4: boolean } + * treat as read-only. + */ + + this.html5 = { + 'usingFlash': null // set if/when flash fallback is needed + }; + + // file type support hash + this.flash = {}; + + // determined at init time + this.html5Only = false; + + // used for special cases (eg. iPad/iPhone/palm OS?) + this.ignoreFlash = false; + + /** + * a few private internals (OK, a lot. :D) + */ + + var SMSound, + _s = this, _flash = null, _sm = 'soundManager', _smc = _sm+'::', _h5 = 'HTML5::', _id, _ua = navigator.userAgent, _win = window, _wl = _win.location.href.toString(), _doc = document, _doNothing, _setProperties, _init, _fV, _on_queue = [], _debugOpen = true, _debugTS, _didAppend = false, _appendSuccess = false, _didInit = false, _disabled = false, _windowLoaded = false, _wDS, _wdCount = 0, _initComplete, _mixin, _assign, _extraOptions, _addOnEvent, _processOnEvents, _initUserOnload, _delayWaitForEI, _waitForEI, _setVersionInfo, _handleFocus, _strings, _initMovie, _domContentLoaded, _winOnLoad, _didDCLoaded, _getDocument, _createMovie, _catchError, _setPolling, _initDebug, _debugLevels = ['log', 'info', 'warn', 'error'], _defaultFlashVersion = 8, _disableObject, _failSafely, _normalizeMovieURL, _oRemoved = null, _oRemovedHTML = null, _str, _flashBlockHandler, _getSWFCSS, _swfCSS, _toggleDebug, _loopFix, _policyFix, _complain, _idCheck, _waitingForEI = false, _initPending = false, _startTimer, _stopTimer, _timerExecute, _h5TimerCount = 0, _h5IntervalTimer = null, _parseURL, + _needsFlash = null, _featureCheck, _html5OK, _html5CanPlay, _html5Ext, _html5Unload, _domContentLoadedIE, _testHTML5, _event, _slice = Array.prototype.slice, _useGlobalHTML5Audio = false, _hasFlash, _detectFlash, _badSafariFix, _html5_events, _showSupport, + _is_iDevice = _ua.match(/(ipad|iphone|ipod)/i), _isIE = _ua.match(/msie/i), _isWebkit = _ua.match(/webkit/i), _isSafari = (_ua.match(/safari/i) && !_ua.match(/chrome/i)), _isOpera = (_ua.match(/opera/i)), + _mobileHTML5 = (_ua.match(/(mobile|pre\/|xoom)/i) || _is_iDevice), + _isBadSafari = (!_wl.match(/usehtml5audio/i) && !_wl.match(/sm2\-ignorebadua/i) && _isSafari && !_ua.match(/silk/i) && _ua.match(/OS X 10_6_([3-7])/i)), // Safari 4 and 5 (excluding Kindle Fire, "Silk") occasionally fail to load/play HTML5 audio on Snow Leopard 10.6.3 through 10.6.7 due to bug(s) in QuickTime X and/or other underlying frameworks. :/ Confirmed bug. https://bugs.webkit.org/show_bug.cgi?id=32159 + _hasConsole = (typeof console !== 'undefined' && typeof console.log !== 'undefined'), _isFocused = (typeof _doc.hasFocus !== 'undefined'?_doc.hasFocus():null), _tryInitOnFocus = (_isSafari && (typeof _doc.hasFocus === 'undefined' || !_doc.hasFocus())), _okToDisable = !_tryInitOnFocus, _flashMIME = /(mp3|mp4|mpa|m4a|m4b)/i, + _emptyURL = 'about:blank', // safe URL to unload, or load nothing from (flash 8 + most HTML5 UAs) + _overHTTP = (_doc.location?_doc.location.protocol.match(/http/i):null), + _http = (!_overHTTP ? 'http:/'+'/' : ''), + // mp3, mp4, aac etc. + _netStreamMimeTypes = /^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i, + // Flash v9.0r115+ "moviestar" formats + _netStreamTypes = ['mpeg4', 'aac', 'flv', 'mov', 'mp4', 'm4v', 'f4v', 'm4a', 'm4b', 'mp4v', '3gp', '3g2'], + _netStreamPattern = new RegExp('\\.(' + _netStreamTypes.join('|') + ')(\\?.*)?$', 'i'); + + this.mimePattern = /^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i; // default mp3 set + + // use altURL if not "online" + this.useAltURL = !_overHTTP; + + this._global_a = null; + + _swfCSS = { + + 'swfBox': 'sm2-object-box', + 'swfDefault': 'movieContainer', + 'swfError': 'swf_error', // SWF loaded, but SM2 couldn't start (other error) + 'swfTimedout': 'swf_timedout', + 'swfLoaded': 'swf_loaded', + 'swfUnblocked': 'swf_unblocked', // or loaded OK + 'sm2Debug': 'sm2_debug', + 'highPerf': 'high_performance', + 'flashDebug': 'flash_debug' + + }; + + if (_mobileHTML5) { + + // prefer HTML5 for mobile + tablet-like devices, probably more reliable vs. flash at this point. + _s.useHTML5Audio = true; + _s.preferFlash = false; + + if (_is_iDevice) { + // by default, use global feature. iOS onfinish() -> next may fail otherwise. + _s.ignoreFlash = true; + _useGlobalHTML5Audio = true; + } + + } + + /** + * Public SoundManager API + * ----------------------- + */ + + /** + * Configures top-level soundManager properties. + * + * @param {object} options Option parameters, eg. { flashVersion: 9, url: '/path/to/swfs/' } + * onready and ontimeout are also accepted parameters. call soundManager.setup() to see the full list. + */ + + this.setup = function(options) { + + var noURL = (!_s.url); + + // warn if flash options have already been applied + + if (typeof options !== 'undefined' && _didInit && _needsFlash && _s.ok() && (typeof options.flashVersion !== 'undefined' || typeof options.url !== 'undefined')) { + _complain(_str('setupLate')); + } + + // TODO: defer: true? + + _assign(options); + + // special case 1: "Late setup". SM2 loaded normally, but user didn't assign flash URL eg., setup({url:...}) before SM2 init. Treat as delayed init. + + if (noURL && _didDCLoaded && typeof options.url !== 'undefined') { + _s.beginDelayedInit(); + } + + // special case 2: If lazy-loading SM2 (DOMContentLoaded has already happened) and user calls setup() with url: parameter, try to init ASAP. + + if (!_didDCLoaded && typeof options.url !== 'undefined' && _doc.readyState === 'complete') { + setTimeout(_domContentLoaded, 1); + } + + return _s; + + }; + + this.ok = function() { + + return (_needsFlash?(_didInit && !_disabled):(_s.useHTML5Audio && _s.hasHTML5)); + + }; + + this.supported = this.ok; // legacy + + this.getMovie = function(smID) { + + // safety net: some old browsers differ on SWF references, possibly related to ExternalInterface / flash version + return _id(smID) || _doc[smID] || _win[smID]; + + }; + + /** + * Creates a SMSound sound object instance. + * + * @param {object} oOptions Sound options (at minimum, id and url parameters are required.) + * @return {object} SMSound The new SMSound object. + */ + + this.createSound = function(oOptions, _url) { + + var _cs, _cs_string, thisOptions = null, oSound = null, _tO = null; + + // + _cs = _sm+'.createSound(): '; + _cs_string = _cs + _str(!_didInit?'notReady':'notOK'); + // + + if (!_didInit || !_s.ok()) { + _complain(_cs_string); + return false; + } + + if (typeof _url !== 'undefined') { + // function overloading in JS! :) ..assume simple createSound(id,url) use case + oOptions = { + 'id': oOptions, + 'url': _url + }; + } + + // inherit from defaultOptions + thisOptions = _mixin(oOptions); + + thisOptions.url = _parseURL(thisOptions.url); + + // local shortcut + _tO = thisOptions; + + // + if (_tO.id.toString().charAt(0).match(/^[0-9]$/)) { + _s._wD(_cs + _str('badID', _tO.id), 2); + } + + _s._wD(_cs + _tO.id + ' (' + _tO.url + ')', 1); + // + + if (_idCheck(_tO.id, true)) { + _s._wD(_cs + _tO.id + ' exists', 1); + return _s.sounds[_tO.id]; + } + + function make() { + + thisOptions = _loopFix(thisOptions); + _s.sounds[_tO.id] = new SMSound(_tO); + _s.soundIDs.push(_tO.id); + return _s.sounds[_tO.id]; + + } + + if (_html5OK(_tO)) { + + oSound = make(); + _s._wD('Creating sound '+_tO.id+', using HTML5'); + oSound._setup_html5(_tO); + + } else { + + if (_fV > 8) { + if (_tO.isMovieStar === null) { + // attempt to detect MPEG-4 formats + _tO.isMovieStar = !!(_tO.serverURL || (_tO.type ? _tO.type.match(_netStreamMimeTypes) : false) || _tO.url.match(_netStreamPattern)); + } + // + if (_tO.isMovieStar) { + _s._wD(_cs + 'using MovieStar handling'); + if (_tO.loops > 1) { + _wDS('noNSLoop'); + } + } + // + } + + _tO = _policyFix(_tO, _cs); + oSound = make(); + + if (_fV === 8) { + _flash._createSound(_tO.id, _tO.loops||1, _tO.usePolicyFile); + } else { + _flash._createSound(_tO.id, _tO.url, _tO.usePeakData, _tO.useWaveformData, _tO.useEQData, _tO.isMovieStar, (_tO.isMovieStar?_tO.bufferTime:false), _tO.loops||1, _tO.serverURL, _tO.duration||null, _tO.autoPlay, true, _tO.autoLoad, _tO.usePolicyFile); + if (!_tO.serverURL) { + // We are connected immediately + oSound.connected = true; + if (_tO.onconnect) { + _tO.onconnect.apply(oSound); + } + } + } + + if (!_tO.serverURL && (_tO.autoLoad || _tO.autoPlay)) { + // call load for non-rtmp streams + oSound.load(_tO); + } + + } + + // rtmp will play in onconnect + if (!_tO.serverURL && _tO.autoPlay) { + oSound.play(); + } + + return oSound; + + }; + + /** + * Destroys a SMSound sound object instance. + * + * @param {string} sID The ID of the sound to destroy + */ + + this.destroySound = function(sID, _bFromSound) { + + // explicitly destroy a sound before normal page unload, etc. + + if (!_idCheck(sID)) { + return false; + } + + var oS = _s.sounds[sID], i; + + // Disable all callbacks while the sound is being destroyed + oS._iO = {}; + + oS.stop(); + oS.unload(); + + for (i = 0; i < _s.soundIDs.length; i++) { + if (_s.soundIDs[i] === sID) { + _s.soundIDs.splice(i, 1); + break; + } + } + + if (!_bFromSound) { + // ignore if being called from SMSound instance + oS.destruct(true); + } + + oS = null; + delete _s.sounds[sID]; + + return true; + + }; + + /** + * Calls the load() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {object} oOptions Optional: Sound options + */ + + this.load = function(sID, oOptions) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].load(oOptions); + + }; + + /** + * Calls the unload() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + */ + + this.unload = function(sID) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].unload(); + + }; + + /** + * Calls the onPosition() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {number} nPosition The position to watch for + * @param {function} oMethod The relevant callback to fire + * @param {object} oScope Optional: The scope to apply the callback to + * @return {SMSound} The SMSound object + */ + + this.onPosition = function(sID, nPosition, oMethod, oScope) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].onposition(nPosition, oMethod, oScope); + + }; + + // legacy/backwards-compability: lower-case method name + this.onposition = this.onPosition; + + /** + * Calls the clearOnPosition() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {number} nPosition The position to watch for + * @param {function} oMethod Optional: The relevant callback to fire + * @return {SMSound} The SMSound object + */ + + this.clearOnPosition = function(sID, nPosition, oMethod) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].clearOnPosition(nPosition, oMethod); + + }; + + /** + * Calls the play() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {object} oOptions Optional: Sound options + * @return {SMSound} The SMSound object + */ + + this.play = function(sID, oOptions) { + + var result = false; + + if (!_didInit || !_s.ok()) { + _complain(_sm+'.play(): ' + _str(!_didInit?'notReady':'notOK')); + return result; + } + + if (!_idCheck(sID)) { + if (!(oOptions instanceof Object)) { + // overloading use case: play('mySound','/path/to/some.mp3'); + oOptions = { + url: oOptions + }; + } + if (oOptions && oOptions.url) { + // overloading use case, create+play: .play('someID',{url:'/path/to.mp3'}); + _s._wD(_sm+'.play(): attempting to create "' + sID + '"', 1); + oOptions.id = sID; + result = _s.createSound(oOptions).play(); + } + return result; + } + + return _s.sounds[sID].play(oOptions); + + }; + + this.start = this.play; // just for convenience + + /** + * Calls the setPosition() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {number} nMsecOffset Position (milliseconds) + * @return {SMSound} The SMSound object + */ + + this.setPosition = function(sID, nMsecOffset) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].setPosition(nMsecOffset); + + }; + + /** + * Calls the stop() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @return {SMSound} The SMSound object + */ + + this.stop = function(sID) { + + if (!_idCheck(sID)) { + return false; + } + + _s._wD(_sm+'.stop(' + sID + ')', 1); + return _s.sounds[sID].stop(); + + }; + + /** + * Stops all currently-playing sounds. + */ + + this.stopAll = function() { + + var oSound; + _s._wD(_sm+'.stopAll()', 1); + + for (oSound in _s.sounds) { + if (_s.sounds.hasOwnProperty(oSound)) { + // apply only to sound objects + _s.sounds[oSound].stop(); + } + } + + }; + + /** + * Calls the pause() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @return {SMSound} The SMSound object + */ + + this.pause = function(sID) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].pause(); + + }; + + /** + * Pauses all currently-playing sounds. + */ + + this.pauseAll = function() { + + var i; + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].pause(); + } + + }; + + /** + * Calls the resume() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @return {SMSound} The SMSound object + */ + + this.resume = function(sID) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].resume(); + + }; + + /** + * Resumes all currently-paused sounds. + */ + + this.resumeAll = function() { + + var i; + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].resume(); + } + + }; + + /** + * Calls the togglePause() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @return {SMSound} The SMSound object + */ + + this.togglePause = function(sID) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].togglePause(); + + }; + + /** + * Calls the setPan() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {number} nPan The pan value (-100 to 100) + * @return {SMSound} The SMSound object + */ + + this.setPan = function(sID, nPan) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].setPan(nPan); + + }; + + /** + * Calls the setVolume() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @param {number} nVol The volume value (0 to 100) + * @return {SMSound} The SMSound object + */ + + this.setVolume = function(sID, nVol) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].setVolume(nVol); + + }; + + /** + * Calls the mute() method of either a single SMSound object by ID, or all sound objects. + * + * @param {string} sID Optional: The ID of the sound (if omitted, all sounds will be used.) + */ + + this.mute = function(sID) { + + var i = 0; + + if (typeof sID !== 'string') { + sID = null; + } + + if (!sID) { + _s._wD(_sm+'.mute(): Muting all sounds'); + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].mute(); + } + _s.muted = true; + } else { + if (!_idCheck(sID)) { + return false; + } + _s._wD(_sm+'.mute(): Muting "' + sID + '"'); + return _s.sounds[sID].mute(); + } + + return true; + + }; + + /** + * Mutes all sounds. + */ + + this.muteAll = function() { + + _s.mute(); + + }; + + /** + * Calls the unmute() method of either a single SMSound object by ID, or all sound objects. + * + * @param {string} sID Optional: The ID of the sound (if omitted, all sounds will be used.) + */ + + this.unmute = function(sID) { + + var i; + + if (typeof sID !== 'string') { + sID = null; + } + + if (!sID) { + + _s._wD(_sm+'.unmute(): Unmuting all sounds'); + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].unmute(); + } + _s.muted = false; + + } else { + + if (!_idCheck(sID)) { + return false; + } + _s._wD(_sm+'.unmute(): Unmuting "' + sID + '"'); + return _s.sounds[sID].unmute(); + + } + + return true; + + }; + + /** + * Unmutes all sounds. + */ + + this.unmuteAll = function() { + + _s.unmute(); + + }; + + /** + * Calls the toggleMute() method of a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @return {SMSound} The SMSound object + */ + + this.toggleMute = function(sID) { + + if (!_idCheck(sID)) { + return false; + } + return _s.sounds[sID].toggleMute(); + + }; + + /** + * Retrieves the memory used by the flash plugin. + * + * @return {number} The amount of memory in use + */ + + this.getMemoryUse = function() { + + // flash-only + var ram = 0; + + if (_flash && _fV !== 8) { + ram = parseInt(_flash._getMemoryUse(), 10); + } + + return ram; + + }; + + /** + * Undocumented: NOPs soundManager and all SMSound objects. + */ + + this.disable = function(bNoDisable) { + + // destroy all functions + var i; + + if (typeof bNoDisable === 'undefined') { + bNoDisable = false; + } + + if (_disabled) { + return false; + } + + _disabled = true; + _wDS('shutdown', 1); + + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _disableObject(_s.sounds[_s.soundIDs[i]]); + } + + // fire "complete", despite fail + _initComplete(bNoDisable); + _event.remove(_win, 'load', _initUserOnload); + + return true; + + }; + + /** + * Determines playability of a MIME type, eg. 'audio/mp3'. + */ + + this.canPlayMIME = function(sMIME) { + + var result; + + if (_s.hasHTML5) { + result = _html5CanPlay({type:sMIME}); + } + + if (!result && _needsFlash) { + // if flash 9, test netStream (movieStar) types as well. + result = (sMIME && _s.ok() ? !!((_fV > 8 ? sMIME.match(_netStreamMimeTypes) : null) || sMIME.match(_s.mimePattern)) : null); + } + + return result; + + }; + + /** + * Determines playability of a URL based on audio support. + * + * @param {string} sURL The URL to test + * @return {boolean} URL playability + */ + + this.canPlayURL = function(sURL) { + + var result; + + if (_s.hasHTML5) { + result = _html5CanPlay({url: sURL}); + } + + if (!result && _needsFlash) { + result = (sURL && _s.ok() ? !!(sURL.match(_s.filePattern)) : null); + } + + return result; + + }; + + /** + * Determines playability of an HTML DOM <a> object (or similar object literal) based on audio support. + * + * @param {object} oLink an HTML DOM <a> object or object literal including href and/or type attributes + * @return {boolean} URL playability + */ + + this.canPlayLink = function(oLink) { + + if (typeof oLink.type !== 'undefined' && oLink.type) { + if (_s.canPlayMIME(oLink.type)) { + return true; + } + } + + return _s.canPlayURL(oLink.href); + + }; + + /** + * Retrieves a SMSound object by ID. + * + * @param {string} sID The ID of the sound + * @return {SMSound} The SMSound object + */ + + this.getSoundById = function(sID, _suppressDebug) { + + if (!sID) { + throw new Error(_sm+'.getSoundById(): sID is null/undefined'); + } + + var result = _s.sounds[sID]; + + // + if (!result && !_suppressDebug) { + _s._wD('"' + sID + '" is an invalid sound ID.', 2); + } + // + + return result; + + }; + + /** + * Queues a callback for execution when SoundManager has successfully initialized. + * + * @param {function} oMethod The callback method to fire + * @param {object} oScope Optional: The scope to apply to the callback + */ + + this.onready = function(oMethod, oScope) { + + var sType = 'onready', + result = false; + + if (typeof oMethod === 'function') { + + // + if (_didInit) { + _s._wD(_str('queue', sType)); + } + // + + if (!oScope) { + oScope = _win; + } + + _addOnEvent(sType, oMethod, oScope); + _processOnEvents(); + + result = true; + + } else { + + throw _str('needFunction', sType); + + } + + return result; + + }; + + /** + * Queues a callback for execution when SoundManager has failed to initialize. + * + * @param {function} oMethod The callback method to fire + * @param {object} oScope Optional: The scope to apply to the callback + */ + + this.ontimeout = function(oMethod, oScope) { + + var sType = 'ontimeout', + result = false; + + if (typeof oMethod === 'function') { + + // + if (_didInit) { + _s._wD(_str('queue', sType)); + } + // + + if (!oScope) { + oScope = _win; + } + + _addOnEvent(sType, oMethod, oScope); + _processOnEvents({type:sType}); + + result = true; + + } else { + + throw _str('needFunction', sType); + + } + + return result; + + }; + + /** + * Writes console.log()-style debug output to a console or in-browser element. + * Applies when debugMode = true + * + * @param {string} sText The console message + * @param {string} sType Optional: Log type of 'info', 'warn' or 'error' + * @param {object} Optional: The scope to apply to the callback + */ + + this._writeDebug = function(sText, sType, _bTimestamp) { + + // pseudo-private console.log()-style output + // + + var sDID = 'soundmanager-debug', o, oItem, sMethod; + + if (!_s.debugMode) { + return false; + } + + if (typeof _bTimestamp !== 'undefined' && _bTimestamp) { + sText = sText + ' | ' + new Date().getTime(); + } + + if (_hasConsole && _s.useConsole) { + sMethod = _debugLevels[sType]; + if (typeof console[sMethod] !== 'undefined') { + console[sMethod](sText); + } else { + console.log(sText); + } + if (_s.consoleOnly) { + return true; + } + } + + try { + + o = _id(sDID); + + if (!o) { + return false; + } + + oItem = _doc.createElement('div'); + + if (++_wdCount % 2 === 0) { + oItem.className = 'sm2-alt'; + } + + if (typeof sType === 'undefined') { + sType = 0; + } else { + sType = parseInt(sType, 10); + } + + oItem.appendChild(_doc.createTextNode(sText)); + + if (sType) { + if (sType >= 2) { + oItem.style.fontWeight = 'bold'; + } + if (sType === 3) { + oItem.style.color = '#ff3333'; + } + } + + // top-to-bottom + // o.appendChild(oItem); + + // bottom-to-top + o.insertBefore(oItem, o.firstChild); + + } catch(e) { + // oh well + } + + o = null; + // + + return true; + + }; + + // alias + this._wD = this._writeDebug; + + /** + * Provides debug / state information on all SMSound objects. + */ + + this._debug = function() { + + // + var i, j; + _wDS('currentObj', 1); + + for (i = 0, j = _s.soundIDs.length; i < j; i++) { + _s.sounds[_s.soundIDs[i]]._debug(); + } + // + + }; + + /** + * Restarts and re-initializes the SoundManager instance. + */ + + this.reboot = function() { + + // attempt to reset and init SM2 + _s._wD(_sm+'.reboot()'); + + // + if (_s.soundIDs.length) { + _s._wD('Destroying ' + _s.soundIDs.length + ' SMSound objects...'); + } + // + + var i, j; + + for (i = _s.soundIDs.length-1; i >= 0; i--) { + _s.sounds[_s.soundIDs[i]].destruct(); + } + + // trash ze flash + + if (_flash) { + try { + if (_isIE) { + _oRemovedHTML = _flash.innerHTML; + } + _oRemoved = _flash.parentNode.removeChild(_flash); + _s._wD('Flash movie removed.'); + } catch(e) { + // uh-oh. + _wDS('badRemove', 2); + } + } + + // actually, force recreate of movie. + _oRemovedHTML = _oRemoved = _needsFlash = null; + + _s.enabled = _didDCLoaded = _didInit = _waitingForEI = _initPending = _didAppend = _appendSuccess = _disabled = _s.swfLoaded = false; + _s.soundIDs = []; + _s.sounds = {}; + _flash = null; + + for (i in _on_queue) { + if (_on_queue.hasOwnProperty(i)) { + for (j = _on_queue[i].length-1; j >= 0; j--) { + _on_queue[i][j].fired = false; + } + } + } + + _s._wD(_sm + ': Rebooting...'); + _win.setTimeout(_s.beginDelayedInit, 20); + + }; + + /** + * Undocumented: Determines the SM2 flash movie's load progress. + * + * @return {number or null} Percent loaded, or if invalid/unsupported, null. + */ + + this.getMoviePercent = function() { + + // interesting note: flash/ExternalInterface bridge methods are not typeof "function" nor instanceof Function, but are still valid. + return (_flash && typeof _flash.PercentLoaded !== 'undefined' ? _flash.PercentLoaded() : null); + + }; + + /** + * Additional helper for manually invoking SM2's init process after DOM Ready / window.onload(). + */ + + this.beginDelayedInit = function() { + + _windowLoaded = true; + _domContentLoaded(); + + setTimeout(function() { + + if (_initPending) { + return false; + } + + _createMovie(); + _initMovie(); + _initPending = true; + + return true; + + }, 20); + + _delayWaitForEI(); + + }; + + /** + * Destroys the SoundManager instance and all SMSound instances. + */ + + this.destruct = function() { + + _s._wD(_sm+'.destruct()'); + _s.disable(true); + + }; + + /** + * SMSound() (sound object) constructor + * ------------------------------------ + * + * @param {object} oOptions Sound options (id and url are required attributes) + * @return {SMSound} The new SMSound object + */ + + SMSound = function(oOptions) { + + var _t = this, _resetProperties, _add_html5_events, _remove_html5_events, _stop_html5_timer, _start_html5_timer, _attachOnPosition, _onplay_called = false, _onPositionItems = [], _onPositionFired = 0, _detachOnPosition, _applyFromTo, _lastURL = null, _lastHTML5State; + + _lastHTML5State = { + // tracks duration + position (time) + duration: null, + time: null + }; + + this.id = oOptions.id; + + // legacy + this.sID = this.id; + + this.url = oOptions.url; + this.options = _mixin(oOptions); + + // per-play-instance-specific options + this.instanceOptions = this.options; + + // short alias + this._iO = this.instanceOptions; + + // assign property defaults + this.pan = this.options.pan; + this.volume = this.options.volume; + + // whether or not this object is using HTML5 + this.isHTML5 = false; + + // internal HTML5 Audio() object reference + this._a = null; + + /** + * SMSound() public methods + * ------------------------ + */ + + this.id3 = {}; + + /** + * Writes SMSound object parameters to debug console + */ + + this._debug = function() { + + // + // pseudo-private console.log()-style output + + if (_s.debugMode) { + + var stuff = null, msg = [], sF, sfBracket, maxLength = 64; + + for (stuff in _t.options) { + if (_t.options[stuff] !== null) { + if (typeof _t.options[stuff] === 'function') { + // handle functions specially + sF = _t.options[stuff].toString(); + // normalize spaces + sF = sF.replace(/\s\s+/g, ' '); + sfBracket = sF.indexOf('{'); + msg.push(' ' + stuff + ': {' + sF.substr(sfBracket + 1, (Math.min(Math.max(sF.indexOf('\n') - 1, maxLength), maxLength))).replace(/\n/g, '') + '... }'); + } else { + msg.push(' ' + stuff + ': ' + _t.options[stuff]); + } + } + } + + _s._wD('SMSound() merged options: {\n' + msg.join(', \n') + '\n}'); + + } + // + + }; + + // + this._debug(); + // + + /** + * Begins loading a sound per its *url*. + * + * @param {object} oOptions Optional: Sound options + * @return {SMSound} The SMSound object + */ + + this.load = function(oOptions) { + + var oS = null, _iO; + + if (typeof oOptions !== 'undefined') { + _t._iO = _mixin(oOptions, _t.options); + _t.instanceOptions = _t._iO; + } else { + oOptions = _t.options; + _t._iO = oOptions; + _t.instanceOptions = _t._iO; + if (_lastURL && _lastURL !== _t.url) { + _wDS('manURL'); + _t._iO.url = _t.url; + _t.url = null; + } + } + + if (!_t._iO.url) { + _t._iO.url = _t.url; + } + + _t._iO.url = _parseURL(_t._iO.url); + + _s._wD('SMSound.load(): ' + _t._iO.url, 1); + + if (_t._iO.url === _t.url && _t.readyState !== 0 && _t.readyState !== 2) { + _wDS('onURL', 1); + // if loaded and an onload() exists, fire immediately. + if (_t.readyState === 3 && _t._iO.onload) { + // assume success based on truthy duration. + _t._iO.onload.apply(_t, [(!!_t.duration)]); + } + return _t; + } + + // local shortcut + _iO = _t._iO; + + // make a local copy of the old url before we re-assign it + _lastURL = (_t.url && _t.url.toString ? _t.url.toString() : null); + + // reset a few state properties + + _t.loaded = false; + _t.readyState = 1; + _t.playState = 0; + _t.id3 = {}; + + // TODO: If switching from HTML5 -> flash (or vice versa), stop currently-playing audio. + + if (_html5OK(_iO)) { + + oS = _t._setup_html5(_iO); + + if (!oS._called_load) { + + _s._wD(_h5+'load: '+_t.id); + + _t._html5_canplay = false; + + // TODO: review called_load / html5_canplay logic + + // if url provided directly to load(), assign it here. + + if (_t._a.src !== _iO.url) { + + _s._wD(_wDS('manURL') + ': ' + _iO.url); + + _t._a.src = _iO.url; + + // TODO: review / re-apply all relevant options (volume, loop, onposition etc.) + + // reset position for new URL + _t.setPosition(0); + + } + + // given explicit load call, try to preload. + + // early HTML5 implementation (non-standard) + _t._a.autobuffer = 'auto'; + + // standard + _t._a.preload = 'auto'; + + oS._called_load = true; + + if (_iO.autoPlay) { + _t.play(); + } + + } else { + + _s._wD(_h5+'ignoring request to load again: '+_t.id); + + } + + } else { + + try { + _t.isHTML5 = false; + _t._iO = _policyFix(_loopFix(_iO)); + // re-assign local shortcut + _iO = _t._iO; + if (_fV === 8) { + _flash._load(_t.id, _iO.url, _iO.stream, _iO.autoPlay, (_iO.whileloading?1:0), _iO.loops||1, _iO.usePolicyFile); + } else { + _flash._load(_t.id, _iO.url, !!(_iO.stream), !!(_iO.autoPlay), _iO.loops||1, !!(_iO.autoLoad), _iO.usePolicyFile); + } + } catch(e) { + _wDS('smError', 2); + _debugTS('onload', false); + _catchError({type:'SMSOUND_LOAD_JS_EXCEPTION', fatal:true}); + + } + + } + + // after all of this, ensure sound url is up to date. + _t.url = _iO.url; + + return _t; + + }; + + /** + * Unloads a sound, canceling any open HTTP requests. + * + * @return {SMSound} The SMSound object + */ + + this.unload = function() { + + // Flash 8/AS2 can't "close" a stream - fake it by loading an empty URL + // Flash 9/AS3: Close stream, preventing further load + // HTML5: Most UAs will use empty URL + + if (_t.readyState !== 0) { + + _s._wD('SMSound.unload(): "' + _t.id + '"'); + + if (!_t.isHTML5) { + + if (_fV === 8) { + _flash._unload(_t.id, _emptyURL); + } else { + _flash._unload(_t.id); + } + + } else { + + _stop_html5_timer(); + + if (_t._a) { + + _t._a.pause(); + _html5Unload(_t._a, _emptyURL); + + // reset local URL for next load / play call, too + _t.url = _emptyURL; + + } + + } + + // reset load/status flags + _resetProperties(); + + } + + return _t; + + }; + + /** + * Unloads and destroys a sound. + */ + + this.destruct = function(_bFromSM) { + + _s._wD('SMSound.destruct(): "' + _t.id + '"'); + + if (!_t.isHTML5) { + + // kill sound within Flash + // Disable the onfailure handler + _t._iO.onfailure = null; + _flash._destroySound(_t.id); + + } else { + + _stop_html5_timer(); + + if (_t._a) { + _t._a.pause(); + _html5Unload(_t._a); + if (!_useGlobalHTML5Audio) { + _remove_html5_events(); + } + // break obvious circular reference + _t._a._t = null; + _t._a = null; + } + + } + + if (!_bFromSM) { + // ensure deletion from controller + _s.destroySound(_t.id, true); + + } + + }; + + /** + * Begins playing a sound. + * + * @param {object} oOptions Optional: Sound options + * @return {SMSound} The SMSound object + */ + + this.play = function(oOptions, _updatePlayState) { + + var fN, allowMulti, a, onready, startOK = true, + exit = null; + + // + fN = 'SMSound.play(): '; + // + + // default to true + _updatePlayState = (typeof _updatePlayState === 'undefined' ? true : _updatePlayState); + + if (!oOptions) { + oOptions = {}; + } + + // first, use local URL (if specified) + if (_t.url) { + _t._iO.url = _t.url; + } + + // mix in any options defined at createSound() + _t._iO = _mixin(_t._iO, _t.options); + + // mix in any options specific to this method + _t._iO = _mixin(oOptions, _t._iO); + + _t._iO.url = _parseURL(_t._iO.url); + + _t.instanceOptions = _t._iO; + + // RTMP-only + if (_t._iO.serverURL && !_t.connected) { + if (!_t.getAutoPlay()) { + _s._wD(fN+' Netstream not connected yet - setting autoPlay'); + _t.setAutoPlay(true); + } + // play will be called in _onconnect() + return _t; + } + + if (_html5OK(_t._iO)) { + _t._setup_html5(_t._iO); + _start_html5_timer(); + } + + if (_t.playState === 1 && !_t.paused) { + allowMulti = _t._iO.multiShot; + if (!allowMulti) { + _s._wD(fN + '"' + _t.id + '" already playing (one-shot)', 1); + exit = _t; + } else { + _s._wD(fN + '"' + _t.id + '" already playing (multi-shot)', 1); + } + } + + if (exit !== null) { + return exit; + } + + // edge case: play() with explicit URL parameter + if (oOptions.url && oOptions.url !== _t.url) { + // load using merged options + _t.load(_t._iO); + } + + if (!_t.loaded) { + + if (_t.readyState === 0) { + + _s._wD(fN + 'Attempting to load "' + _t.id + '"', 1); + + // try to get this sound playing ASAP + if (!_t.isHTML5) { + // assign directly because setAutoPlay() increments the instanceCount + _t._iO.autoPlay = true; + _t.load(_t._iO); + } else { + // iOS needs this when recycling sounds, loading a new URL on an existing object. + _t.load(_t._iO); + } + + } else if (_t.readyState === 2) { + + _s._wD(fN + 'Could not load "' + _t.id + '" - exiting', 2); + exit = _t; + + } else { + + _s._wD(fN + '"' + _t.id + '" is loading - attempting to play..', 1); + + } + + } else { + + _s._wD(fN + '"' + _t.id + '"'); + + } + + if (exit !== null) { + return exit; + } + + if (!_t.isHTML5 && _fV === 9 && _t.position > 0 && _t.position === _t.duration) { + // flash 9 needs a position reset if play() is called while at the end of a sound. + _s._wD(fN + '"' + _t.id + '": Sound at end, resetting to position:0'); + oOptions.position = 0; + } + + /** + * Streams will pause when their buffer is full if they are being loaded. + * In this case paused is true, but the song hasn't started playing yet. + * If we just call resume() the onplay() callback will never be called. + * So only call resume() if the position is > 0. + * Another reason is because options like volume won't have been applied yet. + * For normal sounds, just resume. + */ + + if (_t.paused && _t.position >= 0 && (!_t._iO.serverURL || _t.position > 0)) { + + // https://gist.github.com/37b17df75cc4d7a90bf6 + _s._wD(fN + '"' + _t.id + '" is resuming from paused state',1); + _t.resume(); + + } else { + + _t._iO = _mixin(oOptions, _t._iO); + + // apply from/to parameters, if they exist (and not using RTMP) + if (_t._iO.from !== null && _t._iO.to !== null && _t.instanceCount === 0 && _t.playState === 0 && !_t._iO.serverURL) { + + onready = function() { + // sound "canplay" or onload() + // re-apply from/to to instance options, and start playback + _t._iO = _mixin(oOptions, _t._iO); + _t.play(_t._iO); + }; + + // HTML5 needs to at least have "canplay" fired before seeking. + if (_t.isHTML5 && !_t._html5_canplay) { + + // this hasn't been loaded yet. load it first, and then do this again. + _s._wD(fN+'Beginning load of "'+ _t.id+'" for from/to case'); + + _t.load({ + _oncanplay: onready + }); + + exit = false; + + } else if (!_t.isHTML5 && !_t.loaded && (!_t.readyState || _t.readyState !== 2)) { + + // to be safe, preload the whole thing in Flash. + + _s._wD(fN+'Preloading "'+ _t.id+'" for from/to case'); + + _t.load({ + onload: onready + }); + + exit = false; + + } + + if (exit !== null) { + return exit; + } + + // otherwise, we're ready to go. re-apply local options, and continue + + _t._iO = _applyFromTo(); + + } + + _s._wD(fN+'"'+ _t.id+'" is starting to play'); + + if (!_t.instanceCount || _t._iO.multiShotEvents || (!_t.isHTML5 && _fV > 8 && !_t.getAutoPlay())) { + _t.instanceCount++; + } + + // if first play and onposition parameters exist, apply them now + if (_t._iO.onposition && _t.playState === 0) { + _attachOnPosition(_t); + } + + _t.playState = 1; + _t.paused = false; + + _t.position = (typeof _t._iO.position !== 'undefined' && !isNaN(_t._iO.position) ? _t._iO.position : 0); + + if (!_t.isHTML5) { + _t._iO = _policyFix(_loopFix(_t._iO)); + } + + if (_t._iO.onplay && _updatePlayState) { + _t._iO.onplay.apply(_t); + _onplay_called = true; + } + + _t.setVolume(_t._iO.volume, true); + _t.setPan(_t._iO.pan, true); + + if (!_t.isHTML5) { + + startOK = _flash._start(_t.id, _t._iO.loops || 1, (_fV === 9 ? _t._iO.position : _t._iO.position / 1000), _t._iO.multiShot); + + if (_fV === 9 && !startOK) { + // edge case: no sound hardware, or 32-channel flash ceiling hit. + // applies only to Flash 9, non-NetStream/MovieStar sounds. + // http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html#play%28%29 + _s._wD(fN+ _t.id+': No sound hardware, or 32-sound ceiling hit'); + if (_t._iO.onplayerror) { + _t._iO.onplayerror.apply(_t); + } + + } + + } else { + + _start_html5_timer(); + + a = _t._setup_html5(); + + _t.setPosition(_t._iO.position); + + a.play(); + + } + + } + + return _t; + + }; + + // just for convenience + this.start = this.play; + + /** + * Stops playing a sound (and optionally, all sounds) + * + * @param {boolean} bAll Optional: Whether to stop all sounds + * @return {SMSound} The SMSound object + */ + + this.stop = function(bAll) { + + var _iO = _t._iO, _oP; + + if (_t.playState === 1) { + + _t._onbufferchange(0); + _t._resetOnPosition(0); + _t.paused = false; + + if (!_t.isHTML5) { + _t.playState = 0; + } + + // remove onPosition listeners, if any + _detachOnPosition(); + + // and "to" position, if set + if (_iO.to) { + _t.clearOnPosition(_iO.to); + } + + if (!_t.isHTML5) { + + _flash._stop(_t.id, bAll); + + // hack for netStream: just unload + if (_iO.serverURL) { + _t.unload(); + } + + } else { + + if (_t._a) { + + _oP = _t.position; + + // act like Flash, though + _t.setPosition(0); + + // hack: reflect old position for onstop() (also like Flash) + _t.position = _oP; + + // html5 has no stop() + // NOTE: pausing means iOS requires interaction to resume. + _t._a.pause(); + + _t.playState = 0; + + // and update UI + _t._onTimer(); + + _stop_html5_timer(); + + } + + } + + _t.instanceCount = 0; + _t._iO = {}; + + if (_iO.onstop) { + _iO.onstop.apply(_t); + } + + } + + return _t; + + }; + + /** + * Undocumented/internal: Sets autoPlay for RTMP. + * + * @param {boolean} autoPlay state + */ + + this.setAutoPlay = function(autoPlay) { + + _s._wD('sound '+_t.id+' turned autoplay ' + (autoPlay ? 'on' : 'off')); + _t._iO.autoPlay = autoPlay; + + if (!_t.isHTML5) { + _flash._setAutoPlay(_t.id, autoPlay); + if (autoPlay) { + // only increment the instanceCount if the sound isn't loaded (TODO: verify RTMP) + if (!_t.instanceCount && _t.readyState === 1) { + _t.instanceCount++; + _s._wD('sound '+_t.id+' incremented instance count to '+_t.instanceCount); + } + } + } + + }; + + /** + * Undocumented/internal: Returns the autoPlay boolean. + * + * @return {boolean} The current autoPlay value + */ + + this.getAutoPlay = function() { + + return _t._iO.autoPlay; + + }; + + /** + * Sets the position of a sound. + * + * @param {number} nMsecOffset Position (milliseconds) + * @return {SMSound} The SMSound object + */ + + this.setPosition = function(nMsecOffset) { + + if (typeof nMsecOffset === 'undefined') { + nMsecOffset = 0; + } + + var original_pos, + position, position1K, + // Use the duration from the instance options, if we don't have a track duration yet. + // position >= 0 and <= current available (loaded) duration + offset = (_t.isHTML5 ? Math.max(nMsecOffset, 0) : Math.min(_t.duration || _t._iO.duration, Math.max(nMsecOffset, 0))); + + original_pos = _t.position; + _t.position = offset; + position1K = _t.position/1000; + _t._resetOnPosition(_t.position); + _t._iO.position = offset; + + if (!_t.isHTML5) { + + position = (_fV === 9 ? _t.position : position1K); + if (_t.readyState && _t.readyState !== 2) { + // if paused or not playing, will not resume (by playing) + _flash._setPosition(_t.id, position, (_t.paused || !_t.playState), _t._iO.multiShot); + } + + } else if (_t._a) { + + // Set the position in the canplay handler if the sound is not ready yet + if (_t._html5_canplay) { + if (_t._a.currentTime !== position1K) { + /** + * DOM/JS errors/exceptions to watch out for: + * if seek is beyond (loaded?) position, "DOM exception 11" + * "INDEX_SIZE_ERR": DOM exception 1 + */ + _s._wD('setPosition('+position1K+'): setting position'); + try { + _t._a.currentTime = position1K; + if (_t.playState === 0 || _t.paused) { + // allow seek without auto-play/resume + _t._a.pause(); + } + } catch(e) { + _s._wD('setPosition('+position1K+'): setting position failed: '+e.message, 2); + } + } + } else { + _s._wD('setPosition('+position1K+'): delaying, sound not ready'); + } + + } + + if (_t.isHTML5) { + if (_t.paused) { + // if paused, refresh UI right away + // force update + _t._onTimer(true); + } + } + + return _t; + + }; + + /** + * Pauses sound playback. + * + * @return {SMSound} The SMSound object + */ + + this.pause = function(_bCallFlash) { + + if (_t.paused || (_t.playState === 0 && _t.readyState !== 1)) { + return _t; + } + + _s._wD('SMSound.pause()'); + _t.paused = true; + + if (!_t.isHTML5) { + if (_bCallFlash || typeof _bCallFlash === 'undefined') { + _flash._pause(_t.id, _t._iO.multiShot); + } + } else { + _t._setup_html5().pause(); + _stop_html5_timer(); + } + + if (_t._iO.onpause) { + _t._iO.onpause.apply(_t); + } + + return _t; + + }; + + /** + * Resumes sound playback. + * + * @return {SMSound} The SMSound object + */ + + /** + * When auto-loaded streams pause on buffer full they have a playState of 0. + * We need to make sure that the playState is set to 1 when these streams "resume". + * When a paused stream is resumed, we need to trigger the onplay() callback if it + * hasn't been called already. In this case since the sound is being played for the + * first time, I think it's more appropriate to call onplay() rather than onresume(). + */ + + this.resume = function() { + + var _iO = _t._iO; + + if (!_t.paused) { + return _t; + } + + _s._wD('SMSound.resume()'); + _t.paused = false; + _t.playState = 1; + + if (!_t.isHTML5) { + if (_iO.isMovieStar && !_iO.serverURL) { + // Bizarre Webkit bug (Chrome reported via 8tracks.com dudes): AAC content paused for 30+ seconds(?) will not resume without a reposition. + _t.setPosition(_t.position); + } + // flash method is toggle-based (pause/resume) + _flash._pause(_t.id, _iO.multiShot); + } else { + _t._setup_html5().play(); + _start_html5_timer(); + } + + if (!_onplay_called && _iO.onplay) { + _iO.onplay.apply(_t); + _onplay_called = true; + } else if (_iO.onresume) { + _iO.onresume.apply(_t); + } + + return _t; + + }; + + /** + * Toggles sound playback. + * + * @return {SMSound} The SMSound object + */ + + this.togglePause = function() { + + _s._wD('SMSound.togglePause()'); + + if (_t.playState === 0) { + _t.play({ + position: (_fV === 9 && !_t.isHTML5 ? _t.position : _t.position / 1000) + }); + return _t; + } + + if (_t.paused) { + _t.resume(); + } else { + _t.pause(); + } + + return _t; + + }; + + /** + * Sets the panning (L-R) effect. + * + * @param {number} nPan The pan value (-100 to 100) + * @return {SMSound} The SMSound object + */ + + this.setPan = function(nPan, bInstanceOnly) { + + if (typeof nPan === 'undefined') { + nPan = 0; + } + + if (typeof bInstanceOnly === 'undefined') { + bInstanceOnly = false; + } + + if (!_t.isHTML5) { + _flash._setPan(_t.id, nPan); + } // else { no HTML5 pan? } + + _t._iO.pan = nPan; + + if (!bInstanceOnly) { + _t.pan = nPan; + _t.options.pan = nPan; + } + + return _t; + + }; + + /** + * Sets the volume. + * + * @param {number} nVol The volume value (0 to 100) + * @return {SMSound} The SMSound object + */ + + this.setVolume = function(nVol, _bInstanceOnly) { + + /** + * Note: Setting volume has no effect on iOS "special snowflake" devices. + * Hardware volume control overrides software, and volume + * will always return 1 per Apple docs. (iOS 4 + 5.) + * http://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/HTML-canvas-guide/AddingSoundtoCanvasAnimations/AddingSoundtoCanvasAnimations.html + */ + + if (typeof nVol === 'undefined') { + nVol = 100; + } + + if (typeof _bInstanceOnly === 'undefined') { + _bInstanceOnly = false; + } + + if (!_t.isHTML5) { + _flash._setVolume(_t.id, (_s.muted && !_t.muted) || _t.muted?0:nVol); + } else if (_t._a) { + // valid range: 0-1 + _t._a.volume = Math.max(0, Math.min(1, nVol/100)); + } + + _t._iO.volume = nVol; + + if (!_bInstanceOnly) { + _t.volume = nVol; + _t.options.volume = nVol; + } + + return _t; + + }; + + /** + * Mutes the sound. + * + * @return {SMSound} The SMSound object + */ + + this.mute = function() { + + _t.muted = true; + + if (!_t.isHTML5) { + _flash._setVolume(_t.id, 0); + } else if (_t._a) { + _t._a.muted = true; + } + + return _t; + + }; + + /** + * Unmutes the sound. + * + * @return {SMSound} The SMSound object + */ + + this.unmute = function() { + + _t.muted = false; + var hasIO = (typeof _t._iO.volume !== 'undefined'); + + if (!_t.isHTML5) { + _flash._setVolume(_t.id, hasIO?_t._iO.volume:_t.options.volume); + } else if (_t._a) { + _t._a.muted = false; + } + + return _t; + + }; + + /** + * Toggles the muted state of a sound. + * + * @return {SMSound} The SMSound object + */ + + this.toggleMute = function() { + + return (_t.muted?_t.unmute():_t.mute()); + + }; + + /** + * Registers a callback to be fired when a sound reaches a given position during playback. + * + * @param {number} nPosition The position to watch for + * @param {function} oMethod The relevant callback to fire + * @param {object} oScope Optional: The scope to apply the callback to + * @return {SMSound} The SMSound object + */ + + this.onPosition = function(nPosition, oMethod, oScope) { + + // TODO: basic dupe checking? + + _onPositionItems.push({ + position: parseInt(nPosition, 10), + method: oMethod, + scope: (typeof oScope !== 'undefined' ? oScope : _t), + fired: false + }); + + return _t; + + }; + + // legacy/backwards-compability: lower-case method name + this.onposition = this.onPosition; + + /** + * Removes registered callback(s) from a sound, by position and/or callback. + * + * @param {number} nPosition The position to clear callback(s) for + * @param {function} oMethod Optional: Identify one callback to be removed when multiple listeners exist for one position + * @return {SMSound} The SMSound object + */ + + this.clearOnPosition = function(nPosition, oMethod) { + + var i; + + nPosition = parseInt(nPosition, 10); + + if (isNaN(nPosition)) { + // safety check + return false; + } + + for (i=0; i < _onPositionItems.length; i++) { + + if (nPosition === _onPositionItems[i].position) { + // remove this item if no method was specified, or, if the method matches + if (!oMethod || (oMethod === _onPositionItems[i].method)) { + if (_onPositionItems[i].fired) { + // decrement "fired" counter, too + _onPositionFired--; + } + _onPositionItems.splice(i, 1); + } + } + + } + + }; + + this._processOnPosition = function() { + + var i, item, j = _onPositionItems.length; + + if (!j || !_t.playState || _onPositionFired >= j) { + return false; + } + + for (i=j-1; i >= 0; i--) { + item = _onPositionItems[i]; + if (!item.fired && _t.position >= item.position) { + item.fired = true; + _onPositionFired++; + item.method.apply(item.scope, [item.position]); + } + } + + return true; + + }; + + this._resetOnPosition = function(nPosition) { + + // reset "fired" for items interested in this position + var i, item, j = _onPositionItems.length; + + if (!j) { + return false; + } + + for (i=j-1; i >= 0; i--) { + item = _onPositionItems[i]; + if (item.fired && nPosition <= item.position) { + item.fired = false; + _onPositionFired--; + } + } + + return true; + + }; + + /** + * SMSound() private internals + * -------------------------------- + */ + + _applyFromTo = function() { + + var _iO = _t._iO, + f = _iO.from, + t = _iO.to, + start, end; + + end = function() { + + // end has been reached. + _s._wD(_t.id + ': "to" time of ' + t + ' reached.'); + + // detach listener + _t.clearOnPosition(t, end); + + // stop should clear this, too + _t.stop(); + + }; + + start = function() { + + _s._wD(_t.id + ': playing "from" ' + f); + + // add listener for end + if (t !== null && !isNaN(t)) { + _t.onPosition(t, end); + } + + }; + + if (f !== null && !isNaN(f)) { + + // apply to instance options, guaranteeing correct start position. + _iO.position = f; + + // multiShot timing can't be tracked, so prevent that. + _iO.multiShot = false; + + start(); + + } + + // return updated instanceOptions including starting position + return _iO; + + }; + + _attachOnPosition = function() { + + var item, + op = _t._iO.onposition; + + // attach onposition things, if any, now. + + if (op) { + + for (item in op) { + if (op.hasOwnProperty(item)) { + _t.onPosition(parseInt(item, 10), op[item]); + } + } + + } + + }; + + _detachOnPosition = function() { + + var item, + op = _t._iO.onposition; + + // detach any onposition()-style listeners. + + if (op) { + + for (item in op) { + if (op.hasOwnProperty(item)) { + _t.clearOnPosition(parseInt(item, 10)); + } + } + + } + + }; + + _start_html5_timer = function() { + + if (_t.isHTML5) { + _startTimer(_t); + } + + }; + + _stop_html5_timer = function() { + + if (_t.isHTML5) { + _stopTimer(_t); + } + + }; + + _resetProperties = function(retainPosition) { + + if (!retainPosition) { + _onPositionItems = []; + _onPositionFired = 0; + } + + _onplay_called = false; + + _t._hasTimer = null; + _t._a = null; + _t._html5_canplay = false; + _t.bytesLoaded = null; + _t.bytesTotal = null; + _t.duration = (_t._iO && _t._iO.duration ? _t._iO.duration : null); + _t.durationEstimate = null; + _t.buffered = []; + + // legacy: 1D array + _t.eqData = []; + + _t.eqData.left = []; + _t.eqData.right = []; + + _t.failures = 0; + _t.isBuffering = false; + _t.instanceOptions = {}; + _t.instanceCount = 0; + _t.loaded = false; + _t.metadata = {}; + + // 0 = uninitialised, 1 = loading, 2 = failed/error, 3 = loaded/success + _t.readyState = 0; + + _t.muted = false; + _t.paused = false; + + _t.peakData = { + left: 0, + right: 0 + }; + + _t.waveformData = { + left: [], + right: [] + }; + + _t.playState = 0; + _t.position = null; + + _t.id3 = {}; + + }; + + _resetProperties(); + + /** + * Pseudo-private SMSound internals + * -------------------------------- + */ + + this._onTimer = function(bForce) { + + /** + * HTML5-only _whileplaying() etc. + * called from both HTML5 native events, and polling/interval-based timers + * mimics flash and fires only when time/duration change, so as to be polling-friendly + */ + + var duration, isNew = false, time, x = {}; + + if (_t._hasTimer || bForce) { + + // TODO: May not need to track readyState (1 = loading) + + if (_t._a && (bForce || ((_t.playState > 0 || _t.readyState === 1) && !_t.paused))) { + + duration = _t._get_html5_duration(); + + if (duration !== _lastHTML5State.duration) { + + _lastHTML5State.duration = duration; + _t.duration = duration; + isNew = true; + + } + + // TODO: investigate why this goes wack if not set/re-set each time. + _t.durationEstimate = _t.duration; + + time = (_t._a.currentTime * 1000 || 0); + + if (time !== _lastHTML5State.time) { + + _lastHTML5State.time = time; + isNew = true; + + } + + if (isNew || bForce) { + + _t._whileplaying(time,x,x,x,x); + + } + + }/* else { + + // _s._wD('_onTimer: Warn for "'+_t.id+'": '+(!_t._a?'Could not find element. ':'')+(_t.playState === 0?'playState bad, 0?':'playState = '+_t.playState+', OK')); + + return false; + + }*/ + + return isNew; + + } + + }; + + this._get_html5_duration = function() { + + var _iO = _t._iO, + // if audio object exists, use its duration - else, instance option duration (if provided - it's a hack, really, and should be retired) OR null + d = (_t._a && _t._a.duration ? _t._a.duration*1000 : (_iO && _iO.duration ? _iO.duration : null)), + result = (d && !isNaN(d) && d !== Infinity ? d : null); + + return result; + + }; + + this._apply_loop = function(a, nLoops) { + + /** + * boolean instead of "loop", for webkit? - spec says string. http://www.w3.org/TR/html-markup/audio.html#audio.attrs.loop + * note that loop is either off or infinite under HTML5, unlike Flash which allows arbitrary loop counts to be specified. + */ + + // + if (!a.loop && nLoops > 1) { + _s._wD('Note: Native HTML5 looping is infinite.'); + } + // + + a.loop = (nLoops > 1 ? 'loop' : ''); + + }; + + this._setup_html5 = function(oOptions) { + + var _iO = _mixin(_t._iO, oOptions), d = decodeURI, + _a = _useGlobalHTML5Audio ? _s._global_a : _t._a, + _dURL = d(_iO.url), + _oldIO = (_a && _a._t ? _a._t.instanceOptions : null), + result; + + if (_a) { + + if (_a._t) { + + if (!_useGlobalHTML5Audio && _dURL === d(_lastURL)) { + + // same url, ignore request + result = _a; + + } else if (_useGlobalHTML5Audio && _oldIO.url === _iO.url && (!_lastURL || (_lastURL === _oldIO.url))) { + + // iOS-type reuse case + result = _a; + + } + + if (result) { + + _t._apply_loop(_a, _iO.loops); + return result; + + } + + } + + _s._wD('setting URL on existing object: ' + _dURL + (_lastURL ? ', old URL: ' + _lastURL : '')); + + /** + * "First things first, I, Poppa.." (reset the previous state of the old sound, if playing) + * Fixes case with devices that can only play one sound at a time + * Otherwise, other sounds in mid-play will be terminated without warning and in a stuck state + */ + + if (_useGlobalHTML5Audio && _a._t && _a._t.playState && _iO.url !== _oldIO.url) { + + _a._t.stop(); + + } + + // reset load/playstate, onPosition etc. if the URL is new. + // somewhat-tricky object re-use vs. new SMSound object, old vs. new URL comparisons + _resetProperties((_oldIO && _oldIO.url ? _iO.url === _oldIO.url : (_lastURL ? _lastURL === _iO.url : false))); + + _a.src = _iO.url; + _t.url = _iO.url; + _lastURL = _iO.url; + _a._called_load = false; + + } else { + + _wDS('h5a'); + + if (_iO.autoLoad || _iO.autoPlay) { + + _t._a = new Audio(_iO.url); + + } else { + + // null for stupid Opera 9.64 case + _t._a = (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()); + + } + + // assign local reference + _a = _t._a; + + _a._called_load = false; + + if (_useGlobalHTML5Audio) { + + _s._global_a = _a; + + } + + } + + _t.isHTML5 = true; + + // store a ref on the track + _t._a = _a; + + // store a ref on the audio + _a._t = _t; + + _add_html5_events(); + + _t._apply_loop(_a, _iO.loops); + + if (_iO.autoLoad || _iO.autoPlay) { + + _t.load(); + + } else { + + // early HTML5 implementation (non-standard) + _a.autobuffer = false; + + // standard ('none' is also an option.) + _a.preload = 'auto'; + + } + + return _a; + + }; + + _add_html5_events = function() { + + if (_t._a._added_events) { + return false; + } + + var f; + + function add(oEvt, oFn, bCapture) { + return _t._a ? _t._a.addEventListener(oEvt, oFn, bCapture||false) : null; + } + + _t._a._added_events = true; + + for (f in _html5_events) { + if (_html5_events.hasOwnProperty(f)) { + add(f, _html5_events[f]); + } + } + + return true; + + }; + + _remove_html5_events = function() { + + // Remove event listeners + + var f; + + function remove(oEvt, oFn, bCapture) { + return (_t._a ? _t._a.removeEventListener(oEvt, oFn, bCapture||false) : null); + } + + _s._wD(_h5+'removing event listeners: '+_t.id); + _t._a._added_events = false; + + for (f in _html5_events) { + if (_html5_events.hasOwnProperty(f)) { + remove(f, _html5_events[f]); + } + } + + }; + + /** + * Pseudo-private event internals + * ------------------------------ + */ + + this._onload = function(nSuccess) { + + + var fN, + // check for duration to prevent false positives from flash 8 when loading from cache. + loadOK = (!!(nSuccess) || (!_t.isHTML5 && _fV === 8 && _t.duration)); + + // + fN = 'SMSound._onload(): '; + _s._wD(fN + '"' + _t.id + '"' + (loadOK?' loaded.':' failed to load? - ' + _t.url), (loadOK?1:2)); + if (!loadOK && !_t.isHTML5) { + if (_s.sandbox.noRemote === true) { + _s._wD(fN + _str('noNet'), 1); + } + if (_s.sandbox.noLocal === true) { + _s._wD(fN + _str('noLocal'), 1); + } + } + // + + _t.loaded = loadOK; + _t.readyState = loadOK?3:2; + _t._onbufferchange(0); + + if (_t._iO.onload) { + _t._iO.onload.apply(_t, [loadOK]); + } + + return true; + + }; + + this._onbufferchange = function(nIsBuffering) { + + if (_t.playState === 0) { + // ignore if not playing + return false; + } + + if ((nIsBuffering && _t.isBuffering) || (!nIsBuffering && !_t.isBuffering)) { + return false; + } + + _t.isBuffering = (nIsBuffering === 1); + if (_t._iO.onbufferchange) { + _s._wD('SMSound._onbufferchange(): ' + nIsBuffering); + _t._iO.onbufferchange.apply(_t); + } + + return true; + + }; + + /** + * Notify Mobile Safari that user action is required + * to continue playing / loading the audio file. + */ + + this._onsuspend = function() { + + if (_t._iO.onsuspend) { + _s._wD('SMSound._onsuspend()'); + _t._iO.onsuspend.apply(_t); + } + + return true; + + }; + + /** + * flash 9/movieStar + RTMP-only method, should fire only once at most + * at this point we just recreate failed sounds rather than trying to reconnect + */ + + this._onfailure = function(msg, level, code) { + + _t.failures++; + _s._wD('SMSound._onfailure(): "'+_t.id+'" count '+_t.failures); + + if (_t._iO.onfailure && _t.failures === 1) { + _t._iO.onfailure(_t, msg, level, code); + } else { + _s._wD('SMSound._onfailure(): ignoring'); + } + + }; + + this._onfinish = function() { + + // store local copy before it gets trashed.. + var _io_onfinish = _t._iO.onfinish; + + _t._onbufferchange(0); + _t._resetOnPosition(0); + + // reset some state items + if (_t.instanceCount) { + + _t.instanceCount--; + + if (!_t.instanceCount) { + + // remove onPosition listeners, if any + _detachOnPosition(); + + // reset instance options + _t.playState = 0; + _t.paused = false; + _t.instanceCount = 0; + _t.instanceOptions = {}; + _t._iO = {}; + _stop_html5_timer(); + + // reset position, too + if (_t.isHTML5) { + _t.position = 0; + } + + } + + if (!_t.instanceCount || _t._iO.multiShotEvents) { + // fire onfinish for last, or every instance + if (_io_onfinish) { + _s._wD('SMSound._onfinish(): "' + _t.id + '"'); + _io_onfinish.apply(_t); + } + } + + } + + }; + + this._whileloading = function(nBytesLoaded, nBytesTotal, nDuration, nBufferLength) { + + var _iO = _t._iO; + + _t.bytesLoaded = nBytesLoaded; + _t.bytesTotal = nBytesTotal; + _t.duration = Math.floor(nDuration); + _t.bufferLength = nBufferLength; + + if (!_t.isHTML5 && !_iO.isMovieStar) { + + if (_iO.duration) { + // use duration from options, if specified and larger. nobody should be specifying duration in options, actually, and it should be retired. + _t.durationEstimate = (_t.duration > _iO.duration) ? _t.duration : _iO.duration; + } else { + _t.durationEstimate = parseInt((_t.bytesTotal / _t.bytesLoaded) * _t.duration, 10); + } + + } else { + + _t.durationEstimate = _t.duration; + + } + + // for flash, reflect sequential-load-style buffering + if (!_t.isHTML5) { + _t.buffered = [{ + 'start': 0, + 'end': _t.duration + }]; + } + + // allow whileloading to fire even if "load" fired under HTML5, due to HTTP range/partials + if ((_t.readyState !== 3 || _t.isHTML5) && _iO.whileloading) { + _iO.whileloading.apply(_t); + } + + }; + + this._whileplaying = function(nPosition, oPeakData, oWaveformDataLeft, oWaveformDataRight, oEQData) { + + var _iO = _t._iO, + eqLeft; + + if (isNaN(nPosition) || nPosition === null) { + // flash safety net + return false; + } + + // Safari HTML5 play() may return small -ve values when starting from position: 0, eg. -50.120396875. Unexpected/invalid per W3, I think. Normalize to 0. + _t.position = Math.max(0, nPosition); + + _t._processOnPosition(); + + if (!_t.isHTML5 && _fV > 8) { + + if (_iO.usePeakData && typeof oPeakData !== 'undefined' && oPeakData) { + _t.peakData = { + left: oPeakData.leftPeak, + right: oPeakData.rightPeak + }; + } + + if (_iO.useWaveformData && typeof oWaveformDataLeft !== 'undefined' && oWaveformDataLeft) { + _t.waveformData = { + left: oWaveformDataLeft.split(','), + right: oWaveformDataRight.split(',') + }; + } + + if (_iO.useEQData) { + if (typeof oEQData !== 'undefined' && oEQData && oEQData.leftEQ) { + eqLeft = oEQData.leftEQ.split(','); + _t.eqData = eqLeft; + _t.eqData.left = eqLeft; + if (typeof oEQData.rightEQ !== 'undefined' && oEQData.rightEQ) { + _t.eqData.right = oEQData.rightEQ.split(','); + } + } + } + + } + + if (_t.playState === 1) { + + // special case/hack: ensure buffering is false if loading from cache (and not yet started) + if (!_t.isHTML5 && _fV === 8 && !_t.position && _t.isBuffering) { + _t._onbufferchange(0); + } + + if (_iO.whileplaying) { + // flash may call after actual finish + _iO.whileplaying.apply(_t); + } + + } + + return true; + + }; + + this._oncaptiondata = function(oData) { + + /** + * internal: flash 9 + NetStream (MovieStar/RTMP-only) feature + * + * @param {object} oData + */ + + _s._wD('SMSound._oncaptiondata(): "' + this.id + '" caption data received.'); + + _t.captiondata = oData; + + if (_t._iO.oncaptiondata) { + _t._iO.oncaptiondata.apply(_t, [oData]); + } + + }; + + this._onmetadata = function(oMDProps, oMDData) { + + /** + * internal: flash 9 + NetStream (MovieStar/RTMP-only) feature + * RTMP may include song title, MovieStar content may include encoding info + * + * @param {array} oMDProps (names) + * @param {array} oMDData (values) + */ + + _s._wD('SMSound._onmetadata(): "' + this.id + '" metadata received.'); + + var oData = {}, i, j; + + for (i = 0, j = oMDProps.length; i < j; i++) { + oData[oMDProps[i]] = oMDData[i]; + } + _t.metadata = oData; + + if (_t._iO.onmetadata) { + _t._iO.onmetadata.apply(_t); + } + + }; + + this._onid3 = function(oID3Props, oID3Data) { + + /** + * internal: flash 8 + flash 9 ID3 feature + * may include artist, song title etc. + * + * @param {array} oID3Props (names) + * @param {array} oID3Data (values) + */ + + _s._wD('SMSound._onid3(): "' + this.id + '" ID3 data received.'); + + var oData = [], i, j; + + for (i = 0, j = oID3Props.length; i < j; i++) { + oData[oID3Props[i]] = oID3Data[i]; + } + _t.id3 = _mixin(_t.id3, oData); + + if (_t._iO.onid3) { + _t._iO.onid3.apply(_t); + } + + }; + + // flash/RTMP-only + + this._onconnect = function(bSuccess) { + + bSuccess = (bSuccess === 1); + _s._wD('SMSound._onconnect(): "'+_t.id+'"'+(bSuccess?' connected.':' failed to connect? - '+_t.url), (bSuccess?1:2)); + _t.connected = bSuccess; + + if (bSuccess) { + + _t.failures = 0; + + if (_idCheck(_t.id)) { + if (_t.getAutoPlay()) { + // only update the play state if auto playing + _t.play(undefined, _t.getAutoPlay()); + } else if (_t._iO.autoLoad) { + _t.load(); + } + } + + if (_t._iO.onconnect) { + _t._iO.onconnect.apply(_t, [bSuccess]); + } + + } + + }; + + this._ondataerror = function(sError) { + + // flash 9 wave/eq data handler + // hack: called at start, and end from flash at/after onfinish() + if (_t.playState > 0) { + _s._wD('SMSound._ondataerror(): ' + sError); + if (_t._iO.ondataerror) { + _t._iO.ondataerror.apply(_t); + } + } + + }; + + }; // SMSound() + + /** + * Private SoundManager internals + * ------------------------------ + */ + + _getDocument = function() { + + return (_doc.body || _doc._docElement || _doc.getElementsByTagName('div')[0]); + + }; + + _id = function(sID) { + + return _doc.getElementById(sID); + + }; + + _mixin = function(oMain, oAdd) { + + // non-destructive merge + var o1 = (oMain || {}), o2, o; + + // if unspecified, o2 is the default options object + o2 = (typeof oAdd === 'undefined' ? _s.defaultOptions : oAdd); + + for (o in o2) { + + if (o2.hasOwnProperty(o) && typeof o1[o] === 'undefined') { + + if (typeof o2[o] !== 'object' || o2[o] === null) { + + // assign directly + o1[o] = o2[o]; + + } else { + + // recurse through o2 + o1[o] = _mixin(o1[o], o2[o]); + + } + + } + + } + + return o1; + + }; + + // additional soundManager properties that soundManager.setup() will accept + + _extraOptions = { + 'onready': 1, + 'ontimeout': 1, + 'defaultOptions': 1, + 'flash9Options': 1, + 'movieStarOptions': 1 + }; + + _assign = function(o, oParent) { + + /** + * recursive assignment of properties, soundManager.setup() helper + * allows property assignment based on whitelist + */ + + var i, + result = true, + hasParent = (typeof oParent !== 'undefined'), + setupOptions = _s.setupOptions, + extraOptions = _extraOptions; + + // + + // if soundManager.setup() called, show accepted parameters. + + if (typeof o === 'undefined') { + + result = []; + + for (i in setupOptions) { + + if (setupOptions.hasOwnProperty(i)) { + result.push(i); + } + + } + + for (i in extraOptions) { + + if (extraOptions.hasOwnProperty(i)) { + + if (typeof _s[i] === 'object') { + + result.push(i+': {...}'); + + } else if (_s[i] instanceof Function) { + + result.push(i+': function() {...}'); + + } else { + + result.push(i); + + } + + } + + } + + _s._wD(_str('setup', result.join(', '))); + + return false; + + } + + // + + for (i in o) { + + if (o.hasOwnProperty(i)) { + + // if not an {object} we want to recurse through... + + if (typeof o[i] !== 'object' || o[i] === null || o[i] instanceof Array) { + + // check "allowed" options + + if (hasParent && typeof extraOptions[oParent] !== 'undefined') { + + // valid recursive / nested object option, eg., { defaultOptions: { volume: 50 } } + _s[oParent][i] = o[i]; + + } else if (typeof setupOptions[i] !== 'undefined') { + + // special case: assign to setupOptions object, which soundManager property references + _s.setupOptions[i] = o[i]; + + // assign directly to soundManager, too + _s[i] = o[i]; + + } else if (typeof extraOptions[i] === 'undefined') { + + // invalid or disallowed parameter. complain. + _complain(_str((typeof _s[i] === 'undefined' ? 'setupUndef' : 'setupError'), i), 2); + + result = false; + + } else { + + /** + * valid extraOptions parameter. + * is it a method, like onready/ontimeout? call it. + * multiple parameters should be in an array, eg. soundManager.setup({onready: [myHandler, myScope]}); + */ + + if (_s[i] instanceof Function) { + + _s[i].apply(_s, (o[i] instanceof Array? o[i] : [o[i]])); + + } else { + + // good old-fashioned direct assignment + _s[i] = o[i]; + + } + + } + + } else { + + // recursion case, eg., { defaultOptions: { ... } } + + if (typeof extraOptions[i] === 'undefined') { + + // invalid or disallowed parameter. complain. + _complain(_str((typeof _s[i] === 'undefined' ? 'setupUndef' : 'setupError'), i), 2); + + result = false; + + } else { + + // recurse through object + return _assign(o[i], i); + + } + + } + + } + + } + + return result; + + }; + + function _preferFlashCheck(kind) { + + // whether flash should play a given type + return (_s.preferFlash && _hasFlash && !_s.ignoreFlash && (typeof _s.flash[kind] !== 'undefined' && _s.flash[kind])); + + } + + /** + * Internal DOM2-level event helpers + * --------------------------------- + */ + + _event = (function() { + + var old = (_win.attachEvent), + evt = { + add: (old?'attachEvent':'addEventListener'), + remove: (old?'detachEvent':'removeEventListener') + }; + + function getArgs(oArgs) { + + var args = _slice.call(oArgs), + len = args.length; + + if (old) { + // prefix + args[1] = 'on' + args[1]; + if (len > 3) { + // no capture + args.pop(); + } + } else if (len === 3) { + args.push(false); + } + + return args; + + } + + function apply(args, sType) { + + var element = args.shift(), + method = [evt[sType]]; + + if (old) { + element[method](args[0], args[1]); + } else { + element[method].apply(element, args); + } + + } + + function add() { + + apply(getArgs(arguments), 'add'); + + } + + function remove() { + + apply(getArgs(arguments), 'remove'); + + } + + return { + 'add': add, + 'remove': remove + }; + + }()); + + /** + * Internal HTML5 event handling + * ----------------------------- + */ + + function _html5_event(oFn) { + + // wrap html5 event handlers so we don't call them on destroyed sounds + + return function(e) { + + var t = this._t, + result; + + if (!t || !t._a) { + // + if (t && t.id) { + _s._wD(_h5+'ignoring '+e.type+': '+t.id); + } else { + _s._wD(_h5+'ignoring '+e.type); + } + // + result = null; + } else { + result = oFn.call(this, e); + } + + return result; + + }; + + } + + _html5_events = { + + // HTML5 event-name-to-handler map + + abort: _html5_event(function() { + + _s._wD(_h5+'abort: '+this._t.id); + + }), + + // enough has loaded to play + + canplay: _html5_event(function() { + + var t = this._t, + position1K; + + if (t._html5_canplay) { + // this event has already fired. ignore. + return true; + } + + t._html5_canplay = true; + _s._wD(_h5+'canplay: '+t.id+', '+t.url); + t._onbufferchange(0); + + // position according to instance options + position1K = (typeof t._iO.position !== 'undefined' && !isNaN(t._iO.position)?t._iO.position/1000:null); + + // set the position if position was set before the sound loaded + if (t.position && this.currentTime !== position1K) { + _s._wD(_h5+'canplay: setting position to '+position1K); + try { + this.currentTime = position1K; + } catch(ee) { + _s._wD(_h5+'setting position of ' + position1K + ' failed: '+ee.message, 2); + } + } + + // hack for HTML5 from/to case + if (t._iO._oncanplay) { + t._iO._oncanplay(); + } + + }), + + canplaythrough: _html5_event(function() { + + var t = this._t; + + if (!t.loaded) { + t._onbufferchange(0); + t._whileloading(t.bytesLoaded, t.bytesTotal, t._get_html5_duration()); + t._onload(true); + } + + }), + + // TODO: Reserved for potential use + /* + emptied: _html5_event(function() { + + _s._wD(_h5+'emptied: '+this._t.id); + + }), + */ + + ended: _html5_event(function() { + + var t = this._t; + + _s._wD(_h5+'ended: '+t.id); + t._onfinish(); + + }), + + error: _html5_event(function() { + + _s._wD(_h5+'error: '+this.error.code); + // call load with error state? + this._t._onload(false); + + }), + + loadeddata: _html5_event(function() { + + var t = this._t; + + _s._wD(_h5+'loadeddata: '+this._t.id); + + // safari seems to nicely report progress events, eventually totalling 100% + if (!t._loaded && !_isSafari) { + t.duration = t._get_html5_duration(); + } + + }), + + loadedmetadata: _html5_event(function() { + + _s._wD(_h5+'loadedmetadata: '+this._t.id); + + }), + + loadstart: _html5_event(function() { + + _s._wD(_h5+'loadstart: '+this._t.id); + // assume buffering at first + this._t._onbufferchange(1); + + }), + + play: _html5_event(function() { + + _s._wD(_h5+'play: '+this._t.id+', '+this._t.url); + // once play starts, no buffering + this._t._onbufferchange(0); + + }), + + playing: _html5_event(function() { + + _s._wD(_h5+'playing: '+this._t.id); + + // once play starts, no buffering + this._t._onbufferchange(0); + + }), + + progress: _html5_event(function(e) { + + // note: can fire repeatedly after "loaded" event, due to use of HTTP range/partials + + var t = this._t, + i, j, str, buffered = 0, + isProgress = (e.type === 'progress'), + ranges = e.target.buffered, + // firefox 3.6 implements e.loaded/total (bytes) + loaded = (e.loaded||0), + total = (e.total||1), + // HTML5 returns msec. SM2 API uses seconds for setPosition() etc., whether Flash or HTML5. + scale = 1000; + + // reset the "buffered" (loaded byte ranges) array + t.buffered = []; + + if (ranges && ranges.length) { + + // if loaded is 0, try TimeRanges implementation as % of load + // https://developer.mozilla.org/en/DOM/TimeRanges + + // re-build "buffered" array + for (i=0, j=ranges.length; i + if (isProgress && ranges.length > 1) { + str = []; + j = ranges.length; + for (i=0; i + + } + + if (!isNaN(loaded)) { + + // if progress, likely not buffering + t._onbufferchange(0); + // TODO: prevent calls with duplicate values. + t._whileloading(loaded, total, t._get_html5_duration()); + if (loaded && total && loaded === total) { + // in case "onload" doesn't fire (eg. gecko 1.9.2) + _html5_events.canplaythrough.call(this, e); + } + + } + + }), + + ratechange: _html5_event(function() { + + _s._wD(_h5+'ratechange: '+this._t.id); + + }), + + suspend: _html5_event(function(e) { + + // download paused/stopped, may have finished (eg. onload) + var t = this._t; + + _s._wD(_h5+'suspend: '+t.id); + _html5_events.progress.call(this, e); + t._onsuspend(); + + }), + + stalled: _html5_event(function() { + + _s._wD(_h5+'stalled: '+this._t.id); + + }), + + timeupdate: _html5_event(function() { + + this._t._onTimer(); + + }), + + waiting: _html5_event(function() { + + var t = this._t; + + // see also: seeking + _s._wD(_h5+'waiting: '+t.id); + + // playback faster than download rate, etc. + t._onbufferchange(1); + + }) + + }; + + _html5OK = function(iO) { + + // playability test based on URL or MIME type + + var result; + + if (iO.serverURL || (iO.type && _preferFlashCheck(iO.type))) { + + // RTMP, or preferring flash + result = false; + + } else { + + // Use type, if specified. If HTML5-only mode, no other options, so just give 'er + result = ((iO.type ? _html5CanPlay({type:iO.type}) : _html5CanPlay({url:iO.url}) || _s.html5Only)); + + } + + return result; + + }; + + _html5Unload = function(oAudio, url) { + + /** + * Internal method: Unload media, and cancel any current/pending network requests. + * Firefox can load an empty URL, which allegedly destroys the decoder and stops the download. + * https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Stopping_the_download_of_media + * However, Firefox has been seen loading a relative URL from '' and thus requesting the hosting page on unload. + * Other UA behaviour is unclear, so everyone else gets an about:blank-style URL. + */ + + if (oAudio) { + // Firefox likes '' for unload (used to work?) - however, may request hosting page URL (bad.) Most other UAs dislike '' and fail to unload. + oAudio.src = url; + } + + }; + + _html5CanPlay = function(o) { + + /** + * Try to find MIME, test and return truthiness + * o = { + * url: '/path/to/an.mp3', + * type: 'audio/mp3' + * } + */ + + if (!_s.useHTML5Audio || !_s.hasHTML5) { + return false; + } + + var url = (o.url || null), + mime = (o.type || null), + aF = _s.audioFormats, + result, + offset, + fileExt, + item; + + // account for known cases like audio/mp3 + + if (mime && typeof _s.html5[mime] !== 'undefined') { + return (_s.html5[mime] && !_preferFlashCheck(mime)); + } + + if (!_html5Ext) { + _html5Ext = []; + for (item in aF) { + if (aF.hasOwnProperty(item)) { + _html5Ext.push(item); + if (aF[item].related) { + _html5Ext = _html5Ext.concat(aF[item].related); + } + } + } + _html5Ext = new RegExp('\\.('+_html5Ext.join('|')+')(\\?.*)?$','i'); + } + + // TODO: Strip URL queries, etc. + fileExt = (url ? url.toLowerCase().match(_html5Ext) : null); + + if (!fileExt || !fileExt.length) { + if (!mime) { + result = false; + } else { + // audio/mp3 -> mp3, result should be known + offset = mime.indexOf(';'); + // strip "audio/X; codecs.." + fileExt = (offset !== -1?mime.substr(0,offset):mime).substr(6); + } + } else { + // match the raw extension name - "mp3", for example + fileExt = fileExt[1]; + } + + if (fileExt && typeof _s.html5[fileExt] !== 'undefined') { + // result known + result = (_s.html5[fileExt] && !_preferFlashCheck(fileExt)); + } else { + mime = 'audio/'+fileExt; + result = _s.html5.canPlayType({type:mime}); + _s.html5[fileExt] = result; + // _s._wD('canPlayType, found result: '+result); + result = (result && _s.html5[mime] && !_preferFlashCheck(mime)); + } + + return result; + + }; + + _testHTML5 = function() { + + /** + * Internal: Iterates over audioFormats, determining support eg. audio/mp3, audio/mpeg and so on + * assigns results to html5[] and flash[]. + */ + + if (!_s.useHTML5Audio || !_s.hasHTML5) { + return false; + } + + // double-whammy: Opera 9.64 throws WRONG_ARGUMENTS_ERR if no parameter passed to Audio(), and Webkit + iOS happily tries to load "null" as a URL. :/ + var a = (typeof Audio !== 'undefined' ? (_isOpera && opera.version() < 10 ? new Audio(null) : new Audio()) : null), + item, lookup, support = {}, aF, i; + + function _cp(m) { + + var canPlay, i, j, + result = false, + isOK = false; + + if (!a || typeof a.canPlayType !== 'function') { + return result; + } + + if (m instanceof Array) { + // iterate through all mime types, return any successes + for (i=0, j=m.length; i= 0; i--) { + + // eg. audio/m4a + support['audio/'+aF[item].related[i]] = support[item]; + _s.html5[aF[item].related[i]] = support[item]; + _s.flash[aF[item].related[i]] = support[item]; + + } + + } + + } + + } + + support.canPlayType = (a?_cp:null); + _s.html5 = _mixin(_s.html5, support); + + return true; + + }; + + _strings = { + + // + notReady: 'Not loaded yet - wait for soundManager.onready()', + notOK: 'Audio support is not available.', + domError: _smc + 'createMovie(): appendChild/innerHTML call failed. DOM not ready or other error.', + spcWmode: _smc + 'createMovie(): Removing wmode, preventing known SWF loading issue(s)', + swf404: _sm + ': Verify that %s is a valid path.', + tryDebug: 'Try ' + _sm + '.debugFlash = true for more security details (output goes to SWF.)', + checkSWF: 'See SWF output for more debug info.', + localFail: _sm + ': Non-HTTP page (' + _doc.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: _sm + ': Special case: Waiting for SWF to load with window focus...', + waitImpatient: _sm + ': Getting impatient, still waiting for Flash%s...', + waitForever: _sm + ': Waiting indefinitely for Flash (will recover if unblocked)...', + waitSWF: _sm + ': Retrying, waiting for 100% SWF load...', + needFunction: _sm + ': Function object expected for %s', + badID: 'Warning: Sound ID "%s" should be a string, starting with a non-numeric character', + currentObj: '--- ' + _sm + '._debug(): Current sound objects ---', + waitEI: _smc + 'initMovie(): Waiting for ExternalInterface call from Flash...', + waitOnload: _sm + ': Waiting for window.onload()', + docLoaded: _sm + ': Document already loaded', + onload: _smc + 'initComplete(): calling soundManager.onload()', + onloadOK: _sm + '.onload() complete', + init: _smc + 'init()', + didInit: _smc + 'init(): Already called?', + flashJS: _sm + ': Attempting JS to Flash call...', + secNote: 'Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html', + badRemove: 'Warning: Failed to remove flash movie.', + shutdown: _sm + '.disable(): Shutting down', + queue: _sm + ': Queueing %s handler', + smFail: _sm + ': Failed to initialise.', + smError: 'SMSound.load(): Exception: JS-Flash communication failed, or JS error.', + fbTimeout: 'No flash response, applying .'+_swfCSS.swfTimedout+' CSS...', + fbLoaded: 'Flash loaded', + fbHandler: _smc+'flashBlockHandler()', + manURL: 'SMSound.load(): Using manually-assigned URL', + onURL: _sm + '.load(): current URL already assigned.', + badFV: _sm + '.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.', + as2loop: 'Note: Setting stream:false so looping can work (flash 8 limitation)', + noNSLoop: 'Note: Looping not implemented for MovieStar formats', + needfl9: 'Note: Switching to flash 9, required for MP4 formats.', + mfTimeout: 'Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case', + needFlash: _sm + ': Fatal error: Flash is needed to play some required formats, but is not available.', + gotFocus: _sm + ': Got window focus.', + mfOn: 'mobileFlash::enabling on-screen flash repositioning', + policy: 'Enabling usePolicyFile for data access', + setup: _sm + '.setup(): allowed parameters: %s', + setupError: _sm + '.setup(): "%s" cannot be assigned with this method.', + setupUndef: _sm + '.setup(): Could not find option "%s"', + setupLate: _sm + '.setup(): url + flashVersion changes will not take effect until reboot().', + h5a: 'creating HTML5 Audio() object', + noURL: _sm + ': Flash URL required. Call soundManager.setup({url:...}) to get started.' + // + + }; + + _str = function() { + + // internal string replace helper. + // arguments: o [,items to replace] + // + + // real array, please + var args = _slice.call(arguments), + + // first arg + o = args.shift(), + + str = (_strings && _strings[o]?_strings[o]:''), i, j; + if (str && args && args.length) { + for (i = 0, j = args.length; i < j; i++) { + str = str.replace('%s', args[i]); + } + } + + return str; + // + + }; + + _loopFix = function(sOpt) { + + // flash 8 requires stream = false for looping to work + if (_fV === 8 && sOpt.loops > 1 && sOpt.stream) { + _wDS('as2loop'); + sOpt.stream = false; + } + + return sOpt; + + }; + + _policyFix = function(sOpt, sPre) { + + if (sOpt && !sOpt.usePolicyFile && (sOpt.onid3 || sOpt.usePeakData || sOpt.useWaveformData || sOpt.useEQData)) { + _s._wD((sPre || '') + _str('policy')); + sOpt.usePolicyFile = true; + } + + return sOpt; + + }; + + _complain = function(sMsg) { + + // + if (typeof console !== 'undefined' && typeof console.warn !== 'undefined') { + console.warn(sMsg); + } else { + _s._wD(sMsg); + } + // + + }; + + _doNothing = function() { + + return false; + + }; + + _disableObject = function(o) { + + var oProp; + + for (oProp in o) { + if (o.hasOwnProperty(oProp) && typeof o[oProp] === 'function') { + o[oProp] = _doNothing; + } + } + + oProp = null; + + }; + + _failSafely = function(bNoDisable) { + + // general failure exception handler + + if (typeof bNoDisable === 'undefined') { + bNoDisable = false; + } + + if (_disabled || bNoDisable) { + _wDS('smFail', 2); + _s.disable(bNoDisable); + } + + }; + + _normalizeMovieURL = function(smURL) { + + var urlParams = null, url; + + if (smURL) { + if (smURL.match(/\.swf(\?.*)?$/i)) { + urlParams = smURL.substr(smURL.toLowerCase().lastIndexOf('.swf?') + 4); + if (urlParams) { + // assume user knows what they're doing + return smURL; + } + } else if (smURL.lastIndexOf('/') !== smURL.length - 1) { + // append trailing slash, if needed + smURL += '/'; + } + } + + url = (smURL && smURL.lastIndexOf('/') !== - 1 ? smURL.substr(0, smURL.lastIndexOf('/') + 1) : './') + _s.movieURL; + + if (_s.noSWFCache) { + url += ('?ts=' + new Date().getTime()); + } + + return url; + + }; + + _setVersionInfo = function() { + + // short-hand for internal use + + _fV = parseInt(_s.flashVersion, 10); + + if (_fV !== 8 && _fV !== 9) { + _s._wD(_str('badFV', _fV, _defaultFlashVersion)); + _s.flashVersion = _fV = _defaultFlashVersion; + } + + // debug flash movie, if applicable + + var isDebug = (_s.debugMode || _s.debugFlash?'_debug.swf':'.swf'); + + if (_s.useHTML5Audio && !_s.html5Only && _s.audioFormats.mp4.required && _fV < 9) { + _s._wD(_str('needfl9')); + _s.flashVersion = _fV = 9; + } + + _s.version = _s.versionNumber + (_s.html5Only?' (HTML5-only mode)':(_fV === 9?' (AS3/Flash 9)':' (AS2/Flash 8)')); + + // set up default options + if (_fV > 8) { + // +flash 9 base options + _s.defaultOptions = _mixin(_s.defaultOptions, _s.flash9Options); + _s.features.buffering = true; + // +moviestar support + _s.defaultOptions = _mixin(_s.defaultOptions, _s.movieStarOptions); + _s.filePatterns.flash9 = new RegExp('\\.(mp3|' + _netStreamTypes.join('|') + ')(\\?.*)?$', 'i'); + _s.features.movieStar = true; + } else { + _s.features.movieStar = false; + } + + // regExp for flash canPlay(), etc. + _s.filePattern = _s.filePatterns[(_fV !== 8?'flash9':'flash8')]; + + // if applicable, use _debug versions of SWFs + _s.movieURL = (_fV === 8?'soundmanager2.swf':'soundmanager2_flash9.swf').replace('.swf', isDebug); + + _s.features.peakData = _s.features.waveformData = _s.features.eqData = (_fV > 8); + + }; + + _setPolling = function(bPolling, bHighPerformance) { + + if (!_flash) { + return false; + } + + _flash._setPolling(bPolling, bHighPerformance); + + }; + + _initDebug = function() { + + // starts debug mode, creating output
for UAs without console object + + // allow force of debug mode via URL + if (_s.debugURLParam.test(_wl)) { + _s.debugMode = true; + } + + // + if (_id(_s.debugID)) { + return false; + } + + var oD, oDebug, oTarget, oToggle, tmp; + + if (_s.debugMode && !_id(_s.debugID) && (!_hasConsole || !_s.useConsole || !_s.consoleOnly)) { + + oD = _doc.createElement('div'); + oD.id = _s.debugID + '-toggle'; + + oToggle = { + 'position': 'fixed', + 'bottom': '0px', + 'right': '0px', + 'width': '1.2em', + 'height': '1.2em', + 'lineHeight': '1.2em', + 'margin': '2px', + 'textAlign': 'center', + 'border': '1px solid #999', + 'cursor': 'pointer', + 'background': '#fff', + 'color': '#333', + 'zIndex': 10001 + }; + + oD.appendChild(_doc.createTextNode('-')); + oD.onclick = _toggleDebug; + oD.title = 'Toggle SM2 debug console'; + + if (_ua.match(/msie 6/i)) { + oD.style.position = 'absolute'; + oD.style.cursor = 'hand'; + } + + for (tmp in oToggle) { + if (oToggle.hasOwnProperty(tmp)) { + oD.style[tmp] = oToggle[tmp]; + } + } + + oDebug = _doc.createElement('div'); + oDebug.id = _s.debugID; + oDebug.style.display = (_s.debugMode?'block':'none'); + + if (_s.debugMode && !_id(oD.id)) { + try { + oTarget = _getDocument(); + oTarget.appendChild(oD); + } catch(e2) { + throw new Error(_str('domError')+' \n'+e2.toString()); + } + oTarget.appendChild(oDebug); + } + + } + + oTarget = null; + // + + }; + + _idCheck = this.getSoundById; + + // + _wDS = function(o, errorLevel) { + + return (!o ? '' : _s._wD(_str(o), errorLevel)); + + }; + + // last-resort debugging option + + if (_wl.indexOf('sm2-debug=alert') + 1 && _s.debugMode) { + _s._wD = function(sText) {window.alert(sText);}; + } + + _toggleDebug = function() { + + var o = _id(_s.debugID), + oT = _id(_s.debugID + '-toggle'); + + if (!o) { + return false; + } + + if (_debugOpen) { + // minimize + oT.innerHTML = '+'; + o.style.display = 'none'; + } else { + oT.innerHTML = '-'; + o.style.display = 'block'; + } + + _debugOpen = !_debugOpen; + + }; + + _debugTS = function(sEventType, bSuccess, sMessage) { + + // troubleshooter debug hooks + + if (typeof sm2Debugger !== 'undefined') { + try { + sm2Debugger.handleEvent(sEventType, bSuccess, sMessage); + } catch(e) { + // oh well + } + } + + return true; + + }; + // + + _getSWFCSS = function() { + + var css = []; + + if (_s.debugMode) { + css.push(_swfCSS.sm2Debug); + } + + if (_s.debugFlash) { + css.push(_swfCSS.flashDebug); + } + + if (_s.useHighPerformance) { + css.push(_swfCSS.highPerf); + } + + return css.join(' '); + + }; + + _flashBlockHandler = function() { + + // *possible* flash block situation. + + var name = _str('fbHandler'), + p = _s.getMoviePercent(), + css = _swfCSS, + error = {type:'FLASHBLOCK'}; + + if (_s.html5Only) { + return false; + } + + if (!_s.ok()) { + + if (_needsFlash) { + // make the movie more visible, so user can fix + _s.oMC.className = _getSWFCSS() + ' ' + css.swfDefault + ' ' + (p === null?css.swfTimedout:css.swfError); + _s._wD(name+': '+_str('fbTimeout')+(p?' ('+_str('fbLoaded')+')':'')); + } + + _s.didFlashBlock = true; + + // fire onready(), complain lightly + _processOnEvents({type:'ontimeout', ignoreInit:true, error:error}); + _catchError(error); + + } else { + + // SM2 loaded OK (or recovered) + + // + if (_s.didFlashBlock) { + _s._wD(name+': Unblocked'); + } + // + + if (_s.oMC) { + _s.oMC.className = [_getSWFCSS(), css.swfDefault, css.swfLoaded + (_s.didFlashBlock?' '+css.swfUnblocked:'')].join(' '); + } + + } + + }; + + _addOnEvent = function(sType, oMethod, oScope) { + + if (typeof _on_queue[sType] === 'undefined') { + _on_queue[sType] = []; + } + + _on_queue[sType].push({ + 'method': oMethod, + 'scope': (oScope || null), + 'fired': false + }); + + }; + + _processOnEvents = function(oOptions) { + + // if unspecified, assume OK/error + + if (!oOptions) { + oOptions = { + type: (_s.ok() ? 'onready' : 'ontimeout') + }; + } + + if (!_didInit && oOptions && !oOptions.ignoreInit) { + // not ready yet. + return false; + } + + if (oOptions.type === 'ontimeout' && (_s.ok() || (_disabled && !oOptions.ignoreInit))) { + // invalid case + return false; + } + + var status = { + success: (oOptions && oOptions.ignoreInit?_s.ok():!_disabled) + }, + + // queue specified by type, or none + srcQueue = (oOptions && oOptions.type?_on_queue[oOptions.type]||[]:[]), + + queue = [], i, j, + args = [status], + canRetry = (_needsFlash && _s.useFlashBlock && !_s.ok()); + + if (oOptions.error) { + args[0].error = oOptions.error; + } + + for (i = 0, j = srcQueue.length; i < j; i++) { + if (srcQueue[i].fired !== true) { + queue.push(srcQueue[i]); + } + } + + if (queue.length) { + _s._wD(_sm + ': Firing ' + queue.length + ' '+oOptions.type+'() item' + (queue.length === 1?'':'s')); + for (i = 0, j = queue.length; i < j; i++) { + if (queue[i].scope) { + queue[i].method.apply(queue[i].scope, args); + } else { + queue[i].method.apply(this, args); + } + if (!canRetry) { + // flashblock case doesn't count here + queue[i].fired = true; + } + } + } + + return true; + + }; + + _initUserOnload = function() { + + _win.setTimeout(function() { + + if (_s.useFlashBlock) { + _flashBlockHandler(); + } + + _processOnEvents(); + + // call user-defined "onload", scoped to window + + if (typeof _s.onload === 'function') { + _wDS('onload', 1); + _s.onload.apply(_win); + _wDS('onloadOK', 1); + } + + if (_s.waitForWindowLoad) { + _event.add(_win, 'load', _initUserOnload); + } + + },1); + + }; + + _detectFlash = function() { + + // hat tip: Flash Detect library (BSD, (C) 2007) by Carl "DocYes" S. Yestrau - http://featureblend.com/javascript-flash-detection-library.html / http://featureblend.com/license.txt + + if (typeof _hasFlash !== 'undefined') { + // this work has already been done. + return _hasFlash; + } + + var hasPlugin = false, n = navigator, nP = n.plugins, obj, type, types, AX = _win.ActiveXObject; + + if (nP && nP.length) { + type = 'application/x-shockwave-flash'; + types = n.mimeTypes; + if (types && types[type] && types[type].enabledPlugin && types[type].enabledPlugin.description) { + hasPlugin = true; + } + } else if (typeof AX !== 'undefined') { + try { + obj = new AX('ShockwaveFlash.ShockwaveFlash'); + } catch(e) { + // oh well + } + hasPlugin = (!!obj); + } + + _hasFlash = hasPlugin; + + return hasPlugin; + + }; + + _featureCheck = function() { + + var needsFlash, + item, + result = true, + formats = _s.audioFormats, + // iPhone <= 3.1 has broken HTML5 audio(), but firmware 3.2 (original iPad) + iOS4 works. + isSpecial = (_is_iDevice && !!(_ua.match(/os (1|2|3_0|3_1)/i))); + + if (isSpecial) { + + // has Audio(), but is broken; let it load links directly. + _s.hasHTML5 = false; + + // ignore flash case, however + _s.html5Only = true; + + if (_s.oMC) { + _s.oMC.style.display = 'none'; + } + + result = false; + + } else { + + if (_s.useHTML5Audio) { + + if (!_s.html5 || !_s.html5.canPlayType) { + _s._wD('SoundManager: No HTML5 Audio() support detected.'); + _s.hasHTML5 = false; + } + + // + if (_isBadSafari) { + _s._wD(_smc+'Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - '+(!_hasFlash?' would use flash fallback for MP3/MP4, but none detected.':'will use flash fallback for MP3/MP4, if available'),1); + } + // + + } + + } + + if (_s.useHTML5Audio && _s.hasHTML5) { + + for (item in formats) { + if (formats.hasOwnProperty(item)) { + if ((formats[item].required && !_s.html5.canPlayType(formats[item].type)) || (_s.preferFlash && (_s.flash[item] || _s.flash[formats[item].type]))) { + // flash may be required, or preferred for this format + needsFlash = true; + } + } + } + + } + + // sanity check... + if (_s.ignoreFlash) { + needsFlash = false; + } + + _s.html5Only = (_s.hasHTML5 && _s.useHTML5Audio && !needsFlash); + + return (!_s.html5Only); + + }; + + _parseURL = function(url) { + + /** + * Internal: Finds and returns the first playable URL (or failing that, the first URL.) + * @param {string or array} url A single URL string, OR, an array of URL strings or {url:'/path/to/resource', type:'audio/mp3'} objects. + */ + + var i, j, urlResult = 0, result; + + if (url instanceof Array) { + + // find the first good one + for (i=0, j=url.length; i= 0; i--) { + + if (_s.sounds[_s.soundIDs[i]].isHTML5 && _s.sounds[_s.soundIDs[i]]._hasTimer) { + + _s.sounds[_s.soundIDs[i]]._onTimer(); + + } + + } + + }; + + _catchError = function(options) { + + options = (typeof options !== 'undefined' ? options : {}); + + if (typeof _s.onerror === 'function') { + _s.onerror.apply(_win, [{type:(typeof options.type !== 'undefined' ? options.type : null)}]); + } + + if (typeof options.fatal !== 'undefined' && options.fatal) { + _s.disable(); + } + + }; + + _badSafariFix = function() { + + // special case: "bad" Safari (OS X 10.3 - 10.7) must fall back to flash for MP3/MP4 + if (!_isBadSafari || !_detectFlash()) { + // doesn't apply + return false; + } + + var aF = _s.audioFormats, i, item; + + for (item in aF) { + if (aF.hasOwnProperty(item)) { + if (item === 'mp3' || item === 'mp4') { + _s._wD(_sm+': Using flash fallback for '+item+' format'); + _s.html5[item] = false; + // assign result to related formats, too + if (aF[item] && aF[item].related) { + for (i = aF[item].related.length-1; i >= 0; i--) { + _s.html5[aF[item].related[i]] = false; + } + } + } + } + } + + }; + + /** + * Pseudo-private flash/ExternalInterface methods + * ---------------------------------------------- + */ + + this._setSandboxType = function(sandboxType) { + + // + var sb = _s.sandbox; + + sb.type = sandboxType; + sb.description = sb.types[(typeof sb.types[sandboxType] !== 'undefined'?sandboxType:'unknown')]; + + _s._wD('Flash security sandbox type: ' + sb.type); + + if (sb.type === 'localWithFile') { + + sb.noRemote = true; + sb.noLocal = false; + _wDS('secNote', 2); + + } else if (sb.type === 'localWithNetwork') { + + sb.noRemote = false; + sb.noLocal = true; + + } else if (sb.type === 'localTrusted') { + + sb.noRemote = false; + sb.noLocal = false; + + } + // + + }; + + this._externalInterfaceOK = function(flashDate, swfVersion) { + + // flash callback confirming flash loaded, EI working etc. + // flashDate = approx. timing/delay info for JS/flash bridge + // swfVersion: SWF build string + + if (_s.swfLoaded) { + return false; + } + + var e, eiTime = new Date().getTime(); + + _s._wD(_smc+'externalInterfaceOK()' + (flashDate?' (~' + (eiTime - flashDate) + ' ms)':'')); + _debugTS('swf', true); + _debugTS('flashtojs', true); + _s.swfLoaded = true; + _tryInitOnFocus = false; + + if (_isBadSafari) { + _badSafariFix(); + } + + // complain if JS + SWF build/version strings don't match, excluding +DEV builds + // + if (!swfVersion || swfVersion.replace(/\+dev/i,'') !== _s.versionNumber.replace(/\+dev/i, '')) { + + e = _sm + ': Fatal: JavaScript file build "' + _s.versionNumber + '" does not match Flash SWF build "' + swfVersion + '" at ' + _s.url + '. Ensure both are up-to-date.'; + + // escape flash -> JS stack so this error fires in window. + setTimeout(function versionMismatch() { + throw new Error(e); + }, 0); + + // exit, init will fail with timeout + return false; + + } + // + + // slight delay before init + setTimeout(_init, _isIE ? 100 : 1); + + }; + + /** + * Private initialization helpers + * ------------------------------ + */ + + _createMovie = function(smID, smURL) { + + if (_didAppend && _appendSuccess) { + // ignore if already succeeded + return false; + } + + function _initMsg() { + _s._wD('-- SoundManager 2 ' + _s.version + (!_s.html5Only && _s.useHTML5Audio?(_s.hasHTML5?' + HTML5 audio':', no HTML5 audio support'):'') + (!_s.html5Only ? (_s.useHighPerformance?', high performance mode, ':', ') + (( _s.flashPollingInterval ? 'custom (' + _s.flashPollingInterval + 'ms)' : 'normal') + ' polling') + (_s.wmode?', wmode: ' + _s.wmode:'') + (_s.debugFlash?', flash debug mode':'') + (_s.useFlashBlock?', flashBlock mode':'') : '') + ' --', 1); + } + + if (_s.html5Only) { + + // 100% HTML5 mode + _setVersionInfo(); + + _initMsg(); + _s.oMC = _id(_s.movieID); + _init(); + + // prevent multiple init attempts + _didAppend = true; + + _appendSuccess = true; + + return false; + + } + + // flash path + var remoteURL = (smURL || _s.url), + localURL = (_s.altURL || remoteURL), + swfTitle = 'JS/Flash audio component (SoundManager 2)', + oTarget = _getDocument(), + extraClass = _getSWFCSS(), + isRTL = null, + html = _doc.getElementsByTagName('html')[0], + oEmbed, oMovie, tmp, movieHTML, oEl, s, x, sClass; + + isRTL = (html && html.dir && html.dir.match(/rtl/i)); + smID = (typeof smID === 'undefined'?_s.id:smID); + + function param(name, value) { + return ''; + } + + // safety check for legacy (change to Flash 9 URL) + _setVersionInfo(); + _s.url = _normalizeMovieURL(_overHTTP?remoteURL:localURL); + smURL = _s.url; + + _s.wmode = (!_s.wmode && _s.useHighPerformance ? 'transparent' : _s.wmode); + + if (_s.wmode !== null && (_ua.match(/msie 8/i) || (!_isIE && !_s.useHighPerformance)) && navigator.platform.match(/win32|win64/i)) { + /** + * extra-special case: movie doesn't load until scrolled into view when using wmode = anything but 'window' here + * does not apply when using high performance (position:fixed means on-screen), OR infinite flash load timeout + * wmode breaks IE 8 on Vista + Win7 too in some cases, as of January 2011 (?) + */ + _wDS('spcWmode'); + _s.wmode = null; + } + + oEmbed = { + 'name': smID, + 'id': smID, + 'src': smURL, + 'quality': 'high', + 'allowScriptAccess': _s.allowScriptAccess, + 'bgcolor': _s.bgColor, + 'pluginspage': _http+'www.macromedia.com/go/getflashplayer', + 'title': swfTitle, + 'type': 'application/x-shockwave-flash', + 'wmode': _s.wmode, + // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html + 'hasPriority': 'true' + }; + + if (_s.debugFlash) { + oEmbed.FlashVars = 'debug=1'; + } + + if (!_s.wmode) { + // don't write empty attribute + delete oEmbed.wmode; + } + + if (_isIE) { + + // IE is "special". + oMovie = _doc.createElement('div'); + movieHTML = [ + '', + param('movie', smURL), + param('AllowScriptAccess', _s.allowScriptAccess), + param('quality', oEmbed.quality), + (_s.wmode? param('wmode', _s.wmode): ''), + param('bgcolor', _s.bgColor), + param('hasPriority', 'true'), + (_s.debugFlash ? param('FlashVars', oEmbed.FlashVars) : ''), + '' + ].join(''); + + } else { + + oMovie = _doc.createElement('embed'); + for (tmp in oEmbed) { + if (oEmbed.hasOwnProperty(tmp)) { + oMovie.setAttribute(tmp, oEmbed[tmp]); + } + } + + } + + _initDebug(); + extraClass = _getSWFCSS(); + oTarget = _getDocument(); + + if (oTarget) { + + _s.oMC = (_id(_s.movieID) || _doc.createElement('div')); + + if (!_s.oMC.id) { + + _s.oMC.id = _s.movieID; + _s.oMC.className = _swfCSS.swfDefault + ' ' + extraClass; + s = null; + oEl = null; + + if (!_s.useFlashBlock) { + if (_s.useHighPerformance) { + // on-screen at all times + s = { + 'position': 'fixed', + 'width': '8px', + 'height': '8px', + // >= 6px for flash to run fast, >= 8px to start up under Firefox/win32 in some cases. odd? yes. + 'bottom': '0px', + 'left': '0px', + 'overflow': 'hidden' + }; + } else { + // hide off-screen, lower priority + s = { + 'position': 'absolute', + 'width': '6px', + 'height': '6px', + 'top': '-9999px', + 'left': '-9999px' + }; + if (isRTL) { + s.left = Math.abs(parseInt(s.left,10))+'px'; + } + } + } + + if (_isWebkit) { + // soundcloud-reported render/crash fix, safari 5 + _s.oMC.style.zIndex = 10000; + } + + if (!_s.debugFlash) { + for (x in s) { + if (s.hasOwnProperty(x)) { + _s.oMC.style[x] = s[x]; + } + } + } + + try { + if (!_isIE) { + _s.oMC.appendChild(oMovie); + } + oTarget.appendChild(_s.oMC); + if (_isIE) { + oEl = _s.oMC.appendChild(_doc.createElement('div')); + oEl.className = _swfCSS.swfBox; + oEl.innerHTML = movieHTML; + } + _appendSuccess = true; + } catch(e) { + throw new Error(_str('domError')+' \n'+e.toString()); + } + + } else { + + // SM2 container is already in the document (eg. flashblock use case) + sClass = _s.oMC.className; + _s.oMC.className = (sClass?sClass+' ':_swfCSS.swfDefault) + (extraClass?' '+extraClass:''); + _s.oMC.appendChild(oMovie); + if (_isIE) { + oEl = _s.oMC.appendChild(_doc.createElement('div')); + oEl.className = _swfCSS.swfBox; + oEl.innerHTML = movieHTML; + } + _appendSuccess = true; + + } + + } + + _didAppend = true; + _initMsg(); + _s._wD(_smc+'createMovie(): Trying to load ' + smURL + (!_overHTTP && _s.altURL?' (alternate URL)':''), 1); + + return true; + + }; + + _initMovie = function() { + + if (_s.html5Only) { + _createMovie(); + return false; + } + + // attempt to get, or create, movie (may already exist) + if (_flash) { + return false; + } + + if (!_s.url) { + + /** + * Something isn't right - we've reached init, but the soundManager url property has not been set. + * User has not called setup({url: ...}), or has not set soundManager.url (legacy use case) directly before init time. + * Notify and exit. If user calls setup() with a url: property, init will be restarted as in the deferred loading case. + */ + + _wDS('noURL'); + return false; + + } + + // inline markup case + _flash = _s.getMovie(_s.id); + + if (!_flash) { + if (!_oRemoved) { + // try to create + _createMovie(_s.id, _s.url); + } else { + // try to re-append removed movie after reboot() + if (!_isIE) { + _s.oMC.appendChild(_oRemoved); + } else { + _s.oMC.innerHTML = _oRemovedHTML; + } + _oRemoved = null; + _didAppend = true; + } + _flash = _s.getMovie(_s.id); + } + + // + if (_flash) { + _wDS('waitEI'); + } + // + + if (typeof _s.oninitmovie === 'function') { + setTimeout(_s.oninitmovie, 1); + } + + return true; + + }; + + _delayWaitForEI = function() { + + setTimeout(_waitForEI, 1000); + + }; + + _waitForEI = function() { + + var p, + loadIncomplete = false; + + if (!_s.url) { + // No SWF url to load (noURL case) - exit for now. Will be retried when url is set. + return false; + } + + if (_waitingForEI) { + return false; + } + + _waitingForEI = true; + _event.remove(_win, 'load', _delayWaitForEI); + + if (_tryInitOnFocus && !_isFocused) { + // Safari won't load flash in background tabs, only when focused. + _wDS('waitFocus'); + return false; + } + + if (!_didInit) { + p = _s.getMoviePercent(); + _s._wD(_str('waitImpatient', (p > 0 ? ' (SWF ' + p + '% loaded)' : ''))); + if (p > 0 && p < 100) { + loadIncomplete = true; + } + } + + setTimeout(function() { + + p = _s.getMoviePercent(); + + if (loadIncomplete) { + // special case: if movie *partially* loaded, retry until it's 100% before assuming failure. + _waitingForEI = false; + _s._wD(_str('waitSWF')); + _win.setTimeout(_delayWaitForEI, 1); + return false; + } + + // + if (!_didInit) { + _s._wD(_sm + ': No Flash response within expected time.\nLikely causes: ' + (p === 0?'Loading ' + _s.movieURL + ' may have failed (and/or Flash ' + _fV + '+ not present?), ':'') + 'Flash blocked or JS-Flash security error.' + (_s.debugFlash?' ' + _str('checkSWF'):''), 2); + if (!_overHTTP && p) { + _wDS('localFail', 2); + if (!_s.debugFlash) { + _wDS('tryDebug', 2); + } + } + if (p === 0) { + // if 0 (not null), probably a 404. + _s._wD(_str('swf404', _s.url)); + } + _debugTS('flashtojs', false, ': Timed out' + _overHTTP?' (Check flash security or flash blockers)':' (No plugin/missing SWF?)'); + } + // + + // give up / time-out, depending + + if (!_didInit && _okToDisable) { + if (p === null) { + // SWF failed. Maybe blocked. + if (_s.useFlashBlock || _s.flashLoadTimeout === 0) { + if (_s.useFlashBlock) { + _flashBlockHandler(); + } + _wDS('waitForever'); + } else { + // old SM2 behaviour, simply fail + _failSafely(true); + } + } else { + // flash loaded? Shouldn't be a blocking issue, then. + if (_s.flashLoadTimeout === 0) { + _wDS('waitForever'); + } else { + _failSafely(true); + } + } + } + + }, _s.flashLoadTimeout); + + }; + + _handleFocus = function() { + + function cleanup() { + _event.remove(_win, 'focus', _handleFocus); + } + + if (_isFocused || !_tryInitOnFocus) { + // already focused, or not special Safari background tab case + cleanup(); + return true; + } + + _okToDisable = true; + _isFocused = true; + _wDS('gotFocus'); + + // allow init to restart + _waitingForEI = false; + + // kick off ExternalInterface timeout, now that the SWF has started + _delayWaitForEI(); + + cleanup(); + return true; + + }; + + _showSupport = function() { + + // + + var item, tests = []; + + if (_s.useHTML5Audio && _s.hasHTML5) { + for (item in _s.audioFormats) { + if (_s.audioFormats.hasOwnProperty(item)) { + tests.push(item + ': ' + _s.html5[item] + (!_s.html5[item] && _hasFlash && _s.flash[item] ? ' (using flash)' : (_s.preferFlash && _s.flash[item] && _hasFlash ? ' (preferring flash)': (!_s.html5[item] ? ' (' + (_s.audioFormats[item].required ? 'required, ':'') + 'and no flash support)' : '')))); + } + } + _s._wD('-- SoundManager 2: HTML5 support tests ('+_s.html5Test+'): '+tests.join(', ')+' --',1); + } + + // + + }; + + _initComplete = function(bNoDisable) { + + if (_didInit) { + return false; + } + + if (_s.html5Only) { + // all good. + _s._wD('-- SoundManager 2: loaded --'); + _didInit = true; + _initUserOnload(); + _debugTS('onload', true); + return true; + } + + var wasTimeout = (_s.useFlashBlock && _s.flashLoadTimeout && !_s.getMoviePercent()), + result = true, + error; + + if (!wasTimeout) { + _didInit = true; + if (_disabled) { + error = {type: (!_hasFlash && _needsFlash ? 'NO_FLASH' : 'INIT_TIMEOUT')}; + } + } + + _s._wD('-- SoundManager 2 ' + (_disabled?'failed to load':'loaded') + ' (' + (_disabled?'Flash security/load error':'OK') + ') --', 1); + + if (_disabled || bNoDisable) { + if (_s.useFlashBlock && _s.oMC) { + _s.oMC.className = _getSWFCSS() + ' ' + (_s.getMoviePercent() === null?_swfCSS.swfTimedout:_swfCSS.swfError); + } + _processOnEvents({type:'ontimeout', error:error, ignoreInit: true}); + _debugTS('onload', false); + _catchError(error); + result = false; + } else { + _debugTS('onload', true); + } + + if (!_disabled) { + if (_s.waitForWindowLoad && !_windowLoaded) { + _wDS('waitOnload'); + _event.add(_win, 'load', _initUserOnload); + } else { + // + if (_s.waitForWindowLoad && _windowLoaded) { + _wDS('docLoaded'); + } + // + _initUserOnload(); + } + } + + return result; + + }; + + /** + * apply top-level setupOptions object as local properties, eg., this.setupOptions.flashVersion -> this.flashVersion (soundManager.flashVersion) + * this maintains backward compatibility, and allows properties to be defined separately for use by soundManager.setup(). + */ + + _setProperties = function() { + + var i, + o = _s.setupOptions; + + for (i in o) { + + if (o.hasOwnProperty(i)) { + + // assign local property if not already defined + + if (typeof _s[i] === 'undefined') { + + _s[i] = o[i]; + + } else if (_s[i] !== o[i]) { + + // legacy support: write manually-assigned property (eg., soundManager.url) back to setupOptions to keep things in sync + _s.setupOptions[i] = _s[i]; + + } + + } + + } + + }; + + + _init = function() { + + _wDS('init'); + + // called after onload() + + if (_didInit) { + _wDS('didInit'); + return false; + } + + function _cleanup() { + _event.remove(_win, 'load', _s.beginDelayedInit); + } + + if (_s.html5Only) { + if (!_didInit) { + // we don't need no steenking flash! + _cleanup(); + _s.enabled = true; + _initComplete(); + } + return true; + } + + // flash path + _initMovie(); + + try { + + _wDS('flashJS'); + + // attempt to talk to Flash + _flash._externalInterfaceTest(false); + + // apply user-specified polling interval, OR, if "high performance" set, faster vs. default polling + // (determines frequency of whileloading/whileplaying callbacks, effectively driving UI framerates) + _setPolling(true, (_s.flashPollingInterval || (_s.useHighPerformance ? 10 : 50))); + + if (!_s.debugMode) { + // stop the SWF from making debug output calls to JS + _flash._disableDebug(); + } + + _s.enabled = true; + _debugTS('jstoflash', true); + + if (!_s.html5Only) { + // prevent browser from showing cached page state (or rather, restoring "suspended" page state) via back button, because flash may be dead + // http://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/ + _event.add(_win, 'unload', _doNothing); + } + + } catch(e) { + + _s._wD('js/flash exception: ' + e.toString()); + _debugTS('jstoflash', false); + _catchError({type:'JS_TO_FLASH_EXCEPTION', fatal:true}); + // don't disable, for reboot() + _failSafely(true); + _initComplete(); + + return false; + + } + + _initComplete(); + + // disconnect events + _cleanup(); + + return true; + + }; + + _domContentLoaded = function() { + + if (_didDCLoaded) { + return false; + } + + _didDCLoaded = true; + + // assign top-level soundManager properties eg. soundManager.url + _setProperties(); + + _initDebug(); + + /** + * Temporary feature: allow force of HTML5 via URL params: sm2-usehtml5audio=0 or 1 + * Ditto for sm2-preferFlash, too. + */ + // + (function(){ + + var a = 'sm2-usehtml5audio=', + a2 = 'sm2-preferflash=', + b = null, + b2 = null, + hasCon = (typeof console !== 'undefined' && typeof console.log === 'function'), + l = _wl.toLowerCase(); + + if (l.indexOf(a) !== -1) { + b = (l.charAt(l.indexOf(a)+a.length) === '1'); + if (hasCon) { + console.log((b?'Enabling ':'Disabling ')+'useHTML5Audio via URL parameter'); + } + _s.setup({ + 'useHTML5Audio': b + }); + } + + if (l.indexOf(a2) !== -1) { + b2 = (l.charAt(l.indexOf(a2)+a2.length) === '1'); + if (hasCon) { + console.log((b2?'Enabling ':'Disabling ')+'preferFlash via URL parameter'); + } + _s.setup({ + 'preferFlash': b2 + }); + } + + }()); + // + + if (!_hasFlash && _s.hasHTML5) { + _s._wD('SoundManager: No Flash detected'+(!_s.useHTML5Audio?', enabling HTML5.':'. Trying HTML5-only mode.')); + _s.setup({ + 'useHTML5Audio': true, + // make sure we aren't preferring flash, either + // TODO: preferFlash should not matter if flash is not installed. Currently, stuff breaks without the below tweak. + 'preferFlash': false + }); + } + + _testHTML5(); + _s.html5.usingFlash = _featureCheck(); + _needsFlash = _s.html5.usingFlash; + _showSupport(); + + if (!_hasFlash && _needsFlash) { + _wDS('needFlash'); + // TODO: Fatal here vs. timeout approach, etc. + // hack: fail sooner. + _s.setup({ + 'flashLoadTimeout': 1 + }); + } + + if (_doc.removeEventListener) { + _doc.removeEventListener('DOMContentLoaded', _domContentLoaded, false); + } + + _initMovie(); + return true; + + }; + + _domContentLoadedIE = function() { + + if (_doc.readyState === 'complete') { + _domContentLoaded(); + _doc.detachEvent('onreadystatechange', _domContentLoadedIE); + } + + return true; + + }; + + _winOnLoad = function() { + // catch edge case of _initComplete() firing after window.load() + _windowLoaded = true; + _event.remove(_win, 'load', _winOnLoad); + }; + + // sniff up-front + _detectFlash(); + + // focus and window load, init (primarily flash-driven) + _event.add(_win, 'focus', _handleFocus); + _event.add(_win, 'load', _delayWaitForEI); + _event.add(_win, 'load', _winOnLoad); + + if (_doc.addEventListener) { + + _doc.addEventListener('DOMContentLoaded', _domContentLoaded, false); + + } else if (_doc.attachEvent) { + + _doc.attachEvent('onreadystatechange', _domContentLoadedIE); + + } else { + + // no add/attachevent support - safe to assume no JS -> Flash either + _debugTS('onload', false); + _catchError({type:'NO_DOM2_EVENTS', fatal:true}); + + } + +} // SoundManager() + +// SM2_DEFER details: http://www.schillmania.com/projects/soundmanager2/doc/getstarted/#lazy-loading + +if (typeof SM2_DEFER === 'undefined' || !SM2_DEFER) { + soundManager = new SoundManager(); +} + +/** + * SoundManager public interfaces + * ------------------------------ + */ + +window.SoundManager = SoundManager; // constructor +window.soundManager = soundManager; // public API, flash callbacks etc. + +}(window)); \ No newline at end of file diff --git a/timeside/ui/js/markermap.js b/timeside/static/timeside/js/markermap.js similarity index 100% rename from timeside/ui/js/markermap.js rename to timeside/static/timeside/js/markermap.js diff --git a/timeside/ui/js/player.js b/timeside/static/timeside/js/player.js similarity index 87% rename from timeside/ui/js/player.js rename to timeside/static/timeside/js/player.js index b963f6f..4b6a1a0 100644 --- a/timeside/ui/js/player.js +++ b/timeside/static/timeside/js/player.js @@ -29,7 +29,7 @@ //playerDiv, sound, durationInMsec, visualizers, markerMap); Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ - + //sound duration is in milliseconds because the soundmanager has that unit, //player (according to timeside syntax) has durations in seconds // newMarkerCallback must be either a string or a function, the necessary checks is done in Timeside.load @@ -63,7 +63,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ } var onReadyWithImage = configObject.onReadyWithImage; - + if(typeof onReadyWithImage === 'function'){ var onReadyWithImageNamespace = 'imgRefreshed.temp_'+new Date().getTime(); //get an unique namespace this.bind(onReadyWithImageNamespace,function(data){ @@ -109,6 +109,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ var soundOptions = sound; if(sMan.canPlayURL(soundOptions.url)){ //this actually checks only if the url is well formed, not if the file is there //check if we specified a valid sound duration, otherwise the sound must be loaded + sound = sMan.createSound(soundOptions); }else{ this.soundErrorMsg = 'bad sound parameter (soundManager.canPlayURL returned false)'; @@ -120,6 +121,9 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ return undefined; }; }else{ + // sound.play = function(){ + // alert(this.readyState); + // }; this.getSound = function(){ return sound; }; @@ -155,24 +159,24 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ this.playState = 0; //0: not playing, 1: loading, 2:buffering, 3 playing (sound heard) //container is the div #player - + this.getContainer = function(){ return container; }; - - + + var sd = this.toSec(soundDurationInMsec); this.getSoundDuration = function(){ return sd; }; - + this.soundPosition = sound.position ? this.toSec(sound.position) : 0; - this.soundVolume = 100; //set to maximum - - + + + // - + //initializing markermap and markerui var map = new Timeside.classes.MarkerMap(); this.getMarkerMap = function(){ @@ -186,7 +190,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ this.newMarker = newMarker; } } - + //build the innerHTML as array, then join it. This is usually faster than string concatenation in some browsers. //Note that the player image (see below) is not created now, however, if it was, it should be given a src //as NOT specifying any src for image tags can be harmful, @@ -216,7 +220,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ "
"]; container.html(html.join('')); - + var control = container.find('.ts-control'); //bind events to buttons: @@ -282,10 +286,10 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ return setVolume(event,volumeBar); }); volumeSpeaker.attr('href', '#').click(function(){ - me.setSoundVolume(me.soundVolume>0 ? 0 : getVol(volumeBar.outerWidth())); + me.setSoundVolume(me.getSoundVolume()>0 ? 0 : getVol(volumeBar.outerWidth())); return false; }); - this.setSoundVolume(this.soundVolume); + this.setSoundVolume(this.getSoundVolume()); control.find('a').attr('href', '#') ; @@ -373,6 +377,8 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ onReady(this); }, + + //functions for converting seconds (player unit) to milliseconds (sound manager unit) and viceversa: toSec: function(milliseconds){ return milliseconds/1000; @@ -380,7 +386,18 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ toMsec : function(seconds){ //this function has less performances than toSec, as it calls Math.round return Math.round(1000*seconds); //however, it is assumed that it is NOT called in loops }, - + isPlaying : function(){ + var sound = this.getSound(); + if(!sound){ + return false; + } + return this.playState; + /*Numeric value indicating the current playing state of the sound. + * 0 = stopped/uninitialised + * 1 = playing or buffering sound (play has been called, waiting for data etc.) + *Note that a 1 may not always guarantee that sound is being heard, given buffering and autoPlay status.*/ + //return sound && sound.playState==1; + }, setSoundPosition: function(newPositionInSeconds){ //if the player is playing and NOT yet fully loaded, simply calling: //this.getSound().setPosition(this.toMsec(newPositionInSeconds)); @@ -390,7 +407,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ // this.play(); //however, that causes fast pointer move effect is undesiderable //So: - var wasPlaying = this.playState > 0; + var wasPlaying = this.isPlaying(); if(wasPlaying){ this.getSound().stop(); //dont call this.pause cause it hides the waitbar, if visible and resets the playState } @@ -403,11 +420,11 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ //set sound position: var oldSoundPosition = this.soundPosition; this.soundPosition = newPositionInSeconds; - + //resume playing if it was playing: if(wasPlaying){ var player = this; - + //delay a little bit the play resume, this might avoid fast pointer repositioning //(it should not be the case, but it happens. why??) setTimeout(function(){ @@ -423,25 +440,12 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ showSoundErroMessage: function(){ alert(this.soundErrorMsg); }, - readyState : function(){ - var s = this.getSound(); - return s ? s.readyState : 2; - //attach onload event only if the sound is NOT already loaded: - /*sound.readyState - * Numeric value indicating a sound's current load status - * -1: sound error on construcotr, sound is undefined - * 0 = uninitialised - * 1 = loading - * 2 = failed/error - * 3 = loaded/success - */ - }, //given a marker at index I, specifies that a marker corss event is fired whenever the sound position (pointer) //is in the interval ]markerCrossedOffsetMargin-I,I+markerCrossedOffsetMargin[ //the value is in seconds //markerCrossedOffsetMargin : 0.5, play : function(){ - + if(this.soundErrorMsg){ alert(this.soundErrorMsg); return false; @@ -456,36 +460,6 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ } - var playOptions = {}; //the play options to be passed to the play method - - var readyState = this.readyState(); - - //create event loadErrorFunction only if the sound is NOT already loaded: - /* - * Numeric value indicating a sound's current load status - * 0 = uninitialised - * 1 = loading - * 2 = failed/error - * 3 = loaded/success - */ - if(readyState !== 3){ - playOptions.onload = function(success){ - if(!success){ - sound.stop(); - player.playState = 0; - player.setWait(player.isImgRefreshing ? player.msgs.imgRefreshing : ''); - player.soundErrorMsg = 'Error while loading sound: check sound url'; - player.showSoundErroMessage(); - } - }; - - if(sound.readyState === 2){ - playOptions.onload(false); - return false; - } - } - - var fireOnMarkerPosition = function(seconds){}; //does nothing by default var map = player.getMarkerMap(); var markerCrossListeners = player.listenersMap['markerCrossed']; @@ -521,7 +495,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ data.currentSoundPosition = seconds; data.nextMarkerTimeInterval = marker ? [offs-margin, offs+margin] : undefined; player.fire('markerCrossed',data); - + if(idx= this.getSoundDuration()){ playOptions.onfinish(); }else{ - sound.setVolume(this.soundVolume); //workaround. Just to be sure. Sometimes it fails when we re-play + sound.setVolume(sound.volume); //workaround. Just to be sure. Sometimes it fails when we re-play sound.play(playOptions); // soundManager.play(sound.sId,{ // onload: function(success){ @@ -664,7 +659,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ //we don't check if it's playing, as the stop must really stop anyway //if(sound && this.isPlaying()){ if(sound){ - //var v = this.isPlaying(); + var v = this.isPlaying(); sound.stop(); var data = { player:this, @@ -684,7 +679,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ setWait: function(msg){ var wait = undefined; - + wait = this.getWaitElement(); if(!wait || msg === undefined){ return; @@ -694,7 +689,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ } var visible = wait.css('display') != 'none'; - + if(msg && !visible){ wait.show(); this.fire('waitShown'); @@ -732,11 +727,11 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ } },100); }, - + resize: function() { var height; var container = this.getContainer(); - + var wave = container.find('.ts-wave'); height = wave.height(); @@ -777,7 +772,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ var container = this.getContainer(); var imageC = container.find('.ts-image-container'); var image = imageC.find('.ts-image'); - + var size = this.getImageSize(); @@ -789,9 +784,9 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ if(!imageNotYetCreated && image.attr('src')==imgSrc){ return; } - + var player= this; - + if(imageNotYetCreated){ image = this.$J(''); } @@ -828,7 +823,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ this.isImgRefreshing = true; this.fire('imgRefreshing'); image.attr('src', imgSrc); - + }, getImageSize: function(){ var wave = this.getContainer().find('.ts-wave'); @@ -863,6 +858,10 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ } }, + getSoundVolume :function(){ + var s = this.getSound(); + return s ? s.volume : 0; + }, //moves the pointer (and sound position) forward till the next marker or the end of sound forward: function() { var map = this.getMarkerMap(); @@ -880,7 +879,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ idx++; } } - + if(idx< len){ offset = markers[idx].offset; } @@ -912,24 +911,19 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ }, setSoundVolume: function(volume){ - if(typeof volume != 'number'){ //note: typeof for primitive values, instanceof for the rest //see topic http://stackoverflow.com/questions/472418/why-is-4-not-an-instance-of-number volume = 100; } - if(volume<0){ volume = 0; }else if(volume>100){ volume = 100; } volume = Math.round(volume); - this.soundVolume = volume; - if(this.playState>0){ - var s = this.getSound(); - if(s){ - s.setVolume(volume); - } + var sound = this.getSound(); + if(sound){ + sound.setVolume(volume); } var control = this.getContainer().find('.ts-control'); var volumeSpeaker = control.find('.ts-volume-speaker'); @@ -1012,10 +1006,9 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ //TODO: think about if clearing or not: we assign some bindings in the constructor, too: // map.clear(); // ruler.clear(); - - + var rulerAdd = ruler.add; - + if(markers){ //add markers to the map. No listeners associated to it (for the moment) for(var i =0; i< markers.length; i++){ @@ -1027,8 +1020,6 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ rulerAdd.apply(ruler,[marker.offset, i, marker.isEditable]); }); } - - //the function above calls map.add: //add bindings when adding a marker: @@ -1052,7 +1043,7 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ }); //and now add a binding to the map when we move a marker: - + map.bind('move', function(data){ var from = data.fromIndex; var to = data.toIndex; @@ -1060,7 +1051,6 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ player.fire('markerMoved',data); }); - //remove map.bind('remove',function(data){ ruler.remove.apply(ruler, [data.index]); @@ -1072,7 +1062,5 @@ Timeside.classes.Player = Timeside.classes.TimesideClass.extend({ ruler.setEditable.apply(ruler, [data.index, data.value]); player.fire('markerEditStateChanged',data); }); - } - -}); \ No newline at end of file +}); diff --git a/timeside/ui/js/ruler.js b/timeside/static/timeside/js/ruler.js similarity index 100% rename from timeside/ui/js/ruler.js rename to timeside/static/timeside/js/ruler.js diff --git a/timeside/ui/js/rulermarker.js b/timeside/static/timeside/js/rulermarker.js similarity index 100% rename from timeside/ui/js/rulermarker.js rename to timeside/static/timeside/js/rulermarker.js diff --git a/timeside/ui/js/timeside.js b/timeside/static/timeside/js/timeside.js similarity index 99% rename from timeside/ui/js/timeside.js rename to timeside/static/timeside/js/timeside.js index ed0cb99..c764d46 100644 --- a/timeside/ui/js/timeside.js +++ b/timeside/static/timeside/js/timeside.js @@ -34,7 +34,6 @@ var Timeside = { classes:{}, player:undefined, config: { - /** *set to true to see debug messages on the console (only error or warning messages shown) */ @@ -78,7 +77,7 @@ var Timeside = { vml: undefined, /** - * property that will be set to true if soundManager fails to initialize flash + * property that will be set to false if soundManager fails to initialize flash */ flashFailed : false } @@ -90,7 +89,7 @@ var Timeside = { * MIT Licensed. * (Inspired by base2 and Prototype) */ - + /* * In few words: the lightest and most-comprehensive way to implement inhertance and OOP in javascript. Usages can be found below. * Basically, @@ -119,7 +118,7 @@ var Timeside = { * this._super(); //!!!ERROR: methods defined in the init function don't have acces to _super * } * this.alert = function(){ //another public method, !!!WARNING: this will be put in the MyClass scope (NOT in the prototype) - * alert('ok'); + * alert('ok'); * } * }, * count:0, //public property @@ -132,7 +131,7 @@ var Timeside = { * this._super(); //call the super constructor * } * alert: function(){ //override a method - * this._super(); //call the super method, ie alerts 'no'. WARNING: However, as long as there is an alert written + * this._super(); //call the super method, ie alerts 'no'. WARNING: However, as long as there is an alert written * //in the init method of the superclass (see above), THAT method will be called * } * }); @@ -210,7 +209,7 @@ var Timeside = { // Populate our constructed prototype object Class.prototype = prototype; - + // Enforce the constructor to be what we expect Class.constructor = Class; @@ -234,7 +233,7 @@ Timeside.classes.TimesideClass = Timeside.Class.extend({ //(ie, every instance has its own copy) this.listenersMap={}; }, - + cssPrefix : 'ts-', //actually almost uneuseful, still here for backward compatibility with old code (TODO: remove?) $J : jQuery, //reference to jQuery for faster lookup inside methods $TU : Timeside.utils, //reference to Timeside variable for faster lookup inside methods @@ -266,7 +265,7 @@ Timeside.classes.TimesideClass = Timeside.Class.extend({ cb.apply(optionalThisArgInCallback,[data]); }; } - + if(listenersMap.hasOwnProperty(eventType)){ listenersMap[eventType].push(callback); }else{ @@ -343,7 +342,7 @@ Timeside.classes.TimesideClass = Timeside.Class.extend({ callbacks[i](dataArgument); } }, - + /* *formats (ie returns a string representation of) a time which is in the form seconds,milliseconds (eg 07.6750067) * formatArray is an array of strings which can be: @@ -364,7 +363,7 @@ Timeside.classes.TimesideClass = Timeside.Class.extend({ if(!(formatArray)){ formatArray = ['mm','ss']; } - + //marker offset is in float format second.decimalPart var pInt = parseInt; var round = Math.round; @@ -376,7 +375,7 @@ Timeside.classes.TimesideClass = Timeside.Class.extend({ time-=minutes*factor; var seconds = pInt(time); time-=seconds; - + //here below the function to format a number //ceilAsPowerOfTen is the ceil specifiedas integer indicating the relative power of ten //(0: return the number as it is, 1: format as "0#" and so on) @@ -476,7 +475,7 @@ Timeside.classes.TimesideArray = Timeside.classes.TimesideClass.extend({ //2) each(m, callback) iterates over the elements from m executing callback //3) each(m,n,callback) iterates over the elements from m (inclusive) to n-1 (inclusive) executing callback - //NOTE: writing each : function(startInclusive, endExclusive, callback) throws an error in chrome, as the last + //NOTE: writing each : function(startInclusive, endExclusive, callback) throws an error in chrome, as the last //argument (even if it is a function) is a number. Why????? //Anyway, we write the function arguments as empty each : function(){ @@ -513,7 +512,7 @@ Timeside.classes.TimesideArray = Timeside.classes.TimesideClass.extend({ for(var i = startInclusive; iF3woGtg6js{rtOfJ-UZ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5 zX!p{sE}G-4X=$L%{&5U8o*xne`MVv@-2(eGhOt~Um5Lm2eHvF%J(`|cWojx^ zjgLUyB$>mZ`|YYMT&TzaKC(UClw%i?iX|X<))mx5c;_t7~zaRO5clJ^3;u-B>L%7mmo&K&rFWs;tBE z+7CEva#Y5D_aH4tB;%xX(|i2_MU5J{2@}fg&f(lyhWNo(NPHy6Y#Ed1lI=+E@Gxx( zs@`OJ=JtO7!eI51KS-#~svnoJJ;lpR_*m10M;Ee?Q5xRsMb5o!XsfvHL^Ik4{nGF0cb>f+n1f@gc$ITA7A!aV`Eg2H#<#kfbHc z{GrVI*nA%EWZ zxH^nBy#|uA(xX zqjw;V2;QSciJ!@w*bMPD_rZHF#CvZay!S)A_xHj3AjJD%A3Qt6v-iRKFvRO zhoWamr%C;ne@>*kzmz(`Y^AbuR0^f28EKYZO&8$R>~&mz@*GlGU7xEh)K}-0%Rv9& m*!6E${^gSCk`RUPH_Av)g%w1hVHUyv0RRC1{{sMTPgM7m*Mv9# literal 0 HcmV?d00001 diff --git a/timeside/static/timeside/swf/soundmanager2_flash9.swf b/timeside/static/timeside/swf/soundmanager2_flash9.swf new file mode 100755 index 0000000000000000000000000000000000000000..309965967071911f025565587cf932f6ec96e6e9 GIT binary patch literal 8700 zcmV`GEl;-QB%cyY@cBK4d#d6C*GXAPKLS@HUw6CO{yNkN^p3LehlfY8C93=Fz5Y znzl*Xw0Y39i8^!c-G^k%_w`TpdConLIdf*_%$b>U77jAyXN>tDV{9Ih?>{`*eV#PAV zSXMZcEoujsWeaDwuayM4^+G(K8ZD-B*)X-WSgusOxV_z`nuu44j+XLiNiq@d)YE!K z&lU@v%R81Mp+tO*k;`Ya;#zHVG@XiTM6UDTvO+Q!-+w?G)0Y`(t&qH^vxZ1>im75+ zU%Nh$i|OIsw0bZwoO8qMyA=Q5q6`COtDN1hBMB`4QUArhmd zSUOcm>iM;$?EY--fVD)emvG{FT`T6MV^sQRJgsF%O4^9Nwr86htF|SNT2Ws+ppS-^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DN`3sh5{jO#GUP6u6QJg4I-aBUf24GgNA=r1$m*zhF zEaiH^cB$jWur%|_EtQ@|olT6@)}3AN+N%4E26H|g`sH*QMuz>yQ)u)bw^GFsJ99h? zl{P&Ana0Pg*HgBNCT^cT@x2)nr?sy;g^(PsWvG_7xu9mu7vhD$IUf(?)71;X2K;w9 a&<(&z_xf4%pZ%Tse;=bIvi}9%r6;z|?f}UE literal 0 HcmV?d00001 diff --git a/timeside/static/timeside/swf/soundmanager2_flash9_debug.swf b/timeside/static/timeside/swf/soundmanager2_flash9_debug.swf new file mode 100755 index 0000000000000000000000000000000000000000..4e9bf2f563a49330206de92a2e98326e36decdc6 GIT binary patch literal 17103 zcmV(yKn--0j<0Vd{b2xKmP7}FL_D2rD5On0i~rFy3#@`A{7XW3JS%# zOl4l0JX%eYnxtiMW~@~Z_Z@ewiYVf~Gw#kfIO=E$3gbF6js>@>W)#a6Sb#>(xRpnJx(}6KPu`Zf4)=rNmCYQ|N z1m=emE%COFWLqq%6G0;w>r5V1QesmLwPc8PbjBl`WT>S)90|9Fqsc^hWmzQ%g<9&( zSiIdx&M`VVB5f@Okt<(2J<%F#IdhHC6`pQJj700~@_t0hlWa>y!gCrzv0zvaM8a$J z8G1v1evU0r2szYW(K%VoG$?mjORT-TBOVKNwxCWXNb$_sS%^eOXE4&1Xbs2bbVkpN z#@0kRR(~wvw8XfNl~wqr1WbEJH4=a{9-rk~KTVnx%k<@2Rf0Y-Vi-+b>smD$of`M`k#r+O45 zIpI|2?WYQ?{a!*NGE zoCqgJt_rVBhT~BqvN#H88ZF_*a3ZO8#o9u{4$53qk;56LtTWjbNjMsbPM(MfwIwB zYQlvkCeU9APa`TB;Ee1Mr6m#Jrk@qbb&>EWBNBqXTS6K(nEmksbic~wP4ZF#V> zEs|`D4j<5&^`bM221d>oJuNzkdKhgE#}6Nf#7EOWw|0dE;<$n71Bi?lY2hwX9rX(c zP`Z(9flLb+#2`MJ~pe}j8T60?ZX%#LQ%;5QUbM1Jy(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>}7Y;#D({Ym;tl)> zYQA&>o=>8tP>eaK&rM3I&sgonRASx2z1FSN44!ryRe!PEc@b|tO=Wl)m?Q^fynr&Smnf=`Ci)1XUgpJ~D7~x!w*pB0;K_c<|1xw2NiE&3 z#i|K0zY{X`s^W#=5Vx0vdnX?CR_~#!;jbvW>=jC8#liTBgSq5!Zyh+mUOaFBzZ$?p{ zVyMP&AqNLS$hp9CdjrJ1UECVue?a3cF%A~c^8#_y885$!p|QUhT#r3?6M8g85D$T@ z|Jh~j6>Wtml=9la9tH1^{)l%F;ltDOee7MvHed~da>jGR2)J8qX95n7aqx;x?($(- zN^icQ-V>69b&`u|Fy3B54aAcTn2 z=`|oYX0xvj-fLApVw;g2>+AFe?K&Wc5xstJyV65RcZ+Yzv|~7Fv|EtNo^|g~Gt7D? zy#pRWbHaRx!dASm#LHtKHlJmlWp<^^HGFouhez3a=e0a)8;^>aF>_tYT+gHKC0Zki z))}C6AJMvhAT63<9vDcAq8`kSI-ApaXdrpQdIV8f8+eL(lu8^$9|GuB?~^Ez#P~_o z+Cd4Uaii671i#Tbz8Q8_i_9Y2XeAp)70o$j4*%hoS6eTnxo#}gei+VZ2i;nQU43aT KV*d|=Iz&D>rZ9;B literal 0 HcmV?d00001 diff --git a/timeside/static/timeside/swf/soundmanager2_flash_xdomain.zip b/timeside/static/timeside/swf/soundmanager2_flash_xdomain.zip new file mode 100755 index 0000000000000000000000000000000000000000..b745e64d813731722b327a843dc4cf514ab14fb5 GIT binary patch literal 32791 zcmbTdQ;a4|*uU8}r)}Gwwr$(S)3$Bfw(+!WP20AuY4_~=eVgn*d$^m_U8z(Z)LG@a za{o$6790W&1Ox;I#4e0k_((85UI`uqME1X8_;1(6!Oh+bU~F$}Y3|HwXklmUVrA%Q z<^V9ZwrBc(oiVz2Sb)mH1D{1TRbi-cK|nk=f!eYzc;l${^q2!GzbJBmaqHp7946Yu zropTy>zJbzQYqo$V9Y|&NdQ;_5K*JLQO4%(#F6frL)pY?e62Fk>SR&-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h==TEGF!hfO!X4R0&NBkaSWQfu$ULM;Aq35Frp;lI~hXElES;J&}LY z51b*aD9LKoU?Vzi6)M$J>|&(ee@=9`8421s_i?fPG&POu78UTCOC75o=(hQu zquXOVKY-Xrnmmschj~Z!gP)wLcXeRM>)}PKH-uQpmD<2uKzG>Y{pYrzaqRtK_mg15 z^vaY(TVaU;tI|o>0JNY$;8#pNvIiZQ`< z6n+fy5DC$RpPS}~s5TKyNtau_YCli0z`m`>>n-gUkXKlPtj1t|cEqLy$o0P?gZ_iY zxLt+Ho!%O$3tkT8FJRP4#TyQ|B8nA#U%_0-v~Y$-~<-kb(^O~5E>QHK%xnP1k2&eAB%*O5YqC# zid%idQyx;IF-Nc$uU-(9j9eD0g6x;_u^m5u{L}xVtzKm5H}V-=vlM2;eI(KS-K$`s z#2~{3MMUiC2@e&!ab6YnqLmW2s%A3!&fP88i2!9JQb({^`>3$ceUQa`g(dmx3gfWR ze2ZrZu4!A+K3IG{yB?^p9?zcPjv70h&OF0BLzl`KFE8hMPw{#C4`1ARf02>d)Mh+0 z$9=h11i+%u6~bam{O>h^M3h-NB*a2tIb>7O%<*6RUlO_X_<||`h}=T_5|q)oFrbdR z4^k;oCSRpyH^l*sO*dEEe)~>2n*ewKaT8Rl?s$))sB~<`px^5-pas^l7Dv9BAb@3E zkVDJRSwAyu^#{}=TBA`x8W;o(^#5Hx|Bt8fzpvte|9Jghb@TtfD*FFA`oAmB{6B+% zfQkdMVE+fB{}b2oUj_cVewqIiSi}0C2>fT;%zst*?@%NEsldqdKUes#e*zBiAG5&z P-J!rhKwiH8@%6s|psj?U literal 0 HcmV?d00001 diff --git a/timeside/ui/js/libs/soundmanager2-nodebug-jsmin.js b/timeside/ui/js/libs/soundmanager2-nodebug-jsmin.js deleted file mode 100755 index dcf1b36..0000000 --- a/timeside/ui/js/libs/soundmanager2-nodebug-jsmin.js +++ /dev/null @@ -1,75 +0,0 @@ -/** @license - - SoundManager 2: JavaScript Sound for the Web - ---------------------------------------------- - http://schillmania.com/projects/soundmanager2/ - - Copyright (c) 2007, Scott Schiller. All rights reserved. - Code provided under the BSD License: - http://schillmania.com/projects/soundmanager2/license.txt - - V2.97a.20110424 -*/ -(function(Y){function M(M,X){function i(c){return function(a){return!this._t||!this._t._a?null:c.call(this,a)}}function pa(){if(c.debugURLParam.test(N))c.debugMode=!0}this.flashVersion=8;this.debugFlash=this.debugMode=!1;this.useConsole=!0;this.waitForWindowLoad=this.consoleOnly=!1;this.nullURL="about:blank";this.allowPolling=!0;this.useFastPolling=!1;this.useMovieStar=!0;this.bgColor="#ffffff";this.useHighPerformance=!1;this.flashPollingInterval=null;this.flashLoadTimeout=1E3;this.wmode=null;this.allowScriptAccess= -"always";this.useHTML5Audio=this.useFlashBlock=!1;this.html5Test=/^probably$/i;this.useGlobalHTML5Audio=!0;this.requireFlash=!1;this.audioFormats={mp3:{type:['audio/mpeg; codecs="mp3"',"audio/mpeg","audio/mp3","audio/MPA","audio/mpa-robust"],required:!0},mp4:{related:["aac","m4a"],type:['audio/mp4; codecs="mp4a.40.2"',"audio/aac","audio/x-m4a","audio/MP4A-LATM","audio/mpeg4-generic"],required:!0},ogg:{type:["audio/ogg; codecs=vorbis"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave", -"audio/x-wav"],required:!1}};this.defaultOptions={autoLoad:!1,stream:!0,autoPlay:!1,loops:1,onid3:null,onload:null,whileloading:null,onplay:null,onpause:null,onresume:null,whileplaying:null,onstop:null,onfailure:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5E3,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:!0,multiShotEvents:!1,position:null,pan:0,type:null,usePolicyFile:!1,volume:100};this.flash9Options={isMovieStar:null,usePeakData:!1,useWaveformData:!1, -useEQData:!1,onbufferchange:null,ondataerror:null};this.movieStarOptions={bufferTime:3,serverURL:null,onconnect:null,duration:null};this.version=null;this.versionNumber="V2.97a.20110424";this.movieURL=null;this.url=M||null;this.altURL=null;this.enabled=this.swfLoaded=!1;this.o=null;this.movieID="sm2-container";this.id=X||"sm2movie";this.swfCSS={swfBox:"sm2-object-box",swfDefault:"movieContainer",swfError:"swf_error",swfTimedout:"swf_timedout",swfLoaded:"swf_loaded",swfUnblocked:"swf_unblocked",sm2Debug:"sm2_debug", -highPerf:"high_performance",flashDebug:"flash_debug"};this.oMC=null;this.sounds={};this.soundIDs=[];this.muted=!1;this.debugID="soundmanager-debug";this.debugURLParam=/([#?&])debug=1/i;this.didFlashBlock=this.specialWmodeCase=!1;this.filePattern=null;this.filePatterns={flash8:/\.mp3(\?.*)?$/i,flash9:/\.mp3(\?.*)?$/i};this.baseMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamMimeTypes=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i;this.netStreamTypes=["aac","flv","mov","mp4","m4v", -"f4v","m4a","mp4v","3gp","3g2"];this.netStreamPattern=RegExp("\\.("+this.netStreamTypes.join("|")+")(\\?.*)?$","i");this.mimePattern=this.baseMimeTypes;this.features={buffering:!1,peakData:!1,waveformData:!1,eqData:!1,movieStar:!1};this.sandbox={};this.hasHTML5=null;this.html5={usingFlash:null};this.ignoreFlash=!1;var Z,c=this,y,n=navigator.userAgent,h=Y,N=h.location.href.toString(),k=this.flashVersion,g=document,$,O,r=[],E=!1,F=!1,m=!1,t=!1,qa=!1,G,o,aa,u,z,ba,P,ra,ca,v,sa,H,A,da,ea,Q,fa,ta,ua,R, -va,I=null,ga=null,w,ha,B,S,T,ia,j,U=!1,ja=!1,wa,xa,x=null,ya,V,p=!1,J,s,ka,za,l,Da=Array.prototype.slice,K=!1,la,C,Aa,Ba=n.match(/pre\//i),Ea=n.match(/(ipad|iphone|ipod)/i);n.match(/mobile/i);var q=n.match(/msie/i),Fa=n.match(/webkit/i),L=n.match(/safari/i)&&!n.match(/chrome/i),Ga=n.match(/opera/i),ma=!N.match(/usehtml5audio/i)&&!N.match(/sm2\-ignorebadua/i)&&L&&n.match(/OS X 10_6_([3-9])/i),na=typeof g.hasFocus!=="undefined"?g.hasFocus():null,D=typeof g.hasFocus==="undefined"&&L,Ca=!D;this._use_maybe= -N.match(/sm2\-useHTML5Maybe\=1/i);this._overHTTP=g.location?g.location.protocol.match(/http/i):null;this._http=!this._overHTTP?"http:":"";this.useAltURL=!this._overHTTP;this._global_a=null;if(Ea||Ba)c.useHTML5Audio=!0,c.ignoreFlash=!0,c.useGlobalHTML5Audio&&(K=!0);if(Ba||this._use_maybe)c.html5Test=/^(probably|maybe)$/i;this.supported=this.ok=function(){return x?m&&!t:c.useHTML5Audio&&c.hasHTML5};this.getMovie=function(c){return q?h[c]:L?y(c)||g[c]:y(c)};this.createSound=function(b){function a(){e= -S(e);c.sounds[d.id]=new Z(d);c.soundIDs.push(d.id);return c.sounds[d.id]}var e=null,f=null,d=null;if(!m||!c.ok())return ia("soundManager.createSound(): "+w(!m?"notReady":"notOK")),!1;arguments.length===2&&(b={id:arguments[0],url:arguments[1]});d=e=o(b);if(j(d.id,!0))return c.sounds[d.id];if(V(d))f=a(),f._setup_html5(d);else{if(k>8&&c.useMovieStar){if(d.isMovieStar===null)d.isMovieStar=d.serverURL||d.type&&d.type.match(c.netStreamPattern)||d.url.match(c.netStreamPattern)?!0:!1;if(d.isMovieStar&&d.usePeakData)d.usePeakData= -!1}d=T(d,"soundManager.createSound(): ");f=a();if(k===8)c.o._createSound(d.id,d.onjustbeforefinishtime,d.loops||1,d.usePolicyFile);else if(c.o._createSound(d.id,d.url,d.onjustbeforefinishtime,d.usePeakData,d.useWaveformData,d.useEQData,d.isMovieStar,d.isMovieStar?d.bufferTime:!1,d.loops||1,d.serverURL,d.duration||null,d.autoPlay,!0,d.autoLoad,d.usePolicyFile),!d.serverURL)f.connected=!0,d.onconnect&&d.onconnect.apply(f);(d.autoLoad||d.autoPlay)&&!d.serverURL&&f.load(d)}d.autoPlay&&!d.serverURL&&f.play(); -return f};this.destroySound=function(b,a){if(!j(b))return!1;var e=c.sounds[b],f;e._iO={};e.stop();e.unload();for(f=0;f0)a.resume();else{a.playState=1;a.paused=!1;(!a.instanceCount||a._iO.multiShotEvents||k>8&&!a.isHTML5&&!a.getAutoPlay())&&a.instanceCount++;a.position=typeof a._iO.position!=="undefined"&&!isNaN(a._iO.position)?a._iO.position:0;if(!a.isHTML5)a._iO=T(S(a._iO));if(a._iO.onplay&& -W)a._iO.onplay.apply(a),a._onplay_called=!0;a.setVolume(a._iO.volume,!0);a.setPan(a._iO.pan,!0);a.isHTML5?(d(),a._setup_html5().play()):c.o._start(a.sID,a._iO.loops||1,k===9?a.position:a.position/1E3)}return a};this.stop=function(b){if(a.playState===1){a._onbufferchange(0);a.resetOnPosition(0);if(!a.isHTML5)a.playState=0;a.paused=!1;a._iO.onstop&&a._iO.onstop.apply(a);if(a.isHTML5){if(a._a)a.setPosition(0),a._a.pause(),a.playState=0,a._onTimer(),f(),a.unload()}else c.o._stop(a.sID,b),a._iO.serverURL&& -a.unload();a.instanceCount=0;a._iO={}}return a};this.setAutoPlay=function(b){a._iO.autoPlay=b;a.isHTML5?a._a&&b&&a.play():c.o._setAutoPlay(a.sID,b);b&&!a.instanceCount&&a.readyState===1&&a.instanceCount++};this.getAutoPlay=function(){return a._iO.autoPlay};this.setPosition=function(b){b===void 0&&(b=0);var d=a.isHTML5?Math.max(b,0):Math.min(a.duration||a._iO.duration,Math.max(b,0));a.position=d;b=a.position/1E3;a.resetOnPosition(a.position);a._iO.position=d;if(a.isHTML5){if(a._a&&a._html5_canplay&& -a._a.currentTime!==b)try{a._a.currentTime=b}catch(e){}}else b=k===9?a.position:b,a.readyState&&a.readyState!==2&&c.o._setPosition(a.sID,b,a.paused||!a.playState);a.isHTML5&&a.paused&&a._onTimer(!0);return a};this.pause=function(b){if(a.paused||a.playState===0&&a.readyState!==1)return a;a.paused=!0;a.isHTML5?(a._setup_html5().pause(),f()):(b||b===void 0)&&c.o._pause(a.sID);a._iO.onpause&&a._iO.onpause.apply(a);return a};this.resume=function(){if(!a.paused)return a;a.paused=!1;a.playState=1;a.isHTML5? -(a._setup_html5().play(),d()):(a._iO.isMovieStar&&a.setPosition(a.position),c.o._pause(a.sID));!a._onplay_called&&a._iO.onplay?(a._iO.onplay.apply(a),a._onplay_called=!0):a._iO.onresume&&a._iO.onresume.apply(a);return a};this.togglePause=function(){if(a.playState===0)return a.play({position:k===9&&!a.isHTML5?a.position:a.position/1E3}),a;a.paused?a.resume():a.pause();return a};this.setPan=function(b,d){typeof b==="undefined"&&(b=0);typeof d==="undefined"&&(d=!1);a.isHTML5||c.o._setPan(a.sID,b);a._iO.pan= -b;if(!d)a.pan=b,a.options.pan=b;return a};this.setVolume=function(b,d){typeof b==="undefined"&&(b=100);typeof d==="undefined"&&(d=!1);if(a.isHTML5){if(a._a)a._a.volume=Math.max(0,Math.min(1,b/100))}else c.o._setVolume(a.sID,c.muted&&!a.muted||a.muted?0:b);a._iO.volume=b;if(!d)a.volume=b,a.options.volume=b;return a};this.mute=function(){a.muted=!0;if(a.isHTML5){if(a._a)a._a.muted=!0}else c.o._setVolume(a.sID,0);return a};this.unmute=function(){a.muted=!1;var b=typeof a._iO.volume!=="undefined";if(a.isHTML5){if(a._a)a._a.muted= -!1}else c.o._setVolume(a.sID,b?a._iO.volume:a.options.volume);return a};this.toggleMute=function(){return a.muted?a.unmute():a.mute()};this.onposition=function(c,b,d){a._onPositionItems.push({position:c,method:b,scope:typeof d!=="undefined"?d:a,fired:!1});return a};this.processOnPosition=function(){var b,d;b=a._onPositionItems.length;if(!b||!a.playState||a._onPositionFired>=b)return!1;for(;b--;)if(d=a._onPositionItems[b],!d.fired&&a.position>=d.position)d.method.apply(d.scope,[d.position]),d.fired= -!0,c._onPositionFired++;return!0};this.resetOnPosition=function(b){var d,e;d=a._onPositionItems.length;if(!d)return!1;for(;d--;)if(e=a._onPositionItems[d],e.fired&&b<=e.position)e.fired=!1,c._onPositionFired--;return!0};this._onTimer=function(c){var b={};if(a._hasTimer||c)return a._a&&(c||(a.playState>0||a.readyState===1)&&!a.paused)?(a.duration=a._get_html5_duration(),a.durationEstimate=a.duration,c=a._a.currentTime?a._a.currentTime*1E3:0,a._whileplaying(c,b,b,b,b),!0):!1};this._get_html5_duration= -function(){var c=a._a?a._a.duration*1E3:a._iO?a._iO.duration:void 0;return c&&!isNaN(c)&&c!==Infinity?c:a._iO?a._iO.duration:null};d=function(){a.isHTML5&&wa(a)};f=function(){a.isHTML5&&xa(a)};e=function(){a._onPositionItems=[];a._onPositionFired=0;a._hasTimer=null;a._onplay_called=!1;a._a=null;a._html5_canplay=!1;a.bytesLoaded=null;a.bytesTotal=null;a.position=null;a.duration=a._iO&&a._iO.duration?a._iO.duration:null;a.durationEstimate=null;a.failures=0;a.loaded=!1;a.playState=0;a.paused=!1;a.readyState= -0;a.muted=!1;a.didBeforeFinish=!1;a.didJustBeforeFinish=!1;a.isBuffering=!1;a.instanceOptions={};a.instanceCount=0;a.peakData={left:0,right:0};a.waveformData={left:[],right:[]};a.eqData=[];a.eqData.left=[];a.eqData.right=[]};e();this._setup_html5=function(b){var b=o(a._iO,b),d=K?c._global_a:a._a;decodeURI(b.url);var f=d&&d._t?d._t.instanceOptions:null;if(d){if(d._t&&f.url===b.url&&(!a._lastURL||a._lastURL===f.url))return d;K&&d._t&&d._t.playState&&b.url!==f.url&&d._t.stop();e();d.src=b.url;a.url= -b.url;a._lastURL=b.url;d._called_load=!1}else if(d=new Audio(b.url),d._called_load=!1,K)c._global_a=d;a.isHTML5=!0;a._a=d;d._t=a;a._add_html5_events();d.loop=b.loops>1?"loop":"";b.autoLoad||b.autoPlay?(d.autobuffer="auto",d.preload="auto",a.load(),d._called_load=!0):(d.autobuffer=!1,d.preload="none");d.loop=b.loops>1?"loop":"";return d};this._add_html5_events=function(){if(a._a._added_events)return!1;var b;a._a._added_events=!0;for(b in c._html5_events)c._html5_events.hasOwnProperty(b)&&a._a&&a._a.addEventListener(b, -c._html5_events[b],!1);return!0};this._remove_html5_events=function(){a._a._added_events=!1;for(var b in c._html5_events)c._html5_events.hasOwnProperty(b)&&a._a&&a._a.removeEventListener(b,c._html5_events[b],!1)};this._whileloading=function(c,b,d,e){a.bytesLoaded=c;a.bytesTotal=b;a.duration=Math.floor(d);a.bufferLength=e;if(a._iO.isMovieStar)a.durationEstimate=a.duration;else if(a.durationEstimate=a._iO.duration?a.duration>a._iO.duration?a.duration:a._iO.duration:parseInt(a.bytesTotal/a.bytesLoaded* -a.duration,10),a.durationEstimate===void 0)a.durationEstimate=a.duration;a.readyState!==3&&a._iO.whileloading&&a._iO.whileloading.apply(a)};this._onid3=function(c,b){var d=[],e,f;e=0;for(f=c.length;e0&&(b=0);a.position=b;a.processOnPosition();if(k>8&&!a.isHTML5){if(a._iO.usePeakData&&typeof d!=="undefined"&&d)a.peakData={left:d.leftPeak,right:d.rightPeak}; -if(a._iO.useWaveformData&&typeof e!=="undefined"&&e)a.waveformData={left:e.split(","),right:f.split(",")};if(a._iO.useEQData&&typeof g!=="undefined"&&g&&g.leftEQ&&(b=g.leftEQ.split(","),a.eqData=b,a.eqData.left=b,typeof g.rightEQ!=="undefined"&&g.rightEQ))a.eqData.right=g.rightEQ.split(",")}a.playState===1&&(!a.isHTML5&&c.flashVersion===8&&!a.position&&a.isBuffering&&a._onbufferchange(0),a._iO.whileplaying&&a._iO.whileplaying.apply(a),(a.loaded||!a.loaded&&a._iO.isMovieStar)&&a._iO.onbeforefinish&& -a._iO.onbeforefinishtime&&!a.didBeforeFinish&&a.duration-a.position<=a._iO.onbeforefinishtime&&a._onbeforefinish());return!0};this._onconnect=function(b){b=b===1;if(a.connected=b)a.failures=0,j(a.sID)&&(a.getAutoPlay()?a.play(void 0,a.getAutoPlay()):a._iO.autoLoad&&a.load()),a._iO.onconnect&&a._iO.onconnect.apply(a,[b])};this._onload=function(b){b=b?!0:!1;a.loaded=b;a.readyState=b?3:2;a._onbufferchange(0);a._iO.onload&&a._iO.onload.apply(a,[b]);return!0};this._onfailure=function(b,c,d){a.failures++; -if(a._iO.onfailure&&a.failures===1)a._iO.onfailure(a,b,c,d)};this._onbeforefinish=function(){if(!a.didBeforeFinish)a.didBeforeFinish=!0,a._iO.onbeforefinish&&a._iO.onbeforefinish.apply(a)};this._onjustbeforefinish=function(){if(!a.didJustBeforeFinish)a.didJustBeforeFinish=!0,a._iO.onjustbeforefinish&&a._iO.onjustbeforefinish.apply(a)};this._onfinish=function(){var b=a._iO.onfinish;a._onbufferchange(0);a.resetOnPosition(0);a._iO.onbeforefinishcomplete&&a._iO.onbeforefinishcomplete.apply(a);a.didBeforeFinish= -!1;a.didJustBeforeFinish=!1;if(a.instanceCount){a.instanceCount--;if(!a.instanceCount)a.playState=0,a.paused=!1,a.instanceCount=0,a.instanceOptions={},a._iO={},f();(!a.instanceCount||a._iO.multiShotEvents)&&b&&b.apply(a)}};this._onbufferchange=function(b){if(a.playState===0)return!1;if(b&&a.isBuffering||!b&&!a.isBuffering)return!1;a.isBuffering=b===1;a._iO.onbufferchange&&a._iO.onbufferchange.apply(a);return!0};this._ondataerror=function(){a.playState>0&&a._iO.ondataerror&&a._iO.ondataerror.apply(a)}}; -ea=function(){return g.body?g.body:g._docElement?g.documentElement:g.getElementsByTagName("div")[0]};y=function(b){return g.getElementById(b)};o=function(b,a){var e={},f,d;for(f in b)b.hasOwnProperty(f)&&(e[f]=b[f]);f=typeof a==="undefined"?c.defaultOptions:a;for(d in f)f.hasOwnProperty(d)&&typeof e[d]==="undefined"&&(e[d]=f[d]);return e};l=function(){function b(a){var a=Da.call(a),b=a.length;c?(a[1]="on"+a[1],b>3&&a.pop()):b===3&&a.push(!1);return a}function a(a,b){var g=a.shift(),h=[f[b]];if(c)g[h](a[0], -a[1]);else g[h].apply(g,a)}var c=h.attachEvent,f={add:c?"attachEvent":"addEventListener",remove:c?"detachEvent":"removeEventListener"};return{add:function(){a(b(arguments),"add")},remove:function(){a(b(arguments),"remove")}}}();V=function(b){return!b.serverURL&&(b.type?J({type:b.type}):J(b.url)||p)};J=function(b){if(!c.useHTML5Audio||!c.hasHTML5)return!1;var a,e=c.audioFormats;if(!s){s=[];for(a in e)e.hasOwnProperty(a)&&(s.push(a),e[a].related&&(s=s.concat(e[a].related)));s=RegExp("\\.("+s.join("|")+ -")","i")}a=typeof b.type!=="undefined"?b.type:null;b=typeof b==="string"?b.toLowerCase().match(s):null;if(!b||!b.length)if(a)b=a.indexOf(";"),b=(b!==-1?a.substr(0,b):a).substr(6);else return!1;else b=b[0].substr(1);if(b&&typeof c.html5[b]!=="undefined")return c.html5[b];else{if(!a)if(b&&c.html5[b])return c.html5[b];else a="audio/"+b;a=c.html5.canPlayType(a);return c.html5[b]=a}};za=function(){function b(b){var d,e,f=!1;if(!a||typeof a.canPlayType!=="function")return!1;if(b instanceof Array){d=0;for(e= -b.length;d1&&b.stream)b.stream=!1;return b};T=function(b){if(b&&!b.usePolicyFile&&(b.onid3||b.usePeakData||b.useWaveformData||b.useEQData))b.usePolicyFile=!0;return b};ia=function(b){typeof console!=="undefined"&&typeof console.warn!=="undefined"&&console.warn(b)};$=function(){return!1};ua=function(b){for(var a in b)b.hasOwnProperty(a)&&typeof b[a]==="function"&&(b[a]=$)};R=function(b){typeof b==="undefined"&& -(b=!1);(t||b)&&c.disable(b)};va=function(b){var a=null;if(b)if(b.match(/\.swf(\?.*)?$/i)){if(a=b.substr(b.toLowerCase().lastIndexOf(".swf?")+4))return b}else b.lastIndexOf("/")!==b.length-1&&(b+="/");return(b&&b.lastIndexOf("/")!==-1?b.substr(0,b.lastIndexOf("/")+1):"./")+c.movieURL};ca=function(){if(k!==8&&k!==9)c.flashVersion=8;var b=c.debugMode||c.debugFlash?"_debug.swf":".swf";if(c.useHTML5Audio&&!p&&c.audioFormats.mp4.required&&c.flashVersion<9)c.flashVersion=9;k=c.flashVersion;c.version=c.versionNumber+ -(p?" (HTML5-only mode)":k===9?" (AS3/Flash 9)":" (AS2/Flash 8)");if(k>8)c.defaultOptions=o(c.defaultOptions,c.flash9Options),c.features.buffering=!0;k>8&&c.useMovieStar?(c.defaultOptions=o(c.defaultOptions,c.movieStarOptions),c.filePatterns.flash9=RegExp("\\.(mp3|"+c.netStreamTypes.join("|")+")(\\?.*)?$","i"),c.mimePattern=c.netStreamMimeTypes,c.features.movieStar=!0):(c.useMovieStar=!1,c.features.movieStar=!1);c.filePattern=c.filePatterns[k!==8?"flash9":"flash8"];c.movieURL=(k===8?"soundmanager2.swf": -"soundmanager2_flash9.swf").replace(".swf",b);c.features.peakData=c.features.waveformData=c.features.eqData=k>8};ta=function(b,a){if(!c.o||!c.allowPolling)return!1;c.o._setPolling(b,a)};Q=function(b,a){var e=a?a:c.url,f=c.altURL?c.altURL:e,d;d=ea();var h,k,i=B(),j,l=null,l=(l=g.getElementsByTagName("html")[0])&&l.dir&&l.dir.match(/rtl/i),b=typeof b==="undefined"?c.id:b;if(E&&F)return!1;if(p)return ca(),c.oMC=y(c.movieID),O(),F=E=!0,!1;E=!0;ca();c.url=va(c._overHTTP?e:f);a=c.url;c.wmode=!c.wmode&& -c.useHighPerformance&&!c.useMovieStar?"transparent":c.wmode;if(c.wmode!==null&&(n.match(/msie 8/i)||!q&&!c.useHighPerformance)&&navigator.platform.match(/win32|win64/i))c.specialWmodeCase=!0,c.wmode=null;d={name:b,id:b,src:a,width:"100%",height:"100%",quality:"high",allowScriptAccess:c.allowScriptAccess,bgcolor:c.bgColor,pluginspage:c._http+"//www.macromedia.com/go/getflashplayer",type:"application/x-shockwave-flash",wmode:c.wmode,hasPriority:"true"};if(c.debugFlash)d.FlashVars="debug=1";c.wmode|| -delete d.wmode;if(q)e=g.createElement("div"),k=''+(c.wmode?' ':"")+ -''+(c.debugFlash?'':"")+"";else for(h in e=g.createElement("embed"),d)d.hasOwnProperty(h)&&e.setAttribute(h,d[h]);pa();i=B();if(d=ea())if(c.oMC=y(c.movieID)?y(c.movieID):g.createElement("div"),c.oMC.id){j=c.oMC.className;c.oMC.className=(j?j+" ":c.swfCSS.swfDefault)+(i?" "+i:"");c.oMC.appendChild(e);if(q)h=c.oMC.appendChild(g.createElement("div")),h.className=c.swfCSS.swfBox,h.innerHTML=k;F=!0}else{c.oMC.id= -c.movieID;c.oMC.className=c.swfCSS.swfDefault+" "+i;h=i=null;if(!c.useFlashBlock)if(c.useHighPerformance)i={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"};else if(i={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},l)i.left=Math.abs(parseInt(i.left,10))+"px";if(Fa)c.oMC.style.zIndex=1E4;if(!c.debugFlash)for(j in i)i.hasOwnProperty(j)&&(c.oMC.style[j]=i[j]);try{q||c.oMC.appendChild(e);d.appendChild(c.oMC);if(q)h=c.oMC.appendChild(g.createElement("div")), -h.className=c.swfCSS.swfBox,h.innerHTML=k;F=!0}catch(m){throw Error(w("appXHTML"));}}return!0};j=this.getSoundById;H=function(){if(p)return Q(),!1;if(c.o)return!1;c.o=c.getMovie(c.id);if(!c.o)I?(q?c.oMC.innerHTML=ga:c.oMC.appendChild(I),I=null,E=!0):Q(c.id,c.url),c.o=c.getMovie(c.id);c.oninitmovie instanceof Function&&setTimeout(c.oninitmovie,1);return!0};ba=function(b){if(b)c.url=b;H()};P=function(){setTimeout(ra,500)};ra=function(){if(U)return!1;U=!0;l.remove(h,"load",P);if(D&&!na)return!1;var b; -m||(b=c.getMoviePercent());setTimeout(function(){b=c.getMoviePercent();!m&&Ca&&(b===null?c.useFlashBlock||c.flashLoadTimeout===0?c.useFlashBlock&&ha():R(!0):c.flashLoadTimeout!==0&&R(!0))},c.flashLoadTimeout)};ba=function(b){if(b)c.url=b;H()};B=function(){var b=[];c.debugMode&&b.push(c.swfCSS.sm2Debug);c.debugFlash&&b.push(c.swfCSS.flashDebug);c.useHighPerformance&&b.push(c.swfCSS.highPerf);return b.join(" ")};ha=function(){w("fbHandler");var b=c.getMoviePercent(),a=c.swfCSS;if(c.ok()){if(c.oMC)c.oMC.className= -[B(),a.swfDefault,a.swfLoaded+(c.didFlashBlock?" "+a.swfUnblocked:"")].join(" ")}else{if(x)c.oMC.className=B()+" "+a.swfDefault+" "+(b===null?a.swfTimedout:a.swfError);c.didFlashBlock=!0;u({type:"ontimeout",ignoreInit:!0});c.onerror instanceof Function&&c.onerror.apply(h)}};v=function(){function b(){l.remove(h,"focus",v);l.remove(h,"load",v)}if(na||!D)return b(),!0;na=Ca=!0;L&&D&&l.remove(h,"mousemove",v);U=!1;b();return!0};G=function(b){if(m)return!1;if(p)return m=!0,u(),z(),!0;c.useFlashBlock&& -c.flashLoadTimeout&&!c.getMoviePercent()||(m=!0);if(t||b){if(c.useFlashBlock)c.oMC.className=B()+" "+(c.getMoviePercent()===null?c.swfCSS.swfTimedout:c.swfCSS.swfError);u({type:"ontimeout"});c.onerror instanceof Function&&c.onerror.apply(h);return!1}l.add(h,"unload",$);if(c.waitForWindowLoad&&!qa)return l.add(h,"load",z),!1;else z();return!0};aa=function(b,a,c){typeof r[b]==="undefined"&&(r[b]=[]);r[b].push({method:a,scope:c||null,fired:!1})};u=function(b){b||(b={type:"onready"});if(!m&&b&&!b.ignoreInit)return!1; -var a={success:b&&b.ignoreInit?c.ok():!t},e=b&&b.type?r[b.type]||[]:[],b=[],f,d=x&&c.useFlashBlock&&!c.ok();for(f=0;f0) - 'onid3': null, // callback function for "ID3 data is added/available" - 'onload': null, // callback function for "load finished" - 'whileloading': null, // callback function for "download progress update" (X of Y bytes received) - 'onplay': null, // callback for "play" start - 'onpause': null, // callback for "pause" - 'onresume': null, // callback for "resume" (pause toggle) - 'whileplaying': null, // callback during play (position update) - 'onstop': null, // callback for "user stop" - 'onfailure': null, // callback function for when playing fails - 'onfinish': null, // callback function for "sound finished playing" - 'onbeforefinish': null, // callback for "before sound finished playing (at [time])" - 'onbeforefinishtime': 5000, // offset (milliseconds) before end of sound to trigger beforefinish (eg. 1000 msec = 1 second) - 'onbeforefinishcomplete': null,// function to call when said sound finishes playing - 'onjustbeforefinish': null, // callback for [n] msec before end of current sound - 'onjustbeforefinishtime': 200, // [n] - if not using, set to 0 (or null handler) and event will not fire. - 'multiShot': true, // let sounds "restart" or layer on top of each other when played multiple times, rather than one-shot/one at a time - 'multiShotEvents': false, // fire multiple sound events (currently onfinish() only) when multiShot is enabled - 'position': null, // offset (milliseconds) to seek to within loaded sound data. - 'pan': 0, // "pan" settings, left-to-right, -100 to 100 - 'type': null, // MIME-like hint for file pattern / canPlay() tests, eg. audio/mp3 - 'usePolicyFile': false, // enable crossdomain.xml request for audio on remote domains (for ID3/waveform access) - 'volume': 100 // self-explanatory. 0-100, the latter being the max. - }; - - this.flash9Options = { // flash 9-only options, merged into defaultOptions if flash 9 is being used - 'isMovieStar': null, // "MovieStar" MPEG4 audio mode. Null (default) = auto detect MP4, AAC etc. based on URL. true = force on, ignore URL - 'usePeakData': false, // enable left/right channel peak (level) data - 'useWaveformData': false, // enable sound spectrum (raw waveform data) - WARNING: CPU-INTENSIVE: may set CPUs on fire. - 'useEQData': false, // enable sound EQ (frequency spectrum data) - WARNING: Also CPU-intensive. - 'onbufferchange': null, // callback for "isBuffering" property change - 'ondataerror': null // callback for waveform/eq data access error (flash playing audio in other tabs/domains) - }; - - this.movieStarOptions = { // flash 9.0r115+ MPEG4 audio options, merged into defaultOptions if flash 9+movieStar mode is enabled - 'bufferTime': 3, // seconds of data to buffer before playback begins (null = flash default of 0.1 seconds - if AAC playback is gappy, try increasing.) - 'serverURL': null, // rtmp: FMS or FMIS server to connect to, required when requesting media via RTMP or one of its variants - 'onconnect': null, // rtmp: callback for connection to flash media server - 'duration': null // rtmp: song duration (msec) - }; - - this.version = null; - this.versionNumber = 'V2.97a.20110424'; - this.movieURL = null; - this.url = (smURL || null); - this.altURL = null; - this.swfLoaded = false; - this.enabled = false; - this.o = null; - this.movieID = 'sm2-container'; - this.id = (smID || 'sm2movie'); - this.swfCSS = { - 'swfBox': 'sm2-object-box', - 'swfDefault': 'movieContainer', - 'swfError': 'swf_error', // SWF loaded, but SM2 couldn't start (other error) - 'swfTimedout': 'swf_timedout', - 'swfLoaded': 'swf_loaded', - 'swfUnblocked': 'swf_unblocked', // or loaded OK - 'sm2Debug': 'sm2_debug', - 'highPerf': 'high_performance', - 'flashDebug': 'flash_debug' - }; - this.oMC = null; - this.sounds = {}; - this.soundIDs = []; - this.muted = false; - this.debugID = 'soundmanager-debug'; - this.debugURLParam = /([#?&])debug=1/i; - this.specialWmodeCase = false; - this.didFlashBlock = false; - - this.filePattern = null; - this.filePatterns = { - 'flash8': /\.mp3(\?.*)?$/i, - 'flash9': /\.mp3(\?.*)?$/i - }; - - this.baseMimeTypes = /^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i; // mp3 - this.netStreamMimeTypes = /^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i; // mp3, mp4, aac etc. - this.netStreamTypes = ['aac', 'flv', 'mov', 'mp4', 'm4v', 'f4v', 'm4a', 'mp4v', '3gp', '3g2']; // Flash v9.0r115+ "moviestar" formats - this.netStreamPattern = new RegExp('\\.(' + this.netStreamTypes.join('|') + ')(\\?.*)?$', 'i'); - this.mimePattern = this.baseMimeTypes; - - this.features = { - 'buffering': false, - 'peakData': false, - 'waveformData': false, - 'eqData': false, - 'movieStar': false - }; - - this.sandbox = { - // - 'type': null, - 'types': { - 'remote': 'remote (domain-based) rules', - 'localWithFile': 'local with file access (no internet access)', - 'localWithNetwork': 'local with network (internet access only, no local access)', - 'localTrusted': 'local, trusted (local+internet access)' - }, - 'description': null, - 'noRemote': null, - 'noLocal': null - // - }; - - this.hasHTML5 = null; // switch for handling logic - this.html5 = { // stores canPlayType() results, etc. treat as read-only. - // mp3: boolean - // mp4: boolean - 'usingFlash': null // set if/when flash fallback is needed - }; - this.ignoreFlash = false; // used for special cases (eg. iPad/iPhone/palm OS?) - - // --- private SM2 internals --- - - var SMSound, - _s = this, _sm = 'soundManager', _smc = _sm+'::', _h5 = 'HTML5::', _id, _ua = navigator.userAgent, _win = window, _wl = _win.location.href.toString(), _fV = this.flashVersion, _doc = document, _doNothing, _init, _on_queue = [], _debugOpen = true, _debugTS, _didAppend = false, _appendSuccess = false, _didInit = false, _disabled = false, _windowLoaded = false, _wDS, _wdCount = 0, _initComplete, _mixin, _addOnEvent, _processOnEvents, _initUserOnload, _go, _delayWaitForEI, _waitForEI, _setVersionInfo, _handleFocus, _beginInit, _strings, _initMovie, _dcLoaded, _didDCLoaded, _getDocument, _createMovie, _die, _setPolling, _debugLevels = ['log', 'info', 'warn', 'error'], _defaultFlashVersion = 8, _disableObject, _failSafely, _normalizeMovieURL, _oRemoved = null, _oRemovedHTML = null, _str, _flashBlockHandler, _getSWFCSS, _toggleDebug, _loopFix, _policyFix, _complain, _idCheck, _waitingForEI = false, _initPending = false, _smTimer, _onTimer, _startTimer, _stopTimer, _needsFlash = null, _featureCheck, _html5OK, _html5Only = false, _html5CanPlay, _html5Ext, _dcIE, _testHTML5, _event, _slice = Array.prototype.slice, _useGlobalHTML5Audio = false, _hasFlash, _detectFlash, _badSafariFix, - _is_pre = _ua.match(/pre\//i), _is_iDevice = _ua.match(/(ipad|iphone|ipod)/i), _isMobile = (_ua.match(/mobile/i) || _is_pre || _is_iDevice), _isIE = _ua.match(/msie/i), _isWebkit = _ua.match(/webkit/i), _isSafari = (_ua.match(/safari/i) && !_ua.match(/chrome/i)), _isOpera = (_ua.match(/opera/i)), - _isBadSafari = (!_wl.match(/usehtml5audio/i) && !_wl.match(/sm2\-ignorebadua/i) && _isSafari && _ua.match(/OS X 10_6_([3-9])/i)), // Safari 4 and 5 occasionally fail to load/play HTML5 audio on Snow Leopard due to bug(s) in QuickTime X and/or other underlying frameworks. :/ Known Apple "radar" bug. https://bugs.webkit.org/show_bug.cgi?id=32159 - _hasConsole = (typeof console !== 'undefined' && typeof console.log !== 'undefined'), _isFocused = (typeof _doc.hasFocus !== 'undefined'?_doc.hasFocus():null), _tryInitOnFocus = (typeof _doc.hasFocus === 'undefined' && _isSafari), _okToDisable = !_tryInitOnFocus; - - this._use_maybe = (_wl.match(/sm2\-useHTML5Maybe\=1/i)); // temporary feature: #sm2-useHTML5Maybe=1 forces loose canPlay() check - this._overHTTP = (_doc.location?_doc.location.protocol.match(/http/i):null); - this._http = (!this._overHTTP ? 'http:' : ''); - this.useAltURL = !this._overHTTP; // use altURL if not "online" - this._global_a = null; - - if (_is_iDevice || _is_pre) { - // during HTML5 beta period (off by default), may as well force it on Apple + Palm, flash support unlikely - _s.useHTML5Audio = true; - _s.ignoreFlash = true; - if (_s.useGlobalHTML5Audio) { - _useGlobalHTML5Audio = true; - } - } - - if (_is_pre || this._use_maybe) { - // less-strict canPlayType() checking option - _s.html5Test = /^(probably|maybe)$/i; - } - - // Temporary feature: allow force of HTML5 via URL: #sm2-usehtml5audio=0 or 1 - // - (function(){ - var a = '#sm2-usehtml5audio=', l = _wl, b = null; - if (l.indexOf(a) !== -1) { - b = (l.charAt(l.indexOf(a)+a.length) === '1'); - if (typeof console !== 'undefined' && typeof console.log !== 'undefined') { - console.log((b?'Enabling ':'Disabling ')+'useHTML5Audio via URL parameter'); - } - _s.useHTML5Audio = b; - } - }()); - // - - // --- public API methods --- - - this.ok = function() { - return (_needsFlash?(_didInit && !_disabled):(_s.useHTML5Audio && _s.hasHTML5)); - }; - - this.supported = this.ok; // legacy - - this.getMovie = function(smID) { - return _isIE?_win[smID]:(_isSafari?_id(smID) || _doc[smID]:_id(smID)); - }; - - this.createSound = function(oOptions) { - var _cs = _sm+'.createSound(): ', - thisOptions = null, oSound = null, _tO = null; - if (!_didInit || !_s.ok()) { - _complain(_cs + _str(!_didInit?'notReady':'notOK')); - return false; - } - if (arguments.length === 2) { - // function overloading in JS! :) ..assume simple createSound(id,url) use case - oOptions = { - 'id': arguments[0], - 'url': arguments[1] - }; - } - thisOptions = _mixin(oOptions); // inherit from defaultOptions - _tO = thisOptions; // alias - // - if (_tO.id.toString().charAt(0).match(/^[0-9]$/)) { - _s._wD(_cs + _str('badID', _tO.id), 2); - } - _s._wD(_cs + _tO.id + ' (' + _tO.url + ')', 1); - // - if (_idCheck(_tO.id, true)) { - _s._wD(_cs + _tO.id + ' exists', 1); - return _s.sounds[_tO.id]; - } - - function make() { - thisOptions = _loopFix(thisOptions); - _s.sounds[_tO.id] = new SMSound(_tO); - _s.soundIDs.push(_tO.id); - return _s.sounds[_tO.id]; - } - - if (_html5OK(_tO)) { - oSound = make(); - _s._wD('Loading sound '+_tO.id+' via HTML5'); - oSound._setup_html5(_tO); - } else { - if (_fV > 8 && _s.useMovieStar) { - if (_tO.isMovieStar === null) { - _tO.isMovieStar = ((_tO.serverURL || (_tO.type?_tO.type.match(_s.netStreamPattern):false)||_tO.url.match(_s.netStreamPattern))?true:false); - } - if (_tO.isMovieStar) { - _s._wD(_cs + 'using MovieStar handling'); - } - if (_tO.isMovieStar) { - if (_tO.usePeakData) { - _wDS('noPeak'); - _tO.usePeakData = false; - } - if (_tO.loops > 1) { - _wDS('noNSLoop'); - } - } - } - _tO = _policyFix(_tO, _cs); - oSound = make(); - if (_fV === 8) { - _s.o._createSound(_tO.id, _tO.onjustbeforefinishtime, _tO.loops||1, _tO.usePolicyFile); - } else { - _s.o._createSound(_tO.id, _tO.url, _tO.onjustbeforefinishtime, _tO.usePeakData, _tO.useWaveformData, _tO.useEQData, _tO.isMovieStar, (_tO.isMovieStar?_tO.bufferTime:false), _tO.loops||1, _tO.serverURL, _tO.duration||null, _tO.autoPlay, true, _tO.autoLoad, _tO.usePolicyFile); - if (!_tO.serverURL) { - // We are connected immediately - oSound.connected = true; - if (_tO.onconnect) { - _tO.onconnect.apply(oSound); - } - } - } - - if ((_tO.autoLoad || _tO.autoPlay) && !_tO.serverURL) { - oSound.load(_tO); // call load for non-rtmp streams - } - } - - if (_tO.autoPlay && !_tO.serverURL) { // rtmp will play in onconnect - oSound.play(); - } - return oSound; - }; - - this.destroySound = function(sID, _bFromSound) { - // explicitly destroy a sound before normal page unload, etc. - if (!_idCheck(sID)) { - return false; - } - var oS = _s.sounds[sID], i; - oS._iO = {}; // Disable all callbacks while the sound is being destroyed - oS.stop(); - oS.unload(); - for (i = 0; i < _s.soundIDs.length; i++) { - if (_s.soundIDs[i] === sID) { - _s.soundIDs.splice(i, 1); - break; - } - } - if (!_bFromSound) { - // ignore if being called from SMSound instance - oS.destruct(true); - } - oS = null; - delete _s.sounds[sID]; - return true; - }; - - this.load = function(sID, oOptions) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].load(oOptions); - }; - - this.unload = function(sID) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].unload(); - }; - - this.play = function(sID, oOptions) { - var fN = _sm+'.play(): '; - if (!_didInit || !_s.ok()) { - _complain(fN + _str(!_didInit?'notReady':'notOK')); - return false; - } - if (!_idCheck(sID)) { - if (!(oOptions instanceof Object)) { - oOptions = { - url: oOptions - }; // overloading use case: play('mySound','/path/to/some.mp3'); - } - if (oOptions && oOptions.url) { - // overloading use case, create+play: .play('someID',{url:'/path/to.mp3'}); - _s._wD(fN + 'attempting to create "' + sID + '"', 1); - oOptions.id = sID; - return _s.createSound(oOptions).play(); - } else { - return false; - } - } - return _s.sounds[sID].play(oOptions); - }; - - this.start = this.play; // just for convenience - - this.setPosition = function(sID, nMsecOffset) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].setPosition(nMsecOffset); - }; - - this.stop = function(sID) { - if (!_idCheck(sID)) { - return false; - } - _s._wD(_sm+'.stop(' + sID + ')', 1); - return _s.sounds[sID].stop(); - }; - - this.stopAll = function() { - _s._wD(_sm+'.stopAll()', 1); - for (var oSound in _s.sounds) { - if (_s.sounds[oSound] instanceof SMSound) { - _s.sounds[oSound].stop(); // apply only to sound objects - } - } - }; - - this.pause = function(sID) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].pause(); - }; - - this.pauseAll = function() { - for (var i = _s.soundIDs.length; i--;) { - _s.sounds[_s.soundIDs[i]].pause(); - } - }; - - this.resume = function(sID) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].resume(); - }; - - this.resumeAll = function() { - for (var i = _s.soundIDs.length; i--;) { - _s.sounds[_s.soundIDs[i]].resume(); - } - }; - - this.togglePause = function(sID) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].togglePause(); - }; - - this.setPan = function(sID, nPan) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].setPan(nPan); - }; - - this.setVolume = function(sID, nVol) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].setVolume(nVol); - }; - - this.mute = function(sID) { - var fN = _sm+'.mute(): ', - i = 0; - if (typeof sID !== 'string') { - sID = null; - } - if (!sID) { - _s._wD(fN + 'Muting all sounds'); - for (i = _s.soundIDs.length; i--;) { - _s.sounds[_s.soundIDs[i]].mute(); - } - _s.muted = true; - } else { - if (!_idCheck(sID)) { - return false; - } - _s._wD(fN + 'Muting "' + sID + '"'); - return _s.sounds[sID].mute(); - } - return true; - }; - - this.muteAll = function() { - _s.mute(); - }; - - this.unmute = function(sID) { - var fN = _sm+'.unmute(): ', i; - if (typeof sID !== 'string') { - sID = null; - } - if (!sID) { - _s._wD(fN + 'Unmuting all sounds'); - for (i = _s.soundIDs.length; i--;) { - _s.sounds[_s.soundIDs[i]].unmute(); - } - _s.muted = false; - } else { - if (!_idCheck(sID)) { - return false; - } - _s._wD(fN + 'Unmuting "' + sID + '"'); - return _s.sounds[sID].unmute(); - } - return true; - }; - - this.unmuteAll = function() { - _s.unmute(); - }; - - this.toggleMute = function(sID) { - if (!_idCheck(sID)) { - return false; - } - return _s.sounds[sID].toggleMute(); - }; - - this.getMemoryUse = function() { - if (_fV === 8) { - return 0; - } - if (_s.o) { - return parseInt(_s.o._getMemoryUse(), 10); - } - }; - - this.disable = function(bNoDisable) { - // destroy all functions - if (typeof bNoDisable === 'undefined') { - bNoDisable = false; - } - if (_disabled) { - return false; - } - _disabled = true; - _wDS('shutdown', 1); - for (var i = _s.soundIDs.length; i--;) { - _disableObject(_s.sounds[_s.soundIDs[i]]); - } - _initComplete(bNoDisable); // fire "complete", despite fail - _event.remove(_win, 'load', _initUserOnload); - return true; - }; - - this.canPlayMIME = function(sMIME) { - var result; - if (_s.hasHTML5) { - result = _html5CanPlay({type:sMIME}); - } - if (!_needsFlash || result) { - // no flash, or OK - return result; - } else { - return (sMIME?(sMIME.match(_s.mimePattern)?true:false):null); - } - }; - - this.canPlayURL = function(sURL) { - var result; - if (_s.hasHTML5) { - result = _html5CanPlay(sURL); - } - if (!_needsFlash || result) { - // no flash, or OK - return result; - } else { - return (sURL?(sURL.match(_s.filePattern)?true:false):null); - } - }; - - this.canPlayLink = function(oLink) { - if (typeof oLink.type !== 'undefined' && oLink.type) { - if (_s.canPlayMIME(oLink.type)) { - return true; - } - } - return _s.canPlayURL(oLink.href); - }; - - this.getSoundById = function(sID, suppressDebug) { - if (!sID) { - throw new Error(_sm+'.getSoundById(): sID is null/undefined'); - } - var result = _s.sounds[sID]; - if (!result && !suppressDebug) { - _s._wD('"' + sID + '" is an invalid sound ID.', 2); - } - return result; - }; - - this.onready = function(oMethod, oScope) { - var sType = 'onready'; - if (oMethod && oMethod instanceof Function) { - if (_didInit) { - _wDS('queue', sType); - } - if (!oScope) { - oScope = _win; - } - _addOnEvent(sType, oMethod, oScope); - _processOnEvents(); - return true; - } else { - throw _str('needFunction', sType); - } - }; - - this.ontimeout = function(oMethod, oScope) { - var sType = 'ontimeout'; - if (oMethod && oMethod instanceof Function) { - if (_didInit) { - _wDS('queue'); - } - if (!oScope) { - oScope = _win; - } - _addOnEvent(sType, oMethod, oScope); - _processOnEvents({type:sType}); - return true; - } else { - throw _str('needFunction', sType); - } - }; - - this.getMoviePercent = function() { - return (_s.o && typeof _s.o.PercentLoaded !== 'undefined'?_s.o.PercentLoaded():null); - }; - - this._writeDebug = function(sText, sType, bTimestamp) { - // pseudo-private console.log()-style output - // - var sDID = 'soundmanager-debug', o, oItem, sMethod; - if (!_s.debugMode) { - return false; - } - if (typeof bTimestamp !== 'undefined' && bTimestamp) { - sText = sText + ' | ' + new Date().getTime(); - } - if (_hasConsole && _s.useConsole) { - sMethod = _debugLevels[sType]; - if (typeof console[sMethod] !== 'undefined') { - console[sMethod](sText); - } else { - console.log(sText); - } - if (_s.useConsoleOnly) { - return true; - } - } - try { - o = _id(sDID); - if (!o) { - return false; - } - oItem = _doc.createElement('div'); - if (++_wdCount % 2 === 0) { - oItem.className = 'sm2-alt'; - } - if (typeof sType === 'undefined') { - sType = 0; - } else { - sType = parseInt(sType, 10); - } - oItem.appendChild(_doc.createTextNode(sText)); - if (sType) { - if (sType >= 2) { - oItem.style.fontWeight = 'bold'; - } - if (sType === 3) { - oItem.style.color = '#ff3333'; - } - } - // o.appendChild(oItem); // top-to-bottom - o.insertBefore(oItem, o.firstChild); // bottom-to-top - } catch(e) { - // oh well - } - o = null; - // - return true; - }; - this._wD = this._writeDebug; // alias - - this._debug = function() { - // - _wDS('currentObj', 1); - for (var i = 0, j = _s.soundIDs.length; i < j; i++) { - _s.sounds[_s.soundIDs[i]]._debug(); - } - // - }; - - this.reboot = function() { - // attempt to reset and init SM2 - _s._wD(_sm+'.reboot()'); - if (_s.soundIDs.length) { - _s._wD('Destroying ' + _s.soundIDs.length + ' SMSound objects...'); - } - var i, j; - for (i = _s.soundIDs.length; i--;) { - _s.sounds[_s.soundIDs[i]].destruct(); - } - // trash ze flash - try { - if (_isIE) { - _oRemovedHTML = _s.o.innerHTML; - } - _oRemoved = _s.o.parentNode.removeChild(_s.o); - _s._wD('Flash movie removed.'); - } catch(e) { - // uh-oh. - _wDS('badRemove', 2); - } - // actually, force recreate of movie. - _oRemovedHTML = _oRemoved = null; - _s.enabled = _didInit = _waitingForEI = _initPending = _didAppend = _appendSuccess = _disabled = _s.swfLoaded = false; - _s.soundIDs = _s.sounds = []; - _s.o = null; - for (i in _on_queue) { - if (_on_queue.hasOwnProperty(i)) { - for (j = _on_queue[i].length; j--;) { - _on_queue[i][j].fired = false; - } - } - } - _s._wD(_sm + ': Rebooting...'); - _win.setTimeout(function() { - _s.beginDelayedInit(); - }, 20); - }; - - this.destruct = function() { - _s._wD(_sm+'.destruct()'); - _s.disable(true); - }; - - this.beginDelayedInit = function() { - // _s._wD(_sm+'.beginDelayedInit()'); - _windowLoaded = true; - _dcLoaded(); - setTimeout(_beginInit, 20); - _delayWaitForEI(); - }; - - - // Wrap html5 event handlers so we don't call them on destroyed sounds - function _html5_event(oFn) { - return function(e) { - if (!this._t || !this._t._a) { - if (this._t && this._t.sID) { - _s._wD(_h5+'ignoring '+e.type+': '+this._t.sID); - } else { - _s._wD(_h5+'ignoring '+e.type); - } - return null; - } else { - return oFn.call(this, e); - } - }; - } - - this._html5_events = { - - // HTML5 event-name-to-handler map - abort: _html5_event(function(e) { - _s._wD(_h5+'abort: '+this._t.sID); - }), - - // enough has loaded to play - canplay: _html5_event(function(e) { - _s._wD(_h5+'canplay: '+this._t.sID+', '+this._t.url); - this._t._onbufferchange(0); - var position1K = (!isNaN(this._t.position)?this._t.position/1000:null); - // set the position if position was set before the sound loaded - this._t._html5_canplay = true; - if (this._t.position && this.currentTime !== position1K) { - _s._wD(_h5+'canplay: setting position to '+position1K+''); - try { - this.currentTime = position1K; - } catch(ee) { - _s._wD(_h5+'setting position failed: '+ee.message, 2); - } - } - }), - - load: _html5_event(function(e) { - if (!this._t.loaded) { - this._t._onbufferchange(0); - // should be 1, and the same - this._t._whileloading(this._t.bytesTotal, this._t.bytesTotal, this._t._get_html5_duration()); - this._t._onload(true); - } - }), - - emptied: _html5_event(function(e) { - _s._wD(_h5+'emptied: '+this._t.sID); - }), - - ended: _html5_event(function(e) { - _s._wD(_h5+'ended: '+this._t.sID); - this._t._onfinish(); - }), - - error: _html5_event(function(e) { - _s._wD(_h5+'error: '+this.error.code); - // call load with error state? - this._t._onload(false); - }), - - loadeddata: _html5_event(function(e) { - _s._wD(_h5+'loadeddata: '+this._t.sID); - }), - - loadedmetadata: _html5_event(function(e) { - _s._wD(_h5+'loadedmetadata: '+this._t.sID); - }), - - loadstart: _html5_event(function(e) { - _s._wD(_h5+'loadstart: '+this._t.sID); - // assume buffering at first - this._t._onbufferchange(1); - }), - - play: _html5_event(function(e) { - _s._wD(_h5+'play: '+this._t.sID+', '+this._t.url); - // once play starts, no buffering - this._t._onbufferchange(0); - }), - - // TODO: verify if this is actually implemented anywhere yet. - playing: _html5_event(function(e) { - _s._wD(_h5+'playing: '+this._t.sID+', '+this._t.url); - // once play starts, no buffering - this._t._onbufferchange(0); - }), - - progress: _html5_event(function(e) { - - if (this._t.loaded) { - return false; - } - - var i, j, str, loadSum = 0, buffered = 0, - isProgress = (e.type === 'progress'), - ranges = e.target.buffered, - loaded = (e.loaded||0), // firefox 3.6 implements e.loaded/total (bytes) - total = (e.total||1); - - if (ranges && ranges.length) { - - // if loaded is 0, try TimeRanges implementation as % of load - // https://developer.mozilla.org/en/DOM/TimeRanges - for (i=ranges.length; i--;) { - buffered = (ranges.end(i) - ranges.start(i)); - } - - // linear case, buffer sum; does not account for seeking and HTTP partials / byte ranges - loaded = buffered/e.target.duration; - - // - if (isProgress && ranges.length > 1) { - str = []; - j = ranges.length; - for (i=0; i - - if (isProgress && !isNaN(loaded)) { - _s._wD(_h5+'progress: '+this._t.sID+': ' + Math.floor(loaded*100)+'% loaded'); - } - - } - - if (!isNaN(loaded)) { - - this._t._onbufferchange(0); // if progress, likely not buffering - this._t._whileloading(loaded, total, this._t._get_html5_duration()); - - if (loaded && total && loaded === total) { - // in case "onload" doesn't fire (eg. gecko 1.9.2) - _s._html5_events.load.call(this, e); - } - - } - - }), - - ratechange: _html5_event(function(e) { - _s._wD(_h5+'ratechange: '+this._t.sID); - }), - - suspend: _html5_event(function(e) { - // download paused/stopped, may have finished (eg. onload) - _s._wD(_h5+'suspend: '+this._t.sID); - _s._html5_events.progress.call(this, e); - }), - - stalled: _html5_event(function(e) { - _s._wD(_h5+'stalled: '+this._t.sID); - }), - - timeupdate: _html5_event(function(e) { - this._t._onTimer(); - }), - - waiting: _html5_event(function(e) { // see also: seeking - _s._wD(_h5+'waiting: '+this._t.sID); - // playback faster than download rate, etc. - this._t._onbufferchange(1); - }) - - }; - - // --- SMSound (sound object) instance --- - - SMSound = function(oOptions) { - var _t = this, _resetProperties, _stop_html5_timer, _start_html5_timer; - this.sID = oOptions.id; - this.url = oOptions.url; - this.options = _mixin(oOptions); - this.instanceOptions = this.options; // per-play-instance-specific options - this._iO = this.instanceOptions; // short alias - // assign property defaults - this.pan = this.options.pan; - this.volume = this.options.volume; - this._lastURL = null; - this.isHTML5 = false; - this._a = null; - - // --- public methods --- - - this.id3 = {}; - - this._debug = function() { - // - // pseudo-private console.log()-style output - if (_s.debugMode) { - var stuff = null, msg = [], sF, sfBracket, maxLength = 64; - for (stuff in _t.options) { - if (_t.options[stuff] !== null) { - if (_t.options[stuff] instanceof Function) { - // handle functions specially - sF = _t.options[stuff].toString(); - sF = sF.replace(/\s\s+/g, ' '); // normalize spaces - sfBracket = sF.indexOf('{'); - msg.push(' ' + stuff + ': {' + sF.substr(sfBracket + 1, (Math.min(Math.max(sF.indexOf('\n') - 1, maxLength), maxLength))).replace(/\n/g, '') + '... }'); - } else { - msg.push(' ' + stuff + ': ' + _t.options[stuff]); - } - } - } - _s._wD('SMSound() merged options: {\n' + msg.join(', \n') + '\n}'); - } - // - }; - - this._debug(); - - this.load = function(oOptions) { - var oS = null; - if (typeof oOptions !== 'undefined') { - _t._iO = _mixin(oOptions, _t.options); - _t.instanceOptions = _t._iO; - } else { - oOptions = _t.options; - _t._iO = oOptions; - _t.instanceOptions = _t._iO; - if (_t._lastURL && _t._lastURL !== _t.url) { - _wDS('manURL'); - _t._iO.url = _t.url; - _t.url = null; - } - } - if (!_t._iO.url) { - _t._iO.url = _t.url; - } - _s._wD('SMSound.load(): ' + _t._iO.url, 1); - if (_t._iO.url === _t.url && _t.readyState !== 0 && _t.readyState !== 2) { - _wDS('onURL', 1); - return _t; - } - _t._lastURL = _t.url; - _t.loaded = false; - _t.readyState = 1; - _t.playState = 0; - if (_html5OK(_t._iO)) { - oS = _t._setup_html5(_t._iO); - if (!oS._called_load) { - _s._wD(_h5+'load: '+_t.sID); - oS.load(); - oS._called_load = true; - if (_t._iO.autoPlay) { - _t.play(); - } - } else { - _s._wD('HTML5 ignoring request to load again: '+_t.sID); - } - } else { - try { - _t.isHTML5 = false; - _t._iO = _policyFix(_loopFix(_t._iO)); - if (_fV === 8) { - _s.o._load(_t.sID, _t._iO.url, _t._iO.stream, _t._iO.autoPlay, (_t._iO.whileloading?1:0), _t._iO.loops||1, _t._iO.usePolicyFile); - } else { - _s.o._load(_t.sID, _t._iO.url, _t._iO.stream?true:false, _t._iO.autoPlay?true:false, _t._iO.loops||1, _t._iO.autoLoad?true:false, _t._iO.usePolicyFile); - } - } catch(e) { - _wDS('smError', 2); - _debugTS('onload', false); - _die(); - } - } - return _t; - }; - - this.unload = function() { - // Flash 8/AS2 can't "close" a stream - fake it by loading an empty MP3 - // Flash 9/AS3: Close stream, preventing further load - if (_t.readyState !== 0) { - _s._wD('SMSound.unload(): "' + _t.sID + '"'); - if (!_t.isHTML5) { - if (_fV === 8) { - _s.o._unload(_t.sID, _s.nullURL); - } else { - _s.o._unload(_t.sID); - } - } else { - _stop_html5_timer(); - if (_t._a) { - // abort()-style method here, stop loading? (doesn't exist?) - _t._a.pause(); -// if (!_useGlobalHTML5Audio || (_useGlobalHTML5Audio && _t.playState)) { // if global audio, only unload if actively playing - _t._a.src = ''; // https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Stopping_the_download_of_media -// } - } - } - // reset load/status flags - _resetProperties(); - } - return _t; - }; - - this.destruct = function(_bFromSM) { - _s._wD('SMSound.destruct(): "' + _t.sID + '"'); - if (!_t.isHTML5) { - // kill sound within Flash - // Disable the onfailure handler - _t._iO.onfailure = null; - _s.o._destroySound(_t.sID); - } else { - _stop_html5_timer(); - if (_t._a) { - // abort()-style method here, stop loading? (doesn't exist?) - _t._a.pause(); - _t._a.src = ''; // https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox#Stopping_the_download_of_media - if (!_useGlobalHTML5Audio) { - _t._remove_html5_events(); - } - } - } - if (!_bFromSM) { - _s.destroySound(_t.sID, true); // ensure deletion from controller - } - }; - - this.play = function(oOptions, _updatePlayState) { - var fN = 'SMSound.play(): ', allowMulti; - _updatePlayState = _updatePlayState === undefined ? true : _updatePlayState; // default true - if (!oOptions) { - oOptions = {}; - } - _t._iO = _mixin(oOptions, _t._iO); - _t._iO = _mixin(_t._iO, _t.options); - _t.instanceOptions = _t._iO; - if (_t._iO.serverURL) { - if (!_t.connected) { - if (!_t.getAutoPlay()) { - _s._wD(fN+' Netstream not connected yet - setting autoPlay'); - _t.setAutoPlay(true); - } - return _t; // play will be called in _onconnect() - } - } - if (_html5OK(_t._iO)) { - _t._setup_html5(_t._iO); - _start_html5_timer(); - } - if (_t.playState === 1 && !_t.paused) { - allowMulti = _t._iO.multiShot; - if (!allowMulti) { - _s._wD(fN + '"' + _t.sID + '" already playing (one-shot)', 1); - return _t; - } else { - _s._wD(fN + '"' + _t.sID + '" already playing (multi-shot)', 1); - if (_t.isHTML5) { - // TODO: BUG? - _t.setPosition(_t._iO.position); - } - } - } - if (!_t.loaded) { - if (_t.readyState === 0) { - _s._wD(fN + 'Attempting to load "' + _t.sID + '"', 1); - // try to get this sound playing ASAP - if (!_t.isHTML5) { - _t._iO.autoPlay = true; // assign directly because setAutoPlay() increments the instanceCount - _t.load(_t._iO); - } else { - _t.load(_t._iO); - // _t.readyState = 1; // redundant - } - } else if (_t.readyState === 2) { - _s._wD(fN + 'Could not load "' + _t.sID + '" - exiting', 2); - return _t; - } else { - _s._wD(fN + '"' + _t.sID + '" is loading - attempting to play..', 1); - } - } else { - _s._wD(fN + '"' + _t.sID + '"'); - } - // Streams will pause when their buffer is full if they are being loaded. - // In this case paused is true, but the song hasn't started playing yet. If - // we just call resume() the onplay() callback will never be called. So - // only call resume() if the position is > 0. - // Another reason is because options like volume won't have been applied yet. - if (_t.paused && _t.position && _t.position > 0) { // https://gist.github.com/37b17df75cc4d7a90bf6 - _s._wD(fN + '"' + _t.sID + '" is resuming from paused state',1); - _t.resume(); - } else { - _s._wD(fN+'"'+ _t.sID+'" is starting to play'); - _t.playState = 1; - _t.paused = false; - if (!_t.instanceCount || _t._iO.multiShotEvents || (_fV > 8 && !_t.isHTML5 && !_t.getAutoPlay())) { - _t.instanceCount++; - } - _t.position = (typeof _t._iO.position !== 'undefined' && !isNaN(_t._iO.position)?_t._iO.position:0); - if (!_t.isHTML5) { - _t._iO = _policyFix(_loopFix(_t._iO)); - } - if (_t._iO.onplay && _updatePlayState) { - _t._iO.onplay.apply(_t); - _t._onplay_called = true; - } - _t.setVolume(_t._iO.volume, true); - _t.setPan(_t._iO.pan, true); - if (!_t.isHTML5) { - _s.o._start(_t.sID, _t._iO.loops || 1, (_fV === 9?_t.position:_t.position / 1000)); - } else { - _start_html5_timer(); - _t._setup_html5().play(); - } - } - return _t; - }; - - this.start = this.play; // just for convenience - - this.stop = function(bAll) { - if (_t.playState === 1) { - _t._onbufferchange(0); - _t.resetOnPosition(0); - if (!_t.isHTML5) { - _t.playState = 0; - } - _t.paused = false; - if (_t._iO.onstop) { - _t._iO.onstop.apply(_t); - } - if (!_t.isHTML5) { - _s.o._stop(_t.sID, bAll); - // hack for netStream: just unload - if (_t._iO.serverURL) { - _t.unload(); - } - } else { - if (_t._a) { - _t.setPosition(0); // act like Flash, though - _t._a.pause(); // html5 has no stop() - _t.playState = 0; - _t._onTimer(); // and update UI - _stop_html5_timer(); - _t.unload(); - } - } - _t.instanceCount = 0; - _t._iO = {}; - } - return _t; - }; - - this.setAutoPlay = function(autoPlay) { - _s._wD('sound '+_t.sID+' turned autoplay ' + (autoPlay ? 'on' : 'off')); - _t._iO.autoPlay = autoPlay; - if (_t.isHTML5) { - if (_t._a && autoPlay) { - _t.play(); // HTML5 onload isn't reliable - } - } else { - _s.o._setAutoPlay(_t.sID, autoPlay); - } - if (autoPlay) { - // only increment the instanceCount if the sound isn't loaded (TODO: verify RTMP) - if (!_t.instanceCount && _t.readyState === 1) { - _t.instanceCount++; - _s._wD('sound '+_t.sID+' incremented instance count to '+_t.instanceCount); - } - } - }; - - this.getAutoPlay = function() { - return _t._iO.autoPlay; - }; - - this.setPosition = function(nMsecOffset, bNoDebug) { - if (nMsecOffset === undefined) { - nMsecOffset = 0; - } - // Use the duration from the instance options, if we don't have a track duration yet. - var original_pos, position, position1K, offset = (_t.isHTML5 ? Math.max(nMsecOffset,0) : Math.min(_t.duration || _t._iO.duration, Math.max(nMsecOffset, 0))); // position >= 0 and <= current available (loaded) duration - original_pos = _t.position; - _t.position = offset; - position1K = _t.position/1000; - _t.resetOnPosition(_t.position); - _t._iO.position = offset; - if (!_t.isHTML5) { - position = _fV === 9 ? _t.position : position1K; - if (_t.readyState && _t.readyState !== 2) { - _s.o._setPosition(_t.sID, position, (_t.paused || !_t.playState)); // if paused or not playing, will not resume (by playing) - } - } else if (_t._a) { - // Set the position in the canplay handler if the sound is not ready yet - if (_t._html5_canplay) { - if (_t._a.currentTime !== position1K) { - // Only set the position if we need to. - // DOM/JS errors/exceptions to watch out for: - // if seek is beyond (loaded?) position, "DOM exception 11" - // "INDEX_SIZE_ERR": DOM exception 1 - _s._wD('setPosition('+position1K+'): setting position'); - try { - _t._a.currentTime = position1K; - } catch(e) { - _s._wD('setPosition('+position1K+'): setting position failed: '+e.message, 2); - } - } - } else { - _s._wD('setPosition('+position1K+'): delaying, sound not ready'); - } - } - if (_t.isHTML5) { - if (_t.paused) { // if paused, refresh UI right away - _t._onTimer(true); // force update - } - } - return _t; - }; - - this.pause = function(bCallFlash) { - if (_t.paused || (_t.playState === 0 && _t.readyState !== 1)) { - return _t; - } - _s._wD('SMSound.pause()'); - _t.paused = true; - if (!_t.isHTML5) { - if (bCallFlash || bCallFlash === undefined) { - _s.o._pause(_t.sID); - } - } else { - _t._setup_html5().pause(); - _stop_html5_timer(); - } - if (_t._iO.onpause) { - _t._iO.onpause.apply(_t); - } - return _t; - }; - - // When auto-loaded streams pause on buffer full they have a playState of 0. - // We need to make sure that the playState is set to 1 when these streams "resume". - // - // When a paused stream is resumed, we need to trigger the onplay() callback if it - // hasn't been called already. In this case since the sound is being played for the - // first time, I think it's more appropriate to call onplay() rather than onresume(). - this.resume = function() { - if (!_t.paused) { - return _t; - } - _s._wD('SMSound.resume()'); - _t.paused = false; - _t.playState = 1; - if (!_t.isHTML5) { - if (_t._iO.isMovieStar) { - // Bizarre Webkit bug (Chrome reported via 8tracks.com dudes): AAC content paused for 30+ seconds(?) will not resume without a reposition. - _t.setPosition(_t.position); - } - _s.o._pause(_t.sID); // flash method is toggle-based (pause/resume) - } else { - _t._setup_html5().play(); - _start_html5_timer(); - } - if (!_t._onplay_called && _t._iO.onplay) { - _t._iO.onplay.apply(_t); - _t._onplay_called = true; - } else if (_t._iO.onresume) { - _t._iO.onresume.apply(_t); - } - return _t; - }; - - this.togglePause = function() { - _s._wD('SMSound.togglePause()'); - if (_t.playState === 0) { - _t.play({ - position: (_fV === 9 && !_t.isHTML5 ? _t.position:_t.position / 1000) - }); - return _t; - } - if (_t.paused) { - _t.resume(); - } else { - _t.pause(); - } - return _t; - }; - - this.setPan = function(nPan, bInstanceOnly) { - if (typeof nPan === 'undefined') { - nPan = 0; - } - if (typeof bInstanceOnly === 'undefined') { - bInstanceOnly = false; - } - if (!_t.isHTML5) { - _s.o._setPan(_t.sID, nPan); - } // else { no HTML5 pan? } - _t._iO.pan = nPan; - if (!bInstanceOnly) { - _t.pan = nPan; - _t.options.pan = nPan; - } - return _t; - }; - - this.setVolume = function(nVol, bInstanceOnly) { - if (typeof nVol === 'undefined') { - nVol = 100; - } - if (typeof bInstanceOnly === 'undefined') { - bInstanceOnly = false; - } - if (!_t.isHTML5) { - _s.o._setVolume(_t.sID, (_s.muted && !_t.muted) || _t.muted?0:nVol); - } else if (_t._a) { - _t._a.volume = Math.max(0, Math.min(1, nVol/100)); // valid range: 0-1 - } - _t._iO.volume = nVol; - if (!bInstanceOnly) { - _t.volume = nVol; - _t.options.volume = nVol; - } - return _t; - }; - - this.mute = function() { - _t.muted = true; - if (!_t.isHTML5) { - _s.o._setVolume(_t.sID, 0); - } else if (_t._a) { - _t._a.muted = true; - } - return _t; - }; - - this.unmute = function() { - _t.muted = false; - var hasIO = typeof _t._iO.volume !== 'undefined'; - if (!_t.isHTML5) { - _s.o._setVolume(_t.sID, hasIO?_t._iO.volume:_t.options.volume); - } else if (_t._a) { - _t._a.muted = false; - } - return _t; - }; - - this.toggleMute = function() { - return (_t.muted?_t.unmute():_t.mute()); - }; - - this.onposition = function(nPosition, oMethod, oScope) { - // TODO: allow for ranges, too? eg. (nPosition instanceof Array) - _t._onPositionItems.push({ - position: nPosition, - method: oMethod, - scope: (typeof oScope !== 'undefined'?oScope:_t), - fired: false - }); - return _t; - }; - - this.processOnPosition = function() { - var i, item, j = _t._onPositionItems.length; - if (!j || !_t.playState || _t._onPositionFired >= j) { - return false; - } - for (i=j; i--;) { - item = _t._onPositionItems[i]; - if (!item.fired && _t.position >= item.position) { - item.method.apply(item.scope,[item.position]); - item.fired = true; - _s._onPositionFired++; - } - } - return true; - }; - - this.resetOnPosition = function(nPosition) { - // reset "fired" for items interested in this position - var i, item, j = _t._onPositionItems.length; - if (!j) { - return false; - } - for (i=j; i--;) { - item = _t._onPositionItems[i]; - if (item.fired && nPosition <= item.position) { - item.fired = false; - _s._onPositionFired--; - } - } - return true; - }; - - // pseudo-private soundManager reference - - this._onTimer = function(bForce) { - // HTML5-only _whileplaying() etc. - var time, x = {}; - if (_t._hasTimer || bForce) { - if (_t._a && (bForce || ((_t.playState > 0 || _t.readyState === 1) && !_t.paused))) { // TODO: May not need to track readyState (1 = loading) - _t.duration = _t._get_html5_duration(); - _t.durationEstimate = _t.duration; - time = _t._a.currentTime?_t._a.currentTime*1000:0; - _t._whileplaying(time,x,x,x,x); - return true; - } else { - _s._wD('_onTimer: Warn for "'+_t.sID+'": '+(!_t._a?'Could not find element. ':'')+(_t.playState === 0?'playState bad, 0?':'playState = '+_t.playState+', OK')); - return false; - } - } - }; - - // --- private internals --- - - this._get_html5_duration = function() { - var d = (_t._a ? _t._a.duration*1000 : (_t._iO ? _t._iO.duration : undefined)); - return (d && !isNaN(d) && d !== Infinity ? d : (_t._iO ? _t._iO.duration : null)); - }; - - _start_html5_timer = function() { - if (_t.isHTML5) { - _startTimer(_t); - } - }; - - _stop_html5_timer = function() { - if (_t.isHTML5) { - _stopTimer(_t); - } - }; - - _resetProperties = function(bLoaded) { - _t._onPositionItems = []; - _t._onPositionFired = 0; - _t._hasTimer = null; - _t._onplay_called = false; - _t._a = null; - _t._html5_canplay = false; - _t.bytesLoaded = null; - _t.bytesTotal = null; - _t.position = null; - _t.duration = (_t._iO && _t._iO.duration?_t._iO.duration:null); - _t.durationEstimate = null; - _t.failures = 0; - _t.loaded = false; - _t.playState = 0; - _t.paused = false; - _t.readyState = 0; // 0 = uninitialised, 1 = loading, 2 = failed/error, 3 = loaded/success - _t.muted = false; - _t.didBeforeFinish = false; - _t.didJustBeforeFinish = false; - _t.isBuffering = false; - _t.instanceOptions = {}; - _t.instanceCount = 0; - _t.peakData = { - left: 0, - right: 0 - }; - _t.waveformData = { - left: [], - right: [] - }; - _t.eqData = []; // legacy: 1D array - _t.eqData.left = []; - _t.eqData.right = []; - }; - - _resetProperties(); - - // pseudo-private methods used by soundManager - - this._setup_html5 = function(oOptions) { - var _iO = _mixin(_t._iO, oOptions), d = decodeURI, - _a = _useGlobalHTML5Audio ? _s._global_a : _t._a, - _dURL = d(_iO.url), - _oldIO = (_a && _a._t ? _a._t.instanceOptions : null); - if (_a) { - if (_a._t && _oldIO.url === _iO.url && (!_t._lastURL || (_t._lastURL === _oldIO.url))) { - return _a; // same url, ignore request - } - _s._wD('setting new URL on existing object: ' + _dURL + (_t._lastURL ? ', old URL: ' + _t._lastURL : '')); - /* - * "First things first, I, Poppa.." (reset the previous state of the old sound, if playing) - * Fixes case with devices that can only play one sound at a time - * Otherwise, other sounds in mid-play will be terminated without warning and in a stuck state - */ - if (_useGlobalHTML5Audio && _a._t && _a._t.playState && _iO.url !== _oldIO.url) { - _a._t.stop(); - } - _resetProperties(); // new URL, so reset load/playstate and so on - _a.src = _iO.url; - _t.url = _iO.url; - _t._lastURL = _iO.url; - _a._called_load = false; - } else { - _s._wD('creating HTML5 Audio() element with URL: '+_dURL); - _a = new Audio(_iO.url); - _a._called_load = false; - if (_useGlobalHTML5Audio) { - _s._global_a = _a; - } - } - _t.isHTML5 = true; - _t._a = _a; // store a ref on the track - _a._t = _t; // store a ref on the audio - _t._add_html5_events(); - _a.loop = (_iO.loops>1?'loop':''); - if (_iO.autoLoad || _iO.autoPlay) { - _a.autobuffer = 'auto'; // early HTML5 implementation (non-standard) - _a.preload = 'auto'; // standard - _t.load(); - _a._called_load = true; - } else { - _a.autobuffer = false; // early HTML5 implementation (non-standard) - _a.preload = 'none'; // standard - } - _a.loop = (_iO.loops>1?'loop':''); // boolean instead of "loop", for webkit? - spec says string. http://www.w3.org/TR/html-markup/audio.html#audio.attrs.loop - return _a; - }; - - // related private methods - - this._add_html5_events = function() { - if (_t._a._added_events) { - return false; - } - - var f; - - function add(oEvt, oFn, bCapture) { - return _t._a ? _t._a.addEventListener(oEvt, oFn, bCapture||false) : null; - } - - _s._wD(_h5+'adding event listeners: '+_t.sID); - _t._a._added_events = true; - - for (f in _s._html5_events) { - if (_s._html5_events.hasOwnProperty(f)) { - add(f, _s._html5_events[f]); - } - } - - return true; - }; - - // Keep this externally accessible - this._remove_html5_events = function() { - // Remove event listeners - function remove(oEvt, oFn, bCapture) { - return (_t._a ? _t._a.removeEventListener(oEvt, oFn, bCapture||false) : null); - } - _s._wD(_h5+'removing event listeners: '+_t.sID); - _t._a._added_events = false; - - for (var f in _s._html5_events) { - if (_s._html5_events.hasOwnProperty(f)) { - remove(f, _s._html5_events[f]); - } - } - }; - - // --- "private" methods called by Flash --- - - this._whileloading = function(nBytesLoaded, nBytesTotal, nDuration, nBufferLength) { - _t.bytesLoaded = nBytesLoaded; - _t.bytesTotal = nBytesTotal; - _t.duration = Math.floor(nDuration); - _t.bufferLength = nBufferLength; - if (!_t._iO.isMovieStar) { - if (_t._iO.duration) { - // use options, if specified and larger - _t.durationEstimate = (_t.duration > _t._iO.duration) ? _t.duration : _t._iO.duration; - } else { - _t.durationEstimate = parseInt((_t.bytesTotal / _t.bytesLoaded) * _t.duration, 10); - } - if (_t.durationEstimate === undefined) { - _t.durationEstimate = _t.duration; - } - if (_t.readyState !== 3 && _t._iO.whileloading) { - _t._iO.whileloading.apply(_t); - } - } else { - _t.durationEstimate = _t.duration; - if (_t.readyState !== 3 && _t._iO.whileloading) { - _t._iO.whileloading.apply(_t); - } - } - }; - - this._onid3 = function(oID3PropNames, oID3Data) { - // oID3PropNames: string array (names) - // ID3Data: string array (data) - _s._wD('SMSound._onid3(): "' + this.sID + '" ID3 data received.'); - var oData = [], i, j; - for (i = 0, j = oID3PropNames.length; i < j; i++) { - oData[oID3PropNames[i]] = oID3Data[i]; - } - _t.id3 = _mixin(_t.id3, oData); - if (_t._iO.onid3) { - _t._iO.onid3.apply(_t); - } - }; - - this._whileplaying = function(nPosition, oPeakData, oWaveformDataLeft, oWaveformDataRight, oEQData) { - if (isNaN(nPosition) || nPosition === null) { - return false; // flash safety net - } - if (_t.playState === 0 && nPosition > 0) { - // invalid position edge case for end/stop - nPosition = 0; - } - _t.position = nPosition; - _t.processOnPosition(); - if (_fV > 8 && !_t.isHTML5) { - if (_t._iO.usePeakData && typeof oPeakData !== 'undefined' && oPeakData) { - _t.peakData = { - left: oPeakData.leftPeak, - right: oPeakData.rightPeak - }; - } - if (_t._iO.useWaveformData && typeof oWaveformDataLeft !== 'undefined' && oWaveformDataLeft) { - _t.waveformData = { - left: oWaveformDataLeft.split(','), - right: oWaveformDataRight.split(',') - }; - } - if (_t._iO.useEQData) { - if (typeof oEQData !== 'undefined' && oEQData && oEQData.leftEQ) { - var eqLeft = oEQData.leftEQ.split(','); - _t.eqData = eqLeft; - _t.eqData.left = eqLeft; - if (typeof oEQData.rightEQ !== 'undefined' && oEQData.rightEQ) { - _t.eqData.right = oEQData.rightEQ.split(','); - } - } - } - } - if (_t.playState === 1) { - // special case/hack: ensure buffering is false if loading from cache (and not yet started) - if (!_t.isHTML5 && _s.flashVersion === 8 && !_t.position && _t.isBuffering) { - _t._onbufferchange(0); - } - if (_t._iO.whileplaying) { - _t._iO.whileplaying.apply(_t); // flash may call after actual finish - } - if ((_t.loaded || (!_t.loaded && _t._iO.isMovieStar)) && _t._iO.onbeforefinish && _t._iO.onbeforefinishtime && !_t.didBeforeFinish && _t.duration - _t.position <= _t._iO.onbeforefinishtime) { - _t._onbeforefinish(); - } - } - return true; - }; - - // Only applies to RTMP - this._onconnect = function(bSuccess) { - var fN = 'SMSound._onconnect(): '; - bSuccess = (bSuccess === 1); - _s._wD(fN+'"'+_t.sID+'"'+(bSuccess?' connected.':' failed to connect? - '+_t.url), (bSuccess?1:2)); - _t.connected = bSuccess; - if (bSuccess) { - _t.failures = 0; - if (_idCheck(_t.sID)) { - if (_t.getAutoPlay()) { - _t.play(undefined, _t.getAutoPlay()); // only update the play state if auto playing - } else if (_t._iO.autoLoad) { - _t.load(); - } - } - if (_t._iO.onconnect) { - _t._iO.onconnect.apply(_t,[bSuccess]); - } - } - }; - - this._onload = function(nSuccess) { - var fN = 'SMSound._onload(): ', loadOK = (nSuccess?true:false); - _s._wD(fN + '"' + _t.sID + '"' + (loadOK?' loaded.':' failed to load? - ' + _t.url), (loadOK?1:2)); - // - if (!loadOK && !_t.isHTML5) { - if (_s.sandbox.noRemote === true) { - _s._wD(fN + _str('noNet'), 1); - } - if (_s.sandbox.noLocal === true) { - _s._wD(fN + _str('noLocal'), 1); - } - } - // - _t.loaded = loadOK; - _t.readyState = loadOK?3:2; - _t._onbufferchange(0); - if (_t._iO.onload) { - _t._iO.onload.apply(_t, [loadOK]); - } - return true; - }; - - // fire onfailure() only once at most - // at this point we just recreate failed sounds rather than trying to reconnect. - this._onfailure = function(msg, level, code) { - _t.failures++; - _s._wD('SMSound._onfailure(): "'+_t.sID+'" count '+_t.failures); - if (_t._iO.onfailure && _t.failures === 1) { - _t._iO.onfailure(_t, msg, level, code); - } else { - _s._wD('SMSound._onfailure(): ignoring'); - } - }; - - this._onbeforefinish = function() { - if (!_t.didBeforeFinish) { - _t.didBeforeFinish = true; - if (_t._iO.onbeforefinish) { - _s._wD('SMSound._onbeforefinish(): "' + _t.sID + '"'); - _t._iO.onbeforefinish.apply(_t); - } - } - }; - - this._onjustbeforefinish = function(msOffset) { - if (!_t.didJustBeforeFinish) { - _t.didJustBeforeFinish = true; - if (_t._iO.onjustbeforefinish) { - _s._wD('SMSound._onjustbeforefinish(): "' + _t.sID + '"'); - _t._iO.onjustbeforefinish.apply(_t); - } - } - }; - - this._onfinish = function() { - // _s._wD('SMSound._onfinish(): "' + _t.sID + '" got instanceCount '+_t.instanceCount); - var _io_onfinish = _t._iO.onfinish; // store local copy before it gets trashed.. - _t._onbufferchange(0); - _t.resetOnPosition(0); - if (_t._iO.onbeforefinishcomplete) { - _t._iO.onbeforefinishcomplete.apply(_t); - } - // reset some state items - _t.didBeforeFinish = false; - _t.didJustBeforeFinish = false; - if (_t.instanceCount) { - _t.instanceCount--; - if (!_t.instanceCount) { - // reset instance options - _t.playState = 0; - _t.paused = false; - _t.instanceCount = 0; - _t.instanceOptions = {}; - _t._iO = {}; - _stop_html5_timer(); - } - if (!_t.instanceCount || _t._iO.multiShotEvents) { - // fire onfinish for last, or every instance - if (_io_onfinish) { - _s._wD('SMSound._onfinish(): "' + _t.sID + '"'); - _io_onfinish.apply(_t); - } - } - } - }; - - this._onbufferchange = function(nIsBuffering) { - var fN = 'SMSound._onbufferchange()'; - if (_t.playState === 0) { - // ignore if not playing - return false; - } - if ((nIsBuffering && _t.isBuffering) || (!nIsBuffering && !_t.isBuffering)) { - return false; - } - _t.isBuffering = (nIsBuffering === 1); - if (_t._iO.onbufferchange) { - _s._wD(fN + ': ' + nIsBuffering); - _t._iO.onbufferchange.apply(_t); - } - return true; - }; - - this._ondataerror = function(sError) { - // flash 9 wave/eq data handler - if (_t.playState > 0) { // hack: called at start, and end from flash at/after onfinish() - _s._wD('SMSound._ondataerror(): ' + sError); - if (_t._iO.ondataerror) { - _t._iO.ondataerror.apply(_t); - } - } - }; - - }; // SMSound() - - // --- private SM2 internals --- - - _getDocument = function() { - return (_doc.body?_doc.body:(_doc._docElement?_doc.documentElement:_doc.getElementsByTagName('div')[0])); - }; - - _id = function(sID) { - return _doc.getElementById(sID); - }; - - _mixin = function(oMain, oAdd) { - // non-destructive merge - var o1 = {}, i, o2, o; - for (i in oMain) { // clone c1 - if (oMain.hasOwnProperty(i)) { - o1[i] = oMain[i]; - } - } - o2 = (typeof oAdd === 'undefined'?_s.defaultOptions:oAdd); - for (o in o2) { - if (o2.hasOwnProperty(o) && typeof o1[o] === 'undefined') { - o1[o] = o2[o]; - } - } - return o1; - }; - - _event = (function() { - - var old = (_win.attachEvent), - evt = { - add: (old?'attachEvent':'addEventListener'), - remove: (old?'detachEvent':'removeEventListener') - }; - - function getArgs(oArgs) { - var args = _slice.call(oArgs), len = args.length; - if (old) { - args[1] = 'on' + args[1]; // prefix - if (len > 3) { - args.pop(); // no capture - } - } else if (len === 3) { - args.push(false); - } - return args; - } - - function apply(args, sType) { - var element = args.shift(), - method = [evt[sType]]; - if (old) { - element[method](args[0], args[1]); - } else { - element[method].apply(element, args); - } - } - - function add() { - apply(getArgs(arguments), 'add'); - } - - function remove() { - apply(getArgs(arguments), 'remove'); - } - - return { - 'add': add, - 'remove': remove - }; - - }()); - - _html5OK = function(iO) { - return (!iO.serverURL && (iO.type?_html5CanPlay({type:iO.type}):_html5CanPlay(iO.url)||_html5Only)); // Use type, if specified. If HTML5-only mode, no other options, so just give 'er - }; - - _html5CanPlay = function(sURL) { - // try to find MIME, test and return truthiness - if (!_s.useHTML5Audio || !_s.hasHTML5) { - return false; - } - var result, mime, offset, fileExt, item, aF = _s.audioFormats; - if (!_html5Ext) { - _html5Ext = []; - for (item in aF) { - if (aF.hasOwnProperty(item)) { - _html5Ext.push(item); - if (aF[item].related) { - _html5Ext = _html5Ext.concat(aF[item].related); - } - } - } - _html5Ext = new RegExp('\\.('+_html5Ext.join('|')+')','i'); - } - mime = (typeof sURL.type !== 'undefined'?sURL.type:null); - fileExt = (typeof sURL === 'string'?sURL.toLowerCase().match(_html5Ext):null); // TODO: Strip URL queries, etc. - if (!fileExt || !fileExt.length) { - if (!mime) { - return false; - } else { - // audio/mp3 -> mp3, result should be known - offset = mime.indexOf(';'); - fileExt = (offset !== -1?mime.substr(0,offset):mime).substr(6); // strip "audio/X; codecs.." - } - } else { - fileExt = fileExt[0].substr(1); // "mp3", for example - } - if (fileExt && typeof _s.html5[fileExt] !== 'undefined') { - // result known - return _s.html5[fileExt]; - } else { - if (!mime) { - if (fileExt && _s.html5[fileExt]) { - return _s.html5[fileExt]; - } else { - // best-case guess, audio/whatever-dot-filename-format-you're-playing - mime = 'audio/'+fileExt; - } - } - result = _s.html5.canPlayType(mime); - _s.html5[fileExt] = result; - // _s._wD('canPlayType, found result: '+result); - return result; - } - }; - - _testHTML5 = function() { - if (!_s.useHTML5Audio || typeof Audio === 'undefined') { - return false; - } - // double-whammy: Opera 9.64 throws WRONG_ARGUMENTS_ERR if no parameter passed to Audio(), and Webkit + iOS happily tries to load "null" as a URL. :/ - var a = (typeof Audio !== 'undefined' ? (_isOpera ? new Audio(null) : new Audio()) : null), item, support = {}, aF, i, _hasFlash = _detectFlash(); - function _cp(m) { - var canPlay, i, j, isOK = false; - if (!a || typeof a.canPlayType !== 'function') { - return false; - } - if (m instanceof Array) { - // iterate through all mime types, return any successes - for (i=0, j=m.length; i - notReady: 'Not loaded yet - wait for soundManager.onload()/onready()', - notOK: 'Audio support is not available.', - appXHTML: _smc + 'createMovie(): appendChild/innerHTML set failed. May be app/xhtml+xml DOM-related.', - spcWmode: _smc + 'createMovie(): Removing wmode, preventing known SWF loading issue(s)', - swf404: _sm + ': Verify that %s is a valid path.', - tryDebug: 'Try ' + _sm + '.debugFlash = true for more security details (output goes to SWF.)', - checkSWF: 'See SWF output for more debug info.', - localFail: _sm + ': Non-HTTP page (' + _doc.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: _sm + ': Special case: Waiting for focus-related event..', - waitImpatient: _sm + ': Getting impatient, still waiting for Flash%s...', - waitForever: _sm + ': Waiting indefinitely for Flash (will recover if unblocked)...', - needFunction: _sm + ': Function object expected for %s', - badID: 'Warning: Sound ID "%s" should be a string, starting with a non-numeric character', - noMS: 'MovieStar mode not enabled. Exiting.', - currentObj: '--- ' + _sm + '._debug(): Current sound objects ---', - waitEI: _smc + 'initMovie(): Waiting for ExternalInterface call from Flash..', - waitOnload: _sm + ': Waiting for window.onload()', - docLoaded: _sm + ': Document already loaded', - onload: _smc + 'initComplete(): calling soundManager.onload()', - onloadOK: _sm + '.onload() complete', - init: '-- ' + _smc + 'init() --', - didInit: _smc + 'init(): Already called?', - flashJS: _sm + ': Attempting to call Flash from JS..', - noPolling: _sm + ': Polling (whileloading()/whileplaying() support) is disabled.', - secNote: 'Flash security note: Network/internet URLs will not load due to security restrictions. Access can be configured via Flash Player Global Security Settings Page: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html', - badRemove: 'Warning: Failed to remove flash movie.', - noPeak: 'Warning: peakData features unsupported for movieStar formats', - shutdown: _sm + '.disable(): Shutting down', - queue: _sm + ': Queueing %s handler', - smFail: _sm + ': Failed to initialise.', - smError: 'SMSound.load(): Exception: JS-Flash communication failed, or JS error.', - fbTimeout: 'No flash response, applying .'+_s.swfCSS.swfTimedout+' CSS..', - fbLoaded: 'Flash loaded', - fbHandler: _smc+'flashBlockHandler()', - manURL: 'SMSound.load(): Using manually-assigned URL', - onURL: _sm + '.load(): current URL already assigned.', - badFV: _sm + '.flashVersion must be 8 or 9. "%s" is invalid. Reverting to %s.', - as2loop: 'Note: Setting stream:false so looping can work (flash 8 limitation)', - noNSLoop: 'Note: Looping not implemented for MovieStar formats', - needfl9: 'Note: Switching to flash 9, required for MP4 formats.', - mfTimeout: 'Setting flashLoadTimeout = 0 (infinite) for off-screen, mobile flash case', - mfOn: 'mobileFlash::enabling on-screen flash repositioning', - policy: 'Enabling usePolicyFile for data access' - // - }; - - _str = function() { // o [,items to replace] - // - var args = _slice.call(arguments), // real array, please - o = args.shift(), // first arg - str = (_strings && _strings[o]?_strings[o]:''), i, j; - if (str && args && args.length) { - for (i = 0, j = args.length; i < j; i++) { - str = str.replace('%s', args[i]); - } - } - return str; - // - }; - - _loopFix = function(sOpt) { - // flash 8 requires stream = false for looping to work - if (_fV === 8 && sOpt.loops > 1 && sOpt.stream) { - _wDS('as2loop'); - sOpt.stream = false; - } - return sOpt; - }; - - _policyFix = function(sOpt, sPre) { - if (sOpt && !sOpt.usePolicyFile && (sOpt.onid3 || sOpt.usePeakData || sOpt.useWaveformData || sOpt.useEQData)) { - _s._wD((sPre?sPre+':':'') + _str('policy')); - sOpt.usePolicyFile = true; - } - return sOpt; - }; - - _complain = function(sMsg) { - if (typeof console !== 'undefined' && typeof console.warn !== 'undefined') { - console.warn(sMsg); - } else { - _s._wD(sMsg); - } - }; - - _doNothing = function() { - return false; - }; - - _disableObject = function(o) { - for (var oProp in o) { - if (o.hasOwnProperty(oProp) && typeof o[oProp] === 'function') { - o[oProp] = _doNothing; - } - } - oProp = null; - }; - - _failSafely = function(bNoDisable) { - // general failure exception handler - if (typeof bNoDisable === 'undefined') { - bNoDisable = false; - } - if (_disabled || bNoDisable) { - _wDS('smFail', 2); - _s.disable(bNoDisable); - } - }; - - _normalizeMovieURL = function(smURL) { - var urlParams = null; - if (smURL) { - if (smURL.match(/\.swf(\?.*)?$/i)) { - urlParams = smURL.substr(smURL.toLowerCase().lastIndexOf('.swf?') + 4); - if (urlParams) { - return smURL; // assume user knows what they're doing - } - } else if (smURL.lastIndexOf('/') !== smURL.length - 1) { - smURL = smURL + '/'; - } - } - return (smURL && smURL.lastIndexOf('/') !== - 1?smURL.substr(0, smURL.lastIndexOf('/') + 1):'./') + _s.movieURL; - }; - - _setVersionInfo = function() { - if (_fV !== 8 && _fV !== 9) { - _s._wD(_str('badFV', _fV, _defaultFlashVersion)); - _s.flashVersion = _defaultFlashVersion; - } - var isDebug = (_s.debugMode || _s.debugFlash?'_debug.swf':'.swf'); // debug flash movie, if applicable - if (_s.useHTML5Audio && !_html5Only && _s.audioFormats.mp4.required && _s.flashVersion < 9) { - _s._wD(_str('needfl9')); - _s.flashVersion = 9; - } - _fV = _s.flashVersion; // short-hand for internal use - _s.version = _s.versionNumber + (_html5Only?' (HTML5-only mode)':(_fV === 9?' (AS3/Flash 9)':' (AS2/Flash 8)')); - // set up default options - if (_fV > 8) { - _s.defaultOptions = _mixin(_s.defaultOptions, _s.flash9Options); - _s.features.buffering = true; - } - if (_fV > 8 && _s.useMovieStar) { - // flash 9+ support for movieStar formats as well as MP3 - _s.defaultOptions = _mixin(_s.defaultOptions, _s.movieStarOptions); - _s.filePatterns.flash9 = new RegExp('\\.(mp3|' + _s.netStreamTypes.join('|') + ')(\\?.*)?$', 'i'); - _s.mimePattern = _s.netStreamMimeTypes; - _s.features.movieStar = true; - } else { - _s.useMovieStar = false; - _s.features.movieStar = false; - } - _s.filePattern = _s.filePatterns[(_fV !== 8?'flash9':'flash8')]; - _s.movieURL = (_fV === 8?'soundmanager2.swf':'soundmanager2_flash9.swf').replace('.swf',isDebug); - _s.features.peakData = _s.features.waveformData = _s.features.eqData = (_fV > 8); - }; - - _setPolling = function(bPolling, bHighPerformance) { - if (!_s.o || !_s.allowPolling) { - return false; - } - _s.o._setPolling(bPolling, bHighPerformance); - }; - - function _initDebug() { - if (_s.debugURLParam.test(_wl)) { - _s.debugMode = true; // allow force of debug mode via URL - } - // - if (_id(_s.debugID)) { - return false; - } - var oD, oDebug, oTarget, oToggle, tmp; - if (_s.debugMode && !_id(_s.debugID) && ((!_hasConsole || !_s.useConsole) || (_s.useConsole && _hasConsole && !_s.consoleOnly))) { - oD = _doc.createElement('div'); - oD.id = _s.debugID + '-toggle'; - oToggle = { - 'position': 'fixed', - 'bottom': '0px', - 'right': '0px', - 'width': '1.2em', - 'height': '1.2em', - 'lineHeight': '1.2em', - 'margin': '2px', - 'textAlign': 'center', - 'border': '1px solid #999', - 'cursor': 'pointer', - 'background': '#fff', - 'color': '#333', - 'zIndex': 10001 - }; - oD.appendChild(_doc.createTextNode('-')); - oD.onclick = _toggleDebug; - oD.title = 'Toggle SM2 debug console'; - if (_ua.match(/msie 6/i)) { - oD.style.position = 'absolute'; - oD.style.cursor = 'hand'; - } - for (tmp in oToggle) { - if (oToggle.hasOwnProperty(tmp)) { - oD.style[tmp] = oToggle[tmp]; - } - } - oDebug = _doc.createElement('div'); - oDebug.id = _s.debugID; - oDebug.style.display = (_s.debugMode?'block':'none'); - if (_s.debugMode && !_id(oD.id)) { - try { - oTarget = _getDocument(); - oTarget.appendChild(oD); - } catch(e2) { - throw new Error(_str('appXHTML')); - } - oTarget.appendChild(oDebug); - } - } - oTarget = null; - // - } - - _createMovie = function(smID, smURL) { - - var specialCase = null, - remoteURL = (smURL?smURL:_s.url), - localURL = (_s.altURL?_s.altURL:remoteURL), - oEmbed, oMovie, oTarget = _getDocument(), tmp, movieHTML, oEl, extraClass = _getSWFCSS(), s, x, sClass, side = '100%', isRTL = null, html = _doc.getElementsByTagName('html')[0]; - isRTL = (html && html.dir && html.dir.match(/rtl/i)); - smID = (typeof smID === 'undefined'?_s.id:smID); - - if (_didAppend && _appendSuccess) { - return false; // ignore if already succeeded - } - - function _initMsg() { - _s._wD('-- SoundManager 2 ' + _s.version + (!_html5Only && _s.useHTML5Audio?(_s.hasHTML5?' + HTML5 audio':', no HTML5 audio support'):'') + (!_html5Only ? (_s.useMovieStar?', MovieStar mode':'') + (_s.useHighPerformance?', high performance mode, ':', ') + (( _s.flashPollingInterval ? 'custom (' + _s.flashPollingInterval + 'ms)' : (_s.useFastPolling?'fast':'normal')) + ' polling') + (_s.wmode?', wmode: ' + _s.wmode:'') + (_s.debugFlash?', flash debug mode':'') + (_s.useFlashBlock?', flashBlock mode':'') : '') + ' --', 1); - } - - if (_html5Only) { - _setVersionInfo(); - _initMsg(); - _s.oMC = _id(_s.movieID); - _init(); - // prevent multiple init attempts - _didAppend = true; - _appendSuccess = true; - return false; - } - - _didAppend = true; - - // safety check for legacy (change to Flash 9 URL) - _setVersionInfo(); - _s.url = _normalizeMovieURL(_s._overHTTP?remoteURL:localURL); - smURL = _s.url; - - _s.wmode = (!_s.wmode && _s.useHighPerformance && !_s.useMovieStar?'transparent':_s.wmode); - - if (_s.wmode !== null && (_ua.match(/msie 8/i) || (!_isIE && !_s.useHighPerformance)) && navigator.platform.match(/win32|win64/i)) { - _s.specialWmodeCase = true; - // extra-special case: movie doesn't load until scrolled into view when using wmode = anything but 'window' here - // does not apply when using high performance (position:fixed means on-screen), OR infinite flash load timeout - // wmode breaks IE 8 on Vista + Win7 too in some cases, as of Jan.2011 (?) - _wDS('spcWmode'); - _s.wmode = null; - } - - oEmbed = { - 'name': smID, - 'id': smID, - 'src': smURL, - 'width': side, - 'height': side, - 'quality': 'high', - 'allowScriptAccess': _s.allowScriptAccess, - 'bgcolor': _s.bgColor, - 'pluginspage': _s._http+'//www.macromedia.com/go/getflashplayer', - 'type': 'application/x-shockwave-flash', - 'wmode': _s.wmode, - 'hasPriority': 'true' // http://help.adobe.com/en_US/as3/mobile/WS4bebcd66a74275c36cfb8137124318eebc6-7ffd.html - }; - - if (_s.debugFlash) { - oEmbed.FlashVars = 'debug=1'; - } - - if (!_s.wmode) { - delete oEmbed.wmode; // don't write empty attribute - } - - if (_isIE) { - // IE is "special". - oMovie = _doc.createElement('div'); - movieHTML = '' + (_s.wmode?' ':'') + '' + (_s.debugFlash?'':'') + ''; - } else { - oMovie = _doc.createElement('embed'); - for (tmp in oEmbed) { - if (oEmbed.hasOwnProperty(tmp)) { - oMovie.setAttribute(tmp, oEmbed[tmp]); - } - } - } - - _initDebug(); - extraClass = _getSWFCSS(); - oTarget = _getDocument(); - - if (oTarget) { - _s.oMC = _id(_s.movieID)?_id(_s.movieID):_doc.createElement('div'); - if (!_s.oMC.id) { - _s.oMC.id = _s.movieID; - _s.oMC.className = _s.swfCSS.swfDefault + ' ' + extraClass; - // "hide" flash movie - s = null; - oEl = null; - if (!_s.useFlashBlock) { - if (_s.useHighPerformance) { - s = { - 'position': 'fixed', - 'width': '8px', - 'height': '8px', - // >= 6px for flash to run fast, >= 8px to start up under Firefox/win32 in some cases. odd? yes. - 'bottom': '0px', - 'left': '0px', - 'overflow': 'hidden' - }; - } else { - s = { - 'position': 'absolute', - 'width': '6px', - 'height': '6px', - 'top': '-9999px', - 'left': '-9999px' - }; - if (isRTL) { - s.left = Math.abs(parseInt(s.left,10))+'px'; - } - } - } - if (_isWebkit) { - _s.oMC.style.zIndex = 10000; // soundcloud-reported render/crash fix, safari 5 - } - if (!_s.debugFlash) { - for (x in s) { - if (s.hasOwnProperty(x)) { - _s.oMC.style[x] = s[x]; - } - } - } - try { - if (!_isIE) { - _s.oMC.appendChild(oMovie); - } - oTarget.appendChild(_s.oMC); - if (_isIE) { - oEl = _s.oMC.appendChild(_doc.createElement('div')); - oEl.className = _s.swfCSS.swfBox; - oEl.innerHTML = movieHTML; - } - _appendSuccess = true; - } catch(e) { - throw new Error(_str('appXHTML')); - } - } else { - // it's already in the document. - sClass = _s.oMC.className; - _s.oMC.className = (sClass?sClass+' ':_s.swfCSS.swfDefault) + (extraClass?' '+extraClass:''); - _s.oMC.appendChild(oMovie); - if (_isIE) { - oEl = _s.oMC.appendChild(_doc.createElement('div')); - oEl.className = _s.swfCSS.swfBox; - oEl.innerHTML = movieHTML; - } - _appendSuccess = true; - } - } - - if (specialCase) { - _s._wD(specialCase); - } - - _initMsg(); - _s._wD(_smc+'createMovie(): Trying to load ' + smURL + (!_s._overHTTP && _s.altURL?' (alternate URL)':''), 1); - - return true; - }; - - _idCheck = this.getSoundById; - - _initMovie = function() { - if (_html5Only) { - _createMovie(); - return false; - } - // attempt to get, or create, movie - if (_s.o) { - return false; // may already exist - } - _s.o = _s.getMovie(_s.id); // inline markup - if (!_s.o) { - if (!_oRemoved) { - // try to create - _createMovie(_s.id, _s.url); - } else { - // try to re-append removed movie after reboot() - if (!_isIE) { - _s.oMC.appendChild(_oRemoved); - } else { - _s.oMC.innerHTML = _oRemovedHTML; - } - _oRemoved = null; - _didAppend = true; - } - _s.o = _s.getMovie(_s.id); - } - if (_s.o) { - _s._wD(_smc+'initMovie(): Got '+_s.o.nodeName+' element ('+(_didAppend?'created via JS':'static HTML')+')'); - _wDS('waitEI'); - } - if (_s.oninitmovie instanceof Function) { - setTimeout(_s.oninitmovie, 1); - } - return true; - }; - - _go = function(sURL) { - // where it all begins. - if (sURL) { - _s.url = sURL; - } - _initMovie(); - }; - - _delayWaitForEI = function() { - setTimeout(_waitForEI, 500); - }; - - _waitForEI = function() { - if (_waitingForEI) { - return false; - } - _waitingForEI = true; - _event.remove(_win, 'load', _delayWaitForEI); - if (_tryInitOnFocus && !_isFocused) { - _wDS('waitFocus'); - return false; - } - var p; - if (!_didInit) { - p = _s.getMoviePercent(); - _s._wD(_str('waitImpatient', (p === 100?' (SWF loaded)':(p > 0?' (SWF ' + p + '% loaded)':'')))); - } - setTimeout(function() { - p = _s.getMoviePercent(); - if (!_didInit) { - _s._wD(_sm + ': No Flash response within expected time.\nLikely causes: ' + (p === 0?'Loading ' + _s.movieURL + ' may have failed (and/or Flash ' + _fV + '+ not present?), ':'') + 'Flash blocked or JS-Flash security error.' + (_s.debugFlash?' ' + _str('checkSWF'):''), 2); - if (!_s._overHTTP && p) { - _wDS('localFail', 2); - if (!_s.debugFlash) { - _wDS('tryDebug', 2); - } - } - if (p === 0) { - // if 0 (not null), probably a 404. - _s._wD(_str('swf404', _s.url)); - } - _debugTS('flashtojs', false, ': Timed out' + _s._overHTTP?' (Check flash security or flash blockers)':' (No plugin/missing SWF?)'); - } - // give up / time-out, depending - if (!_didInit && _okToDisable) { - if (p === null) { - // SWF failed. Maybe blocked. - if (_s.useFlashBlock || _s.flashLoadTimeout === 0) { - if (_s.useFlashBlock) { - _flashBlockHandler(); - } - _wDS('waitForever'); - } else { - // old SM2 behaviour, simply fail - _failSafely(true); - } - } else { - // flash loaded? Shouldn't be a blocking issue, then. - if (_s.flashLoadTimeout === 0) { - _wDS('waitForever'); - } else { - _failSafely(true); - } - } - } - }, _s.flashLoadTimeout); - }; - - _go = function(sURL) { - // where it all begins. - if (sURL) { - _s.url = sURL; - } - _initMovie(); - }; - - // - _wDS = function(o, errorLevel) { - if (!o) { - return ''; - } else { - return _s._wD(_str(o), errorLevel); - } - }; - - if (_wl.indexOf('debug=alert') + 1 && _s.debugMode) { - _s._wD = function(sText) {window.alert(sText);}; - } - - _toggleDebug = function() { - var o = _id(_s.debugID), - oT = _id(_s.debugID + '-toggle'); - if (!o) { - return false; - } - if (_debugOpen) { - // minimize - oT.innerHTML = '+'; - o.style.display = 'none'; - } else { - oT.innerHTML = '-'; - o.style.display = 'block'; - } - _debugOpen = !_debugOpen; - }; - - _debugTS = function(sEventType, bSuccess, sMessage) { - // troubleshooter debug hooks - if (typeof sm2Debugger !== 'undefined') { - try { - sm2Debugger.handleEvent(sEventType, bSuccess, sMessage); - } catch(e) { - // oh well - } - } - return true; - }; - // - - _getSWFCSS = function() { - var css = []; - if (_s.debugMode) { - css.push(_s.swfCSS.sm2Debug); - } - if (_s.debugFlash) { - css.push(_s.swfCSS.flashDebug); - } - if (_s.useHighPerformance) { - css.push(_s.swfCSS.highPerf); - } - return css.join(' '); - }; - - _flashBlockHandler = function() { - // *possible* flash block situation. - var name = _str('fbHandler'), p = _s.getMoviePercent(), css = _s.swfCSS; - if (!_s.ok()) { - if (_needsFlash) { - // make the movie more visible, so user can fix - _s.oMC.className = _getSWFCSS() + ' ' + css.swfDefault + ' ' + (p === null?css.swfTimedout:css.swfError); - _s._wD(name+': '+_str('fbTimeout')+(p?' ('+_str('fbLoaded')+')':'')); - } - _s.didFlashBlock = true; - _processOnEvents({type:'ontimeout',ignoreInit:true}); // fire onready(), complain lightly - if (_s.onerror instanceof Function) { - _s.onerror.apply(_win); - } - } else { - // SM2 loaded OK (or recovered) - if (_s.didFlashBlock) { - _s._wD(name+': Unblocked'); - } - if (_s.oMC) { - _s.oMC.className = [_getSWFCSS(), css.swfDefault, css.swfLoaded + (_s.didFlashBlock?' '+css.swfUnblocked:'')].join(' '); - } - } - }; - - _handleFocus = function() { - function cleanup() { - _event.remove(_win, 'focus', _handleFocus); - _event.remove(_win, 'load', _handleFocus); - } - if (_isFocused || !_tryInitOnFocus) { - cleanup(); - return true; - } - _okToDisable = true; - _isFocused = true; - _s._wD(_smc+'handleFocus()'); - if (_isSafari && _tryInitOnFocus) { - // giant Safari 3.1 hack - assume mousemove = focus given lack of focus event - _event.remove(_win, 'mousemove', _handleFocus); - } - // allow init to restart - _waitingForEI = false; - cleanup(); - return true; - }; - - _initComplete = function(bNoDisable) { - if (_didInit) { - return false; - } - if (_html5Only) { - // all good. - _s._wD('-- SoundManager 2: loaded --'); - _didInit = true; - _processOnEvents(); - _initUserOnload(); - return true; - } - var sClass = _s.oMC.className, - wasTimeout = (_s.useFlashBlock && _s.flashLoadTimeout && !_s.getMoviePercent()); - if (!wasTimeout) { - _didInit = true; - } - _s._wD('-- SoundManager 2 ' + (_disabled?'failed to load':'loaded') + ' (' + (_disabled?'security/load error':'OK') + ') --', 1); - if (_disabled || bNoDisable) { - if (_s.useFlashBlock) { - _s.oMC.className = _getSWFCSS() + ' ' + (_s.getMoviePercent() === null?_s.swfCSS.swfTimedout:_s.swfCSS.swfError); - } - _processOnEvents({type:'ontimeout'}); - _debugTS('onload', false); - if (_s.onerror instanceof Function) { - _s.onerror.apply(_win); - } - return false; - } else { - _debugTS('onload', true); - } - _event.add(_win, 'unload', _doNothing); // prevent browser from showing cached state via back button, because flash will be dead - if (_s.waitForWindowLoad && !_windowLoaded) { - _wDS('waitOnload'); - _event.add(_win, 'load', _initUserOnload); - return false; - } else { - if (_s.waitForWindowLoad && _windowLoaded) { - _wDS('docLoaded'); - } - _initUserOnload(); - } - return true; - }; - - _addOnEvent = function(sType, oMethod, oScope) { - if (typeof _on_queue[sType] === 'undefined') { - _on_queue[sType] = []; - } - _on_queue[sType].push({ - 'method': oMethod, - 'scope': (oScope || null), - 'fired': false - }); - }; - - _processOnEvents = function(oOptions) { - if (!oOptions) { // assume onready, if unspecified - oOptions = { - type: 'onready' - }; - } - if (!_didInit && oOptions && !oOptions.ignoreInit) { - // not ready yet. - return false; - } - var status = { - success: (oOptions && oOptions.ignoreInit?_s.ok():!_disabled) - }, - srcQueue = (oOptions && oOptions.type?_on_queue[oOptions.type]||[]:[]), // queue specified by type, or none - queue = [], i, j, - canRetry = (_needsFlash && _s.useFlashBlock && !_s.ok()); - for (i = 0; i < srcQueue.length; i++) { - if (srcQueue[i].fired !== true) { - queue.push(srcQueue[i]); - } - } - if (queue.length) { - _s._wD(_sm + ': Firing ' + queue.length + ' '+oOptions.type+'() item' + (queue.length === 1?'':'s')); - for (i = 0, j = queue.length; i < j; i++) { - if (queue[i].scope) { - queue[i].method.apply(queue[i].scope, [status]); - } else { - queue[i].method(status); - } - if (!canRetry) { // flashblock case doesn't count here - queue[i].fired = true; - } - } - } - return true; - }; - - _initUserOnload = function() { - _win.setTimeout(function() { - if (_s.useFlashBlock) { - _flashBlockHandler(); - } - _processOnEvents(); - // call user-defined "onload", scoped to window - if (_s.onload instanceof Function) { - _wDS('onload', 1); - _s.onload.apply(_win); - _wDS('onloadOK', 1); - } - if (_s.waitForWindowLoad) { - _event.add(_win, 'load', _initUserOnload); - } - },1); - }; - - _detectFlash = function() { - - // hat tip: Flash Detect library (BSD, (C) 2007) by Carl "DocYes" S. Yestrau - http://featureblend.com/javascript-flash-detection-library.html / http://featureblend.com/license.txt - - if (_hasFlash !== undefined) { - // this work has already been done. - return _hasFlash; - } - - var hasPlugin = false, n = navigator, nP = n.plugins, obj, type, types, AX = _win.ActiveXObject; - - if (nP && nP.length) { - - type = 'application/x-shockwave-flash'; - types = n.mimeTypes; - if (types && types[type] && types[type].enabledPlugin && types[type].enabledPlugin.description) { - hasPlugin = true; - } - - } else if (typeof AX !== 'undefined') { - - try { - obj = new AX('ShockwaveFlash.ShockwaveFlash'); - } catch(e) { - // oh well - } - hasPlugin = (!!obj); - - } - - _hasFlash = hasPlugin; - - return hasPlugin; - - }; - - _featureCheck = function() { - var needsFlash, item, - isSpecial = (_ua.match(/iphone os (1|2|3_0|3_1)/i)?true:false); // iPhone <= 3.1 has broken HTML5 audio(), but firmware 3.2 (iPad) + iOS4 works. - if (isSpecial) { - _s.hasHTML5 = false; // has Audio(), but is broken; let it load links directly. - _html5Only = true; // ignore flash case, however - if (_s.oMC) { - _s.oMC.style.display = 'none'; - } - return false; - } - if (_s.useHTML5Audio) { - if (!_s.html5 || !_s.html5.canPlayType) { - _s._wD('SoundManager: No HTML5 Audio() support detected.'); - _s.hasHTML5 = false; - return true; - } else { - _s.hasHTML5 = true; - } - if (_isBadSafari) { - _s._wD(_smc+'Note: Buggy HTML5 Audio in Safari on this OS X release, see https://bugs.webkit.org/show_bug.cgi?id=32159 - '+(!_hasFlash?' would use flash fallback for MP3/MP4, but none detected.':'will use flash fallback for MP3/MP4, if available'),1); - if (_detectFlash()) { - return true; - } - } - } else { - // flash required. - return true; - } - for (item in _s.audioFormats) { - if (_s.audioFormats.hasOwnProperty(item) && _s.audioFormats[item].required && !_s.html5.canPlayType(_s.audioFormats[item].type)) { - // may need flash for this format? - needsFlash = true; - } - } - // sanity check.. - if (_s.ignoreFlash) { - needsFlash = false; - } - _html5Only = (_s.useHTML5Audio && _s.hasHTML5 && !needsFlash && !_s.requireFlash); - return (_detectFlash() && needsFlash); - }; - - _init = function() { - var item, tests = []; - _wDS('init'); - - // called after onload() - if (_didInit) { - _wDS('didInit'); - return false; - } - - function _cleanup() { - _event.remove(_win, 'load', _s.beginDelayedInit); - } - - if (_s.hasHTML5) { - for (item in _s.audioFormats) { - if (_s.audioFormats.hasOwnProperty(item)) { - tests.push(item+': '+_s.html5[item]); - } - } - _s._wD('-- SoundManager 2: HTML5 support tests ('+_s.html5Test+'): '+tests.join(', ')+' --',1); - } - - if (_html5Only) { - if (!_didInit) { - // we don't need no steenking flash! - _cleanup(); - _s.enabled = true; - _initComplete(); - } - return true; - } - - // flash path - _initMovie(); - try { - _wDS('flashJS'); - _s.o._externalInterfaceTest(false); // attempt to talk to Flash - if (!_s.allowPolling) { - _wDS('noPolling', 1); - } else { - _setPolling(true, _s.flashPollingInterval ? _s.flashPollingInterval : (_s.useFastPolling ? 10 : 50)); - } - if (!_s.debugMode) { - _s.o._disableDebug(); - } - _s.enabled = true; - _debugTS('jstoflash', true); - } catch(e) { - _s._wD('js/flash exception: ' + e.toString()); - _debugTS('jstoflash', false); - _failSafely(true); // don't disable, for reboot() - _initComplete(); - return false; - } - _initComplete(); - // event cleanup - _cleanup(); - return true; - }; - - _beginInit = function() { - if (_initPending) { - return false; - } - _createMovie(); - _initMovie(); - _initPending = true; - return true; - }; - - _dcLoaded = function() { - if (_didDCLoaded) { - return false; - } - _didDCLoaded = true; - _initDebug(); - if (!_s.useHTML5Audio) { - if (!_detectFlash()) { - _s._wD('SoundManager: No Flash detected, trying HTML5'); - _s.useHTML5Audio = true; - } - } - _testHTML5(); - _s.html5.usingFlash = _featureCheck(); - _needsFlash = _s.html5.usingFlash; - _didDCLoaded = true; - if (_doc.removeEventListener) { - _doc.removeEventListener('DOMContentLoaded', _dcLoaded, false); - } - _go(); - return true; - }; - - _startTimer = function(oSound) { - if (!oSound._hasTimer) { - oSound._hasTimer = true; - } - }; - - _stopTimer = function(oSound) { - if (oSound._hasTimer) { - oSound._hasTimer = false; - } - }; - - _die = function() { - if (_s.onerror instanceof Function) { - _s.onerror(); - } - _s.disable(); - }; - - _badSafariFix = function() { - // special case: "bad" Safari can fall back to flash for MP3/MP4 - if (!_isBadSafari || !_detectFlash()) { - return false; // doesn't apply - } - var aF = _s.audioFormats, i, item; - for (item in aF) { - if (aF.hasOwnProperty(item)) { - // special case: "bad" Safari can fall back to flash for MP3/MP4 - if (item === 'mp3' || item === 'mp4') { - _s._wD(_sm+': Using flash fallback for '+item+' format'); - _s.html5[item] = false; - // assign result to related formats, too - if (aF[item] && aF[item].related) { - for (i = aF[item].related.length; i--;) { - _s.html5[aF[item].related[i]] = false; - } - } - } - } - } - }; - - // pseudo-private methods called by Flash - - this._setSandboxType = function(sandboxType) { - // - var sb = _s.sandbox; - sb.type = sandboxType; - sb.description = sb.types[(typeof sb.types[sandboxType] !== 'undefined'?sandboxType:'unknown')]; - _s._wD('Flash security sandbox type: ' + sb.type); - if (sb.type === 'localWithFile') { - sb.noRemote = true; - sb.noLocal = false; - _wDS('secNote', 2); - } else if (sb.type === 'localWithNetwork') { - sb.noRemote = false; - sb.noLocal = true; - } else if (sb.type === 'localTrusted') { - sb.noRemote = false; - sb.noLocal = false; - } - // - }; - - this._externalInterfaceOK = function(flashDate) { - // flash callback confirming flash loaded, EI working etc. - // flashDate = approx. timing/delay info for JS/flash bridge - if (_s.swfLoaded) { - return false; - } - var eiTime = new Date().getTime(); - _s._wD(_smc+'externalInterfaceOK()' + (flashDate?' (~' + (eiTime - flashDate) + ' ms)':'')); - _debugTS('swf', true); - _debugTS('flashtojs', true); - _s.swfLoaded = true; - _tryInitOnFocus = false; - if (_isBadSafari) { - _badSafariFix(); - } - if (_isIE) { - // IE needs a timeout OR delay until window.onload - may need TODO: investigating - setTimeout(_init, 100); - } else { - _init(); - } - }; - - _dcIE = function() { - if (_doc.readyState === 'complete') { - _dcLoaded(); - _doc.detachEvent('onreadystatechange', _dcIE); - } - return true; - }; - - // focus and window load, init - if (!_s.hasHTML5 || _needsFlash) { - // only applies to Flash mode - _event.add(_win, 'focus', _handleFocus); - _event.add(_win, 'load', _handleFocus); - _event.add(_win, 'load', _delayWaitForEI); - if (_isSafari && _tryInitOnFocus) { - _event.add(_win, 'mousemove', _handleFocus); // massive Safari focus hack - } - } - - if (_doc.addEventListener) { - _doc.addEventListener('DOMContentLoaded', _dcLoaded, false); - } else if (_doc.attachEvent) { - _doc.attachEvent('onreadystatechange', _dcIE); - } else { - // no add/attachevent support - safe to assume no JS -> Flash either - _debugTS('onload', false); - _die(); - } - - if (_doc.readyState === 'complete') { - setTimeout(_dcLoaded,100); - } - -} // SoundManager() - -// SM2_DEFER details: http://www.schillmania.com/projects/soundmanager2/doc/getstarted/#lazy-loading -if (typeof SM2_DEFER === 'undefined' || !SM2_DEFER) { - soundManager = new SoundManager(); -} - -// public interfaces -window.SoundManager = SoundManager; // constructor -window.soundManager = soundManager; // public API, flash callbacks etc - -}(window)); diff --git a/timeside/ui/swf/soundmanager2.swf b/timeside/ui/swf/soundmanager2.swf deleted file mode 100755 index 6f9c0560193b5670ee0c2af7c28cf9cad13ef496..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2867 zcmV-33(WLGS5pXb8UO%z+O%2CZyU!Ie_Srfm1W7PoPR9rjWmxHI!U=e^&1Gb29%xC8*d1$Z+BE5_F$M)Yq@^iapB%v@#AYwaqh|oA6&UQcNH!z zSLbHeTqoSOug}1HP(27E)qzkodOx0UDAUDbrT z6RNw_72k^j-*r_0;ecsPE!V$PjR=ZN3Ssagq!6NZ2id!*qV2WrXx&X!@AW6`X4UbU zb^pn>3PaQm4X4-IkJg+Bw^j>$KN10`Mnnx8j;pr)rUK8e(ipeXZh5e~1>~)I5^XDQ zI8rv)gR~6_M!e5PFO2*SErrnSh5OJU={*YGDqF3glnOk@-9QDwp3_jfDvTf$pLY+s z3TOehXG_R0zuSs#*mtYNVi5w>@goJUkB;sJXbLSZ)Ptpk`V#MN-mdDT*jk~jg1`^v z?R7u0r(ybiTRrJwBvsR%7G=}6AK24_8mEh-a=F=TM{OS+wc|wFT@`fNVTh}t?J3j| z`F35|t-!&(G+C^wl)d2C`+?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q*`ss7XWp#b7vQS-}TP}j%HoYDH k$mLJ4%$J172OnEQJr!0Eg~o;g@IL?m0RR630EEd&xSO(M5dZ)H diff --git a/timeside/ui/swf/soundmanager2_flash9.swf b/timeside/ui/swf/soundmanager2_flash9.swf deleted file mode 100755 index bf986d6a01c31ef7c67863841b13a643373d67b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8606 zcmV;PAz|J_S5pdnKmY)E+P!;ucpOKSc)jYGsp+1PG&8d0Lv|u3isU$BNw#wklQ^~| z%eG>BY)f$*CyLZF)9smf4l##p!vc_9*e)IWN*QucDbfgHKr5QQcki=r+TfN zmA49&a__31RmdovT5A_ed9$+4oS4XEQzo(NJ+!i%DW(n_G$*Z+BhHaWOx+hi4_fC|G>1qnsWFsp%xN!)v zn5ZUm*>c7zt*aIe6p9Dc6!li3NtGl1GcF4XOF4t&Qa6c2J zj@4`89jp6Rty0UN)~kBwNZW0}16;=jB0trxV*Pw(W@ewE;Ry#2eDM4_CVzYG8@sI+ zPkh=KE>;Wa?PdWdEUg~fFuaC+Vcr^~!cJzF%)GUVMOY8>uLg!}zQ~zxvY1T=hAX9P zVZYc|Eaoh;5SEA0V@=Wt`Zv)dkVxKQr7DYN^B>+WahfMKY^AEDY~}E#QmI%{V|G;Y zNvjmzny9yF*+Ruv#UgsfN}G3BmEnq6sg@;W%LY`%RDEQVT2wk)p2(Sp1H%(InI$Hz zQW<5{vS)SAl~S6;lp%;ky)#}1{7c{5uWbA^pt zcUxdZBx#ndq2c~wp;9X5a=89-!%D-dS4krvd&>R|rILAAk*SVyNG-Nn$>z$&KsH6^ zX_gNAE7`nN@{ds2Jb~PC=1m1NnX}U2w3V!SNK_6VXlM!Kie}nMH=&G6C=4}?K4IdK zZp)S{!Ms&24QHa%<>(#hhX?TSq( zWmflRDuZUl%o+8ygvZKOWka=6+=(Y(9Haw~?QLVo%PJMj+|~je4+|9w)F}@b{7Ry1TYl`Z#_^Hw@*`Xx(V&MQ6W&zO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