ng_player_hater-rails 0.0.4.2 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b3f3f182758827c45a5ccc11beafc51d6025555
4
- data.tar.gz: fea8b8fc51483bfc4517d12dd53baf45d1f72a73
3
+ metadata.gz: 49aa999aecd4a5f8d90b327d0dc4b9c3143138d4
4
+ data.tar.gz: 8b1eb8467f160c29dffc508c9ef32c27cdad983c
5
5
  SHA512:
6
- metadata.gz: 39d8cf441d3dd6e385ebb98328f01bb6ff36f804bf488993e097444753bd03d64ca6d0ee79eef7a814e0837ba95aaf5011fa46767e64d1c3815da8cf36df61b2
7
- data.tar.gz: d71896c80389086da699d21f9b4a3f22ceaf6fce556b28ef57c7621598f67dc45eea88107339744f4070f1d81621ffbf984767c2dd5f21b0d7294b8c0147ae83
6
+ metadata.gz: 2b0509fd49955098701362a9ecc8179b1f7003ebdd97595af7bb82e025393921e3f97e727f9409dbf4197b0b3415b37e755c405efa0e18fa609b5cf75a67da31
7
+ data.tar.gz: 65a2c8646b8d37a40f97bd9e047c4fc99bbb93cacf8dff5af45d14524721ebcd6cd7ed9bfc92822d4f2c4f22ecec232987a6b987aa96e355db242468511f2895
data/bower.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng_player_hater-rails",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "authors": [
5
5
  "chrisrhoden <carhoden@gmail.com>"
6
6
  ],
@@ -14,6 +14,6 @@
14
14
  "tests"
15
15
  ],
16
16
  "dependencies": {
17
- "ngPlayerHater": "~0.0.4"
17
+ "ngPlayerHater": "~0.0.5"
18
18
  }
19
19
  }
@@ -1,5 +1,5 @@
1
1
  module NgPlayerHater
2
2
  module Rails
3
- VERSION = "0.0.4.2"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  *
3
- * ngPlayerHater v0.0.4
3
+ * ngPlayerHater v0.0.5
4
4
  *
5
5
  * Copyright (c) 2013 Chris Rhoden, Public Radio Exchange. All Rights Reserved
6
6
  *
@@ -27,24 +27,26 @@
27
27
  "use strict";
28
28
  var soundManager, Sound, $scope;
29
29
  function Song(options) {
30
- var self = this;
31
30
  angular.forEach(options, function(value, key) {
32
31
  this[key] = value;
33
32
  }, this);
34
33
  this.paused = true;
35
- var sound = this._sound = new Sound(options.url);
34
+ this._sound = new Sound(options.url);
35
+ bindSound(this);
36
+ }
37
+ function bindSound(self) {
36
38
  $scope.$watch(function() {
37
- return sound.paused;
39
+ return self._sound.paused;
38
40
  }, function(paused) {
39
41
  self.paused = paused;
40
42
  });
41
43
  $scope.$watch(function() {
42
- return sound.position;
44
+ return self._sound.position;
43
45
  }, function(position) {
44
46
  self.position = position;
45
47
  });
46
48
  $scope.$watch(function() {
47
- return sound.duration;
49
+ return self._sound.duration;
48
50
  }, function(duration) {
49
51
  self.duration = duration;
50
52
  });
@@ -91,6 +93,31 @@
91
93
  PlayerHaterService.prototype.seekTo = function(position) {
92
94
  return this.nowPlaying.setPosition(position);
93
95
  };
96
+ PlayerHaterService.prototype.makeSongClass = function(klass) {
97
+ if ("undefined" === typeof klass) {
98
+ klass = function SongType() {
99
+ Song.apply(this, arguments);
100
+ };
101
+ klass.prototype = angular.copy(Song.prototype);
102
+ return klass;
103
+ }
104
+ if ("function" === typeof klass) {
105
+ var klasss = function SongType() {
106
+ klass.apply(this, arguments);
107
+ var self = this;
108
+ $scope.$watch(function() {
109
+ return self.url;
110
+ }, function(url) {
111
+ self._sound = "undefined" !== typeof url ? new Sound(url) : void 0;
112
+ });
113
+ bindSound(this);
114
+ };
115
+ angular.extend(klasss, klass);
116
+ angular.extend(klasss.prototype, klass.prototype);
117
+ angular.extend(klasss.prototype, Song.prototype);
118
+ return klasss;
119
+ }
120
+ };
94
121
  PlayerHaterService.$inject = [ "phSoundManager", "PlayerHaterSound", "$rootScope" ];
95
122
  angular.module("ngPlayerHater", [ "phSoundManager" ]).service("playerHater", PlayerHaterService);
96
123
  }();
@@ -1,2 +1,2 @@
1
1
  !function(a,b){function c(c,d){function e(a){return ib.preferFlash&&db&&!ib.ignoreFlash&&ib.flash[a]!==b&&ib.flash[a]}function f(a){return function(b){var c=this._s;return c&&c._a?a.call(this,b):null}}this.setupOptions={url:c||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,idPrefix:"sound"},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},opus:{type:["audio/ogg; codecs=opus","audio/opus"],required:!1},wav:{type:['audio/wav; codecs="1"',"audio/wav","audio/wave","audio/x-wav"],required:!1}},this.movieID="sm2-container",this.id=d||"sm2movie",this.debugID="soundmanager-debug",this.debugURLParam=/([#?&])debug=1/i,this.versionNumber="V2.97a.20130512",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={},this.html5={usingFlash:null},this.flash={},this.ignoreFlash=this.html5Only=!1;var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib=this,jb=null,kb=null,lb=navigator.userAgent,mb=""+a.location.href,nb=document,ob=[],pb=!1,qb=!1,rb=!1,sb=!1,tb=!1,ub=null,vb=null,wb=!1,xb=!1,yb=0,zb=null,Ab=[],Bb=null,Cb=Array.prototype.slice,Db=!1,Eb=0,Fb=lb.match(/(ipad|iphone|ipod)/i),Gb=lb.match(/android/i),Hb=lb.match(/msie/i),Ib=lb.match(/webkit/i),Jb=lb.match(/safari/i)&&!lb.match(/chrome/i),Kb=lb.match(/opera/i),Lb=lb.match(/firefox/i),Mb=lb.match(/(mobile|pre\/|xoom)/i)||Fb||Gb,Nb=!mb.match(/usehtml5audio/i)&&!mb.match(/sm2\-ignorebadua/i)&&Jb&&!lb.match(/silk/i)&&lb.match(/OS X 10_6_([3-7])/i),Ob=nb.hasFocus!==b?nb.hasFocus():null,Pb=Jb&&(nb.hasFocus===b||!nb.hasFocus()),Qb=!Pb,Rb=/(mp3|mp4|mpa|m4a|m4b)/i,Sb=nb.location?nb.location.protocol.match(/http/i):null,Tb=Sb?"":"http://",Ub=/^\s*audio\/(?:x-)?(?:mpeg4|aac|flv|mov|mp4||m4v|m4a|m4b|mp4v|3gp|3g2)\s*(?:$|;)/i,Vb="mpeg4 aac flv mov mp4 m4v f4v m4a m4b mp4v 3gp 3g2".split(" "),Wb=RegExp("\\.("+Vb.join("|")+")(\\?.*)?$","i");this.mimePattern=/^\s*audio\/(?:x-)?(?:mp(?:eg|3))\s*(?:$|;)/i,this.useAltURL=!Sb;var Xb;try{Xb=Audio!==b&&(Kb&&opera!==b&&10>opera.version()?new Audio(null):new Audio).canPlayType!==b}catch(Yb){Xb=!1}this.hasHTML5=Xb,this.setup=function(a){var c=!ib.url;return a!==b&&rb&&Bb&&ib.ok(),o(a),a&&(c&&C&&a.url!==b&&ib.beginDelayedInit(),!C&&a.url!==b&&"complete"===nb.readyState&&setTimeout(A,1)),ib},this.supported=this.ok=function(){return Bb?rb&&!sb:ib.useHTML5Audio&&ib.hasHTML5},this.getMovie=function(b){return h(b)||nb[b]||a[b]},this.createSound=function(a,c){function d(){return e=O(e),ib.sounds[e.id]=new g(e),ib.soundIDs.push(e.id),ib.sounds[e.id]}var e,f=null;if(!rb||!ib.ok())return!1;if(c!==b&&(a={id:a,url:c}),e=n(a),e.url=U(e.url),void 0===e.id&&(e.id=ib.setupOptions.idPrefix+Eb++),Q(e.id,!0))return ib.sounds[e.id];if(X(e))f=d(),f._setup_html5(e);else{if(ib.html5Only||ib.html5.usingFlash&&e.url&&e.url.match(/data\:/i))return d();l>8&&null===e.isMovieStar&&(e.isMovieStar=!!(e.serverURL||e.type&&e.type.match(Ub)||e.url&&e.url.match(Wb))),e=P(e,void 0),f=d(),8===l?kb._createSound(e.id,e.loops||1,e.usePolicyFile):(kb._createSound(e.id,e.url,e.usePeakData,e.useWaveformData,e.useEQData,e.isMovieStar,e.isMovieStar?e.bufferTime:!1,e.loops||1,e.serverURL,e.duration||null,e.autoPlay,!0,e.autoLoad,e.usePolicyFile),e.serverURL||(f.connected=!0,e.onconnect&&e.onconnect.apply(f))),!e.serverURL&&(e.autoLoad||e.autoPlay)&&f.load(e)}return!e.serverURL&&e.autoPlay&&f.play(),f},this.destroySound=function(a,b){if(!Q(a))return!1;var c,d=ib.sounds[a];for(d._iO={},d.stop(),d.unload(),c=0;c<ib.soundIDs.length;c++)if(ib.soundIDs[c]===a){ib.soundIDs.splice(c,1);break}return b||d.destruct(!0),delete ib.sounds[a],!0},this.load=function(a,b){return Q(a)?ib.sounds[a].load(b):!1},this.unload=function(a){return Q(a)?ib.sounds[a].unload():!1},this.onposition=this.onPosition=function(a,b,c,d){return Q(a)?ib.sounds[a].onposition(b,c,d):!1},this.clearOnPosition=function(a,b,c){return Q(a)?ib.sounds[a].clearOnPosition(b,c):!1},this.start=this.play=function(a,b){var c=null,d=b&&!(b instanceof Object);if(!rb||!ib.ok())return!1;if(Q(a,d))d&&(b={url:b});else{if(!d)return!1;d&&(b={url:b}),b&&b.url&&(b.id=a,c=ib.createSound(b).play())}return null===c&&(c=ib.sounds[a].play(b)),c},this.setPosition=function(a,b){return Q(a)?ib.sounds[a].setPosition(b):!1},this.stop=function(a){return Q(a)?ib.sounds[a].stop():!1},this.stopAll=function(){for(var a in ib.sounds)ib.sounds.hasOwnProperty(a)&&ib.sounds[a].stop()},this.pause=function(a){return Q(a)?ib.sounds[a].pause():!1},this.pauseAll=function(){var a;for(a=ib.soundIDs.length-1;a>=0;a--)ib.sounds[ib.soundIDs[a]].pause()},this.resume=function(a){return Q(a)?ib.sounds[a].resume():!1},this.resumeAll=function(){var a;for(a=ib.soundIDs.length-1;a>=0;a--)ib.sounds[ib.soundIDs[a]].resume()},this.togglePause=function(a){return Q(a)?ib.sounds[a].togglePause():!1},this.setPan=function(a,b){return Q(a)?ib.sounds[a].setPan(b):!1},this.setVolume=function(a,b){return Q(a)?ib.sounds[a].setVolume(b):!1},this.mute=function(a){var b=0;if(a instanceof String&&(a=null),a)return Q(a)?ib.sounds[a].mute():!1;for(b=ib.soundIDs.length-1;b>=0;b--)ib.sounds[ib.soundIDs[b]].mute();return ib.muted=!0},this.muteAll=function(){ib.mute()},this.unmute=function(a){if(a instanceof String&&(a=null),a)return Q(a)?ib.sounds[a].unmute():!1;for(a=ib.soundIDs.length-1;a>=0;a--)ib.sounds[ib.soundIDs[a]].unmute();return ib.muted=!1,!0},this.unmuteAll=function(){ib.unmute()},this.toggleMute=function(a){return Q(a)?ib.sounds[a].toggleMute():!1},this.getMemoryUse=function(){var a=0;return kb&&8!==l&&(a=parseInt(kb._getMemoryUse(),10)),a},this.disable=function(c){var d;if(c===b&&(c=!1),sb)return!1;for(sb=!0,d=ib.soundIDs.length-1;d>=0;d--)I(ib.sounds[ib.soundIDs[d]]);return m(c),bb.remove(a,"load",s),!0},this.canPlayMIME=function(a){var b;return ib.hasHTML5&&(b=Y({type:a})),!b&&Bb&&(b=a&&ib.ok()?!!(l>8&&a.match(Ub)||a.match(ib.mimePattern)):null),b},this.canPlayURL=function(a){var b;return ib.hasHTML5&&(b=Y({url:a})),!b&&Bb&&(b=a&&ib.ok()?!!a.match(ib.filePattern):null),b},this.canPlayLink=function(a){return a.type!==b&&a.type&&ib.canPlayMIME(a.type)?!0:ib.canPlayURL(a.href)},this.getSoundById=function(a){return a?ib.sounds[a]:null},this.onready=function(b,c){if("function"!=typeof b)throw L("needFunction","onready");return c||(c=a),q("onready",b,c),r(),!0},this.ontimeout=function(b,c){if("function"!=typeof b)throw L("needFunction","ontimeout");return c||(c=a),q("ontimeout",b,c),r({type:"ontimeout"}),!0},this._wD=this._writeDebug=function(){return!0},this._debug=function(){},this.reboot=function(b,c){var d,e,f;for(d=ib.soundIDs.length-1;d>=0;d--)ib.sounds[ib.soundIDs[d]].destruct();if(kb)try{Hb&&(vb=kb.innerHTML),ub=kb.parentNode.removeChild(kb)}catch(g){}if(vb=ub=Bb=kb=null,ib.enabled=C=rb=wb=xb=pb=qb=sb=Db=ib.swfLoaded=!1,ib.soundIDs=[],ib.sounds={},Eb=0,b)ob=[];else for(d in ob)if(ob.hasOwnProperty(d))for(e=0,f=ob[d].length;f>e;e++)ob[d][e].fired=!1;return ib.html5={usingFlash:null},ib.flash={},ib.html5Only=!1,ib.ignoreFlash=!1,a.setTimeout(function(){z(),c||ib.beginDelayedInit()},20),ib},this.reset=function(){return ib.reboot(!0,!0)},this.getMoviePercent=function(){return kb&&"PercentLoaded"in kb?kb.PercentLoaded():null},this.beginDelayedInit=function(){tb=!0,A(),setTimeout(function(){return xb?!1:(E(),y(),xb=!0)},20),t()},this.destruct=function(){ib.disable(!0)},g=function(a){var c,d,e,f,g,h,i,j,k,m,o,p=this,q=!1,r=[],s=0,t=null;d=c=null,this.sID=this.id=a.id,this.url=a.url,this._iO=this.instanceOptions=this.options=n(a),this.pan=this.options.pan,this.volume=this.options.volume,this.isHTML5=!1,this._a=null,o=this.url?!1:!0,this.id3={},this._debug=function(){},this.load=function(a){var c,d=null;if(a!==b?p._iO=n(a,p.options):(a=p.options,p._iO=a,t&&t!==p.url&&(p._iO.url=p.url,p.url=null)),p._iO.url||(p._iO.url=p.url),p._iO.url=U(p._iO.url),c=p.instanceOptions=p._iO,!c.url&&!p.url)return p;if(c.url===p.url&&0!==p.readyState&&2!==p.readyState)return 3===p.readyState&&c.onload&&hb(p,function(){c.onload.apply(p,[!!p.duration])}),p;if(p.loaded=!1,p.readyState=1,p.playState=0,p.id3={},X(c))d=p._setup_html5(c),d._called_load||(p._html5_canplay=!1,p.url!==c.url&&(p._a.src=c.url,p.setPosition(0)),p._a.autobuffer="auto",p._a.preload="auto",p._a._called_load=!0,c.autoPlay&&p.play());else{if(ib.html5Only||p._iO.url&&p._iO.url.match(/data\:/i))return p;try{p.isHTML5=!1,p._iO=P(O(c)),c=p._iO,8===l?kb._load(p.id,c.url,c.stream,c.autoPlay,c.usePolicyFile):kb._load(p.id,c.url,!!c.stream,!!c.autoPlay,c.loops||1,!!c.autoLoad,c.usePolicyFile)}catch(e){F({type:"SMSOUND_LOAD_JS_EXCEPTION",fatal:!0})}}return p.url=c.url,p},this.unload=function(){return 0!==p.readyState&&(p.isHTML5?(h(),p._a&&(p._a.pause(),t=$(p._a))):8===l?kb._unload(p.id,"about:blank"):kb._unload(p.id),e()),p},this.destruct=function(a){p.isHTML5?(h(),p._a&&(p._a.pause(),$(p._a),Db||g(),p._a._s=null,p._a=null)):(p._iO.onfailure=null,kb._destroySound(p.id)),a||ib.destroySound(p.id,!0)},this.start=this.play=function(a,c){var d,e,f,g,h;if(e=!0,e=null,c=c===b?!0:c,a||(a={}),p.url&&(p._iO.url=p.url),p._iO=n(p._iO,p.options),p._iO=n(a,p._iO),p._iO.url=U(p._iO.url),p.instanceOptions=p._iO,!p.isHTML5&&p._iO.serverURL&&!p.connected)return p.getAutoPlay()||p.setAutoPlay(!0),p;if(X(p._iO)&&(p._setup_html5(p._iO),i()),1===p.playState&&!p.paused&&(d=p._iO.multiShot,d||(p.isHTML5&&p.setPosition(p._iO.position),e=p)),null!==e)return e;if(a.url&&a.url!==p.url&&(p.readyState||p.isHTML5||8!==l||!o?p.load(p._iO):o=!1),p.loaded||(0===p.readyState?(p.isHTML5||ib.html5Only?p.isHTML5?p.load(p._iO):e=p:(p._iO.autoPlay=!0,p.load(p._iO)),p.instanceOptions=p._iO):2===p.readyState&&(e=p)),null!==e)return e;if(!p.isHTML5&&9===l&&0<p.position&&p.position===p.duration&&(a.position=0),p.paused&&0<=p.position&&(!p._iO.serverURL||0<p.position))p.resume();else{if(p._iO=n(a,p._iO),null!==p._iO.from&&null!==p._iO.to&&0===p.instanceCount&&0===p.playState&&!p._iO.serverURL){if(d=function(){p._iO=n(a,p._iO),p.play(p._iO)},p.isHTML5&&!p._html5_canplay?(p.load({oncanplay:d}),e=!1):p.isHTML5||p.loaded||p.readyState&&2===p.readyState||(p.load({onload:d}),e=!1),null!==e)return e;p._iO=m()}(!p.instanceCount||p._iO.multiShotEvents||p.isHTML5&&p._iO.multiShot&&!Db||!p.isHTML5&&l>8&&!p.getAutoPlay())&&p.instanceCount++,p._iO.onposition&&0===p.playState&&j(p),p.playState=1,p.paused=!1,p.position=p._iO.position===b||isNaN(p._iO.position)?0:p._iO.position,p.isHTML5||(p._iO=P(O(p._iO))),p._iO.onplay&&c&&(p._iO.onplay.apply(p),q=!0),p.setVolume(p._iO.volume,!0),p.setPan(p._iO.pan,!0),p.isHTML5?2>p.instanceCount?(i(),e=p._setup_html5(),p.setPosition(p._iO.position),e.play()):(f=new Audio(p._iO.url),g=function(){bb.remove(f,"onended",g),p._onfinish(p),$(f),f=null},h=function(){bb.remove(f,"canplay",h);try{f.currentTime=p._iO.position/1e3}catch(a){}f.play()},bb.add(f,"ended",g),p._iO.position?bb.add(f,"canplay",h):f.play()):(e=kb._start(p.id,p._iO.loops||1,9===l?p.position:p.position/1e3,p._iO.multiShot||!1),9===l&&!e&&p._iO.onplayerror&&p._iO.onplayerror.apply(p))}return p},this.stop=function(a){var b=p._iO;return 1===p.playState&&(p._onbufferchange(0),p._resetOnPosition(0),p.paused=!1,p.isHTML5||(p.playState=0),k(),b.to&&p.clearOnPosition(b.to),p.isHTML5?p._a&&(a=p.position,p.setPosition(0),p.position=a,p._a.pause(),p.playState=0,p._onTimer(),h()):(kb._stop(p.id,a),b.serverURL&&p.unload()),p.instanceCount=0,p._iO={},b.onstop&&b.onstop.apply(p)),p},this.setAutoPlay=function(a){p._iO.autoPlay=a,p.isHTML5||(kb._setAutoPlay(p.id,a),a&&!p.instanceCount&&1===p.readyState&&p.instanceCount++)},this.getAutoPlay=function(){return p._iO.autoPlay},this.setPosition=function(a){a===b&&(a=0);var c=p.isHTML5?Math.max(a,0):Math.min(p.duration||p._iO.duration,Math.max(a,0));if(p.position=c,a=p.position/1e3,p._resetOnPosition(p.position),p._iO.position=c,p.isHTML5){if(p._a){if(p._html5_canplay){if(p._a.currentTime!==a)try{p._a.currentTime=a,(0===p.playState||p.paused)&&p._a.pause()}catch(d){}}else if(a)return p;p.paused&&p._onTimer(!0)}}else a=9===l?p.position:a,p.readyState&&2!==p.readyState&&kb._setPosition(p.id,a,p.paused||!p.playState,p._iO.multiShot);return p},this.pause=function(a){return p.paused||0===p.playState&&1!==p.readyState?p:(p.paused=!0,p.isHTML5?(p._setup_html5().pause(),h()):(a||a===b)&&kb._pause(p.id,p._iO.multiShot),p._iO.onpause&&p._iO.onpause.apply(p),p)},this.resume=function(){var a=p._iO;return p.paused?(p.paused=!1,p.playState=1,p.isHTML5?(p._setup_html5().play(),i()):(a.isMovieStar&&!a.serverURL&&p.setPosition(p.position),kb._pause(p.id,a.multiShot)),!q&&a.onplay?(a.onplay.apply(p),q=!0):a.onresume&&a.onresume.apply(p),p):p},this.togglePause=function(){return 0===p.playState?(p.play({position:9!==l||p.isHTML5?p.position/1e3:p.position}),p):(p.paused?p.resume():p.pause(),p)},this.setPan=function(a,c){return a===b&&(a=0),c===b&&(c=!1),p.isHTML5||kb._setPan(p.id,a),p._iO.pan=a,c||(p.pan=a,p.options.pan=a),p},this.setVolume=function(a,c){return a===b&&(a=100),c===b&&(c=!1),p.isHTML5?p._a&&(p._a.volume=Math.max(0,Math.min(1,a/100))):kb._setVolume(p.id,ib.muted&&!p.muted||p.muted?0:a),p._iO.volume=a,c||(p.volume=a,p.options.volume=a),p},this.mute=function(){return p.muted=!0,p.isHTML5?p._a&&(p._a.muted=!0):kb._setVolume(p.id,0),p},this.unmute=function(){p.muted=!1;var a=p._iO.volume!==b;return p.isHTML5?p._a&&(p._a.muted=!1):kb._setVolume(p.id,a?p._iO.volume:p.options.volume),p},this.toggleMute=function(){return p.muted?p.unmute():p.mute()},this.onposition=this.onPosition=function(a,c,d){return r.push({position:parseInt(a,10),method:c,scope:d!==b?d:p,fired:!1}),p},this.clearOnPosition=function(a,b){var c;if(a=parseInt(a,10),isNaN(a))return!1;for(c=0;c<r.length;c++)a!==r[c].position||b&&b!==r[c].method||(r[c].fired&&s--,r.splice(c,1))},this._processOnPosition=function(){var a,b;if(a=r.length,!a||!p.playState||s>=a)return!1;for(a-=1;a>=0;a--)b=r[a],!b.fired&&p.position>=b.position&&(b.fired=!0,s++,b.method.apply(b.scope,[b.position]));return!0},this._resetOnPosition=function(a){var b,c;if(b=r.length,!b)return!1;for(b-=1;b>=0;b--)c=r[b],c.fired&&a<=c.position&&(c.fired=!1,s--);return!0},m=function(){var a,b,c=p._iO,d=c.from,e=c.to;return b=function(){p.clearOnPosition(e,b),p.stop()},a=function(){null===e||isNaN(e)||p.onPosition(e,b)},null!==d&&!isNaN(d)&&(c.position=d,c.multiShot=!1,a()),c},j=function(){var a,b=p._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&p.onPosition(parseInt(a,10),b[a])},k=function(){var a,b=p._iO.onposition;if(b)for(a in b)b.hasOwnProperty(a)&&p.clearOnPosition(parseInt(a,10))},i=function(){p.isHTML5&&R(p)},h=function(){p.isHTML5&&S(p)},e=function(a){a||(r=[],s=0),q=!1,p._hasTimer=null,p._a=null,p._html5_canplay=!1,p.bytesLoaded=null,p.bytesTotal=null,p.duration=p._iO&&p._iO.duration?p._iO.duration:null,p.durationEstimate=null,p.buffered=[],p.eqData=[],p.eqData.left=[],p.eqData.right=[],p.failures=0,p.isBuffering=!1,p.instanceOptions={},p.instanceCount=0,p.loaded=!1,p.metadata={},p.readyState=0,p.muted=!1,p.paused=!1,p.peakData={left:0,right:0},p.waveformData={left:[],right:[]},p.playState=0,p.position=null,p.id3={}},e(),this._onTimer=function(a){var b,e=!1,f={};return p._hasTimer||a?(p._a&&(a||(0<p.playState||1===p.readyState)&&!p.paused)&&(b=p._get_html5_duration(),b!==c&&(c=b,p.duration=b,e=!0),p.durationEstimate=p.duration,b=1e3*p._a.currentTime||0,b!==d&&(d=b,e=!0),(e||a)&&p._whileplaying(b,f,f,f,f)),e):void 0},this._get_html5_duration=function(){var a=p._iO;return(a=p._a&&p._a.duration?1e3*p._a.duration:a&&a.duration?a.duration:null)&&!isNaN(a)&&1/0!==a?a:null},this._apply_loop=function(a,b){a.loop=b>1?"loop":""},this._setup_html5=function(a){a=n(p._iO,a);var b,c=Db?jb:p._a,d=decodeURI(a.url);if(Db?d===decodeURI(cb)&&(b=!0):d===decodeURI(t)&&(b=!0),c){if(c._s)if(Db)c._s&&c._s.playState&&!b&&c._s.stop();else if(!Db&&d===decodeURI(t))return p._apply_loop(c,a.loops),c;b||(e(!1),c.src=a.url,cb=t=p.url=a.url,c._called_load=!1)}else p._a=a.autoLoad||a.autoPlay?new Audio(a.url):Kb&&10>opera.version()?new Audio(null):new Audio,c=p._a,c._called_load=!1,Db&&(jb=c);return p.isHTML5=!0,p._a=c,c._s=p,f(),p._apply_loop(c,a.loops),a.autoLoad||a.autoPlay?p.load():(c.autobuffer=!1,c.preload="auto"),c},f=function(){if(p._a._added_events)return!1;var a;p._a._added_events=!0;for(a in gb)gb.hasOwnProperty(a)&&p._a&&p._a.addEventListener(a,gb[a],!1);return!0},g=function(){var a;p._a._added_events=!1;for(a in gb)gb.hasOwnProperty(a)&&p._a&&p._a.removeEventListener(a,gb[a],!1)},this._onload=function(a){var b=!!a||!p.isHTML5&&8===l&&p.duration;return p.loaded=b,p.readyState=b?3:2,p._onbufferchange(0),p._iO.onload&&hb(p,function(){p._iO.onload.apply(p,[b])}),!0},this._onbufferchange=function(a){return 0===p.playState||a&&p.isBuffering||!a&&!p.isBuffering?!1:(p.isBuffering=1===a,p._iO.onbufferchange&&p._iO.onbufferchange.apply(p),!0)},this._onsuspend=function(){return p._iO.onsuspend&&p._iO.onsuspend.apply(p),!0},this._onfailure=function(a,b,c){p.failures++,p._iO.onfailure&&1===p.failures&&p._iO.onfailure(p,a,b,c)},this._onfinish=function(){var a=p._iO.onfinish;p._onbufferchange(0),p._resetOnPosition(0),p.instanceCount&&(p.instanceCount--,p.instanceCount||(k(),p.playState=0,p.paused=!1,p.instanceCount=0,p.instanceOptions={},p._iO={},h(),p.isHTML5&&(p.position=0)),(!p.instanceCount||p._iO.multiShotEvents)&&a&&hb(p,function(){a.apply(p)}))},this._whileloading=function(a,b,c,d){var e=p._iO;p.bytesLoaded=a,p.bytesTotal=b,p.duration=Math.floor(c),p.bufferLength=d,p.durationEstimate=p.isHTML5||e.isMovieStar?p.duration:e.duration?p.duration>e.duration?p.duration:e.duration:parseInt(p.bytesTotal/p.bytesLoaded*p.duration,10),p.isHTML5||(p.buffered=[{start:0,end:p.duration}]),(3!==p.readyState||p.isHTML5)&&e.whileloading&&e.whileloading.apply(p)},this._whileplaying=function(a,c,d,e,f){var g=p._iO;return isNaN(a)||null===a?!1:(p.position=Math.max(0,a),p._processOnPosition(),!p.isHTML5&&l>8&&(g.usePeakData&&c!==b&&c&&(p.peakData={left:c.leftPeak,right:c.rightPeak}),g.useWaveformData&&d!==b&&d&&(p.waveformData={left:d.split(","),right:e.split(",")}),g.useEQData&&f!==b&&f&&f.leftEQ&&(a=f.leftEQ.split(","),p.eqData=a,p.eqData.left=a,f.rightEQ!==b&&f.rightEQ&&(p.eqData.right=f.rightEQ.split(",")))),1===p.playState&&(!p.isHTML5&&8===l&&!p.position&&p.isBuffering&&p._onbufferchange(0),g.whileplaying&&g.whileplaying.apply(p)),!0)},this._oncaptiondata=function(a){p.captiondata=a,p._iO.oncaptiondata&&p._iO.oncaptiondata.apply(p,[a])},this._onmetadata=function(a,b){var c,d,e={};for(c=0,d=a.length;d>c;c++)e[a[c]]=b[c];p.metadata=e,p._iO.onmetadata&&p._iO.onmetadata.apply(p)},this._onid3=function(a,b){var c,d,e=[];for(c=0,d=a.length;d>c;c++)e[a[c]]=b[c];p.id3=n(p.id3,e),p._iO.onid3&&p._iO.onid3.apply(p)},this._onconnect=function(a){a=1===a,(p.connected=a)&&(p.failures=0,Q(p.id)&&(p.getAutoPlay()?p.play(b,p.getAutoPlay()):p._iO.autoLoad&&p.load()),p._iO.onconnect&&p._iO.onconnect.apply(p,[a]))},this._ondataerror=function(){0<p.playState&&p._iO.ondataerror&&p._iO.ondataerror.apply(p)}},D=function(){return nb.body||nb._docElement||nb.getElementsByTagName("div")[0]},h=function(a){return nb.getElementById(a)},n=function(a,c){var d,e,f=a||{};d=c===b?ib.defaultOptions:c;for(e in d)d.hasOwnProperty(e)&&f[e]===b&&(f[e]="object"!=typeof d[e]||null===d[e]?d[e]:n(f[e],d[e]));return f},hb=function(b,c){b.isHTML5||8!==l?c():a.setTimeout(c,0)},p={onready:1,ontimeout:1,defaultOptions:1,flash9Options:1,movieStarOptions:1},o=function(a,c){var d,e=!0,f=c!==b,g=ib.setupOptions;for(d in a)if(a.hasOwnProperty(d))if("object"!=typeof a[d]||null===a[d]||a[d]instanceof Array||a[d]instanceof RegExp)f&&p[c]!==b?ib[c][d]=a[d]:g[d]!==b?(ib.setupOptions[d]=a[d],ib[d]=a[d]):p[d]===b?e=!1:ib[d]instanceof Function?ib[d].apply(ib,a[d]instanceof Array?a[d]:[a[d]]):ib[d]=a[d];else{if(p[d]!==b)return o(a[d],d);e=!1}return e},bb=function(){function b(a){a=Cb.call(a);var b=a.length;return d?(a[1]="on"+a[1],b>3&&a.pop()):3===b&&a.push(!1),a}function c(a,b){var c=a.shift(),f=[e[b]];d?c[f](a[0],a[1]):c[f].apply(c,a)}var d=a.attachEvent,e={add:d?"attachEvent":"addEventListener",remove:d?"detachEvent":"removeEventListener"};return{add:function(){c(b(arguments),"add")},remove:function(){c(b(arguments),"remove")}}}(),gb={abort:f(function(){}),canplay:f(function(){var a,c=this._s;if(c._html5_canplay)return!0;if(c._html5_canplay=!0,c._onbufferchange(0),a=c._iO.position===b||isNaN(c._iO.position)?null:c._iO.position/1e3,c.position&&this.currentTime!==a)try{this.currentTime=a}catch(d){}c._iO._oncanplay&&c._iO._oncanplay()}),canplaythrough:f(function(){var a=this._s;a.loaded||(a._onbufferchange(0),a._whileloading(a.bytesLoaded,a.bytesTotal,a._get_html5_duration()),a._onload(!0))}),ended:f(function(){this._s._onfinish()}),error:f(function(){this._s._onload(!1)}),loadeddata:f(function(){var a=this._s;!a._loaded&&!Jb&&(a.duration=a._get_html5_duration())}),loadedmetadata:f(function(){}),loadstart:f(function(){this._s._onbufferchange(1)}),play:f(function(){this._s._onbufferchange(0)}),playing:f(function(){this._s._onbufferchange(0)}),progress:f(function(a){var b,c,d=this._s,e=0,e=a.target.buffered;b=a.loaded||0;var f=a.total||1;if(d.buffered=[],e&&e.length){for(b=0,c=e.length;c>b;b++)d.buffered.push({start:1e3*e.start(b),end:1e3*e.end(b)});e=1e3*(e.end(0)-e.start(0)),b=Math.min(1,e/(1e3*a.target.duration))}isNaN(b)||(d._onbufferchange(0),d._whileloading(b,f,d._get_html5_duration()),b&&f&&b===f&&gb.canplaythrough.call(this,a))}),ratechange:f(function(){}),suspend:f(function(a){var b=this._s;gb.progress.call(this,a),b._onsuspend()}),stalled:f(function(){}),timeupdate:f(function(){this._s._onTimer()}),waiting:f(function(){this._s._onbufferchange(1)})},X=function(a){return a&&(a.type||a.url||a.serverURL)?a.serverURL||a.type&&e(a.type)?!1:a.type?Y({type:a.type}):Y({url:a.url})||ib.html5Only||a.url.match(/data\:/i):!1},$=function(a){var b;return a&&(b=Jb&&!Fb?null:Lb?"about:blank":null,a.src=b,void 0!==a._called_unload&&(a._called_load=!1)),Db&&(cb=null),b},Y=function(a){if(!ib.useHTML5Audio||!ib.hasHTML5)return!1;var c=a.url||null;a=a.type||null;var d,f=ib.audioFormats;if(a&&ib.html5[a]!==b)return ib.html5[a]&&!e(a);if(!Z){Z=[];for(d in f)f.hasOwnProperty(d)&&(Z.push(d),f[d].related&&(Z=Z.concat(f[d].related)));Z=RegExp("\\.("+Z.join("|")+")(\\?.*)?$","i")}return d=c?c.toLowerCase().match(Z):null,d&&d.length?d=d[1]:a&&(c=a.indexOf(";"),d=(-1!==c?a.substr(0,c):a).substr(6)),d&&ib.html5[d]!==b?c=ib.html5[d]&&!e(d):(a="audio/"+d,c=ib.html5.canPlayType({type:a}),c=(ib.html5[d]=c)&&ib.html5[a]&&!e(a)),c},ab=function(){function a(a){var b,c,d=b=!1;if(!f||"function"!=typeof f.canPlayType)return b;if(a instanceof Array){for(b=0,c=a.length;c>b;b++)(ib.html5[a[b]]||f.canPlayType(a[b]).match(ib.html5Test))&&(d=!0,ib.html5[a[b]]=!0,ib.flash[a[b]]=!!a[b].match(Rb));b=d}else a=f&&"function"==typeof f.canPlayType?f.canPlayType(a):!1,b=!(!a||!a.match(ib.html5Test));return b}if(!ib.useHTML5Audio||!ib.hasHTML5)return Bb=ib.html5.usingFlash=!0,!1;var c,d,e,f=Audio!==b?Kb&&10>opera.version()?new Audio(null):new Audio:null,g={};e=ib.audioFormats;for(c in e)if(e.hasOwnProperty(c)&&(d="audio/"+c,g[c]=a(e[c].type),g[d]=g[c],c.match(Rb)?(ib.flash[c]=!0,ib.flash[d]=!0):(ib.flash[c]=!1,ib.flash[d]=!1),e[c]&&e[c].related))for(d=e[c].related.length-1;d>=0;d--)g["audio/"+e[c].related[d]]=g[c],ib.html5[e[c].related[d]]=g[c],ib.flash[e[c].related[d]]=g[c];return g.canPlayType=f?a:null,ib.html5=n(ib.html5,g),ib.html5.usingFlash=W(),Bb=ib.html5.usingFlash,!0},x={},L=function(){},O=function(a){return 8===l&&1<a.loops&&a.stream&&(a.stream=!1),a},P=function(a){return a&&!a.usePolicyFile&&(a.onid3||a.usePeakData||a.useWaveformData||a.useEQData)&&(a.usePolicyFile=!0),a},i=function(){return!1},I=function(a){for(var b in a)a.hasOwnProperty(b)&&"function"==typeof a[b]&&(a[b]=i)},J=function(a){a===b&&(a=!1),(sb||a)&&ib.disable(a)},K=function(a){var b=null;if(a)if(a.match(/\.swf(\?.*)?$/i)){if(b=a.substr(a.toLowerCase().lastIndexOf(".swf?")+4))return a}else a.lastIndexOf("/")!==a.length-1&&(a+="/");return a=(a&&-1!==a.lastIndexOf("/")?a.substr(0,a.lastIndexOf("/")+1):"./")+ib.movieURL,ib.noSWFCache&&(a+="?ts="+(new Date).getTime()),a},v=function(){l=parseInt(ib.flashVersion,10),8!==l&&9!==l&&(ib.flashVersion=l=8);var a=ib.debugMode||ib.debugFlash?"_debug.swf":".swf";ib.useHTML5Audio&&!ib.html5Only&&ib.audioFormats.mp4.required&&9>l&&(ib.flashVersion=l=9),ib.version=ib.versionNumber+(ib.html5Only?" (HTML5-only mode)":9===l?" (AS3/Flash 9)":" (AS2/Flash 8)"),l>8?(ib.defaultOptions=n(ib.defaultOptions,ib.flash9Options),ib.features.buffering=!0,ib.defaultOptions=n(ib.defaultOptions,ib.movieStarOptions),ib.filePatterns.flash9=RegExp("\\.(mp3|"+Vb.join("|")+")(\\?.*)?$","i"),ib.features.movieStar=!0):ib.features.movieStar=!1,ib.filePattern=ib.filePatterns[8!==l?"flash9":"flash8"],ib.movieURL=(8===l?"soundmanager2.swf":"soundmanager2_flash9.swf").replace(".swf",a),ib.features.peakData=ib.features.waveformData=ib.features.eqData=l>8},G=function(a,b){return kb?(kb._setPolling(a,b),void 0):!1},H=function(){},Q=this.getSoundById,N=function(){var a=[];return ib.debugMode&&a.push("sm2_debug"),ib.debugFlash&&a.push("flash_debug"),ib.useHighPerformance&&a.push("high_performance"),a.join(" ")},M=function(){L("fbHandler");var a=ib.getMoviePercent(),b={type:"FLASHBLOCK"};return ib.html5Only?!1:(ib.ok()?ib.oMC&&(ib.oMC.className=[N(),"movieContainer","swf_loaded"+(ib.didFlashBlock?" swf_unblocked":"")].join(" ")):(Bb&&(ib.oMC.className=N()+" movieContainer "+(null===a?"swf_timedout":"swf_error")),ib.didFlashBlock=!0,r({type:"ontimeout",ignoreInit:!0,error:b}),F(b)),void 0)},q=function(a,c,d){ob[a]===b&&(ob[a]=[]),ob[a].push({method:c,scope:d||null,fired:!1})},r=function(a){if(a||(a={type:ib.ok()?"onready":"ontimeout"}),!rb&&a&&!a.ignoreInit||"ontimeout"===a.type&&(ib.ok()||sb&&!a.ignoreInit))return!1;var b,c={success:a&&a.ignoreInit?ib.ok():!sb},d=a&&a.type?ob[a.type]||[]:[],e=[],c=[c],f=Bb&&!ib.ok();for(a.error&&(c[0].error=a.error),a=0,b=d.length;b>a;a++)!0!==d[a].fired&&e.push(d[a]);if(e.length)for(a=0,b=e.length;b>a;a++)e[a].scope?e[a].method.apply(e[a].scope,c):e[a].method.apply(this,c),f||(e[a].fired=!0);return!0},s=function(){a.setTimeout(function(){ib.useFlashBlock&&M(),r(),"function"==typeof ib.onload&&ib.onload.apply(a),ib.waitForWindowLoad&&bb.add(a,"load",s)},1)},eb=function(){if(db!==b)return db;var c,d=!1,e=navigator,f=e.plugins,g=a.ActiveXObject;if(f&&f.length)(e=e.mimeTypes)&&e["application/x-shockwave-flash"]&&e["application/x-shockwave-flash"].enabledPlugin&&e["application/x-shockwave-flash"].enabledPlugin.description&&(d=!0);else if(g!==b&&!lb.match(/MSAppHost/i)){try{c=new g("ShockwaveFlash.ShockwaveFlash")}catch(h){c=null}d=!!c}return db=d},W=function(){var a,b,c=ib.audioFormats;if(Fb&&lb.match(/os (1|2|3_0|3_1)/i)?(ib.hasHTML5=!1,ib.html5Only=!0,ib.oMC&&(ib.oMC.style.display="none")):!ib.useHTML5Audio||ib.html5&&ib.html5.canPlayType||(ib.hasHTML5=!1),ib.useHTML5Audio&&ib.hasHTML5)for(b in V=!0,c)c.hasOwnProperty(b)&&c[b].required&&(ib.html5.canPlayType(c[b].type)?ib.preferFlash&&(ib.flash[b]||ib.flash[c[b].type])&&(a=!0):(V=!1,a=!0));return ib.ignoreFlash&&(a=!1,V=!0),ib.html5Only=ib.hasHTML5&&ib.useHTML5Audio&&!a,!ib.html5Only},U=function(a){var b,c,d=0;if(a instanceof Array){for(b=0,c=a.length;c>b;b++)if(a[b]instanceof Object){if(ib.canPlayMIME(a[b].type)){d=b;break}}else if(ib.canPlayURL(a[b])){d=b;break}a[d].url&&(a[d]=a[d].url),a=a[d]}return a},R=function(a){a._hasTimer||(a._hasTimer=!0,!Mb&&ib.html5PollingInterval&&(null===zb&&0===yb&&(zb=setInterval(T,ib.html5PollingInterval)),yb++))},S=function(a){a._hasTimer&&(a._hasTimer=!1,!Mb&&ib.html5PollingInterval&&yb--)},T=function(){var a;if(null!==zb&&!yb)return clearInterval(zb),zb=null,!1;for(a=ib.soundIDs.length-1;a>=0;a--)ib.sounds[ib.soundIDs[a]].isHTML5&&ib.sounds[ib.soundIDs[a]]._hasTimer&&ib.sounds[ib.soundIDs[a]]._onTimer()},F=function(c){c=c!==b?c:{},"function"==typeof ib.onerror&&ib.onerror.apply(a,[{type:c.type!==b?c.type:null}]),c.fatal!==b&&c.fatal&&ib.disable()},fb=function(){if(!Nb||!eb())return!1;var a,b,c=ib.audioFormats;for(b in c)if(c.hasOwnProperty(b)&&("mp3"===b||"mp4"===b)&&(ib.html5[b]=!1,c[b]&&c[b].related))for(a=c[b].related.length-1;a>=0;a--)ib.html5[c[b].related[a]]=!1},this._setSandboxType=function(){},this._externalInterfaceOK=function(){return ib.swfLoaded?!1:(ib.swfLoaded=!0,Pb=!1,Nb&&fb(),setTimeout(k,Hb?100:1),void 0)},E=function(a,c){function d(a,b){return'<param name="'+a+'" value="'+b+'" />'}if(pb&&qb)return!1;if(ib.html5Only)return v(),ib.oMC=h(ib.movieID),k(),qb=pb=!0,!1;var e,f,g,i=c||ib.url,j=ib.altURL||i,l=D(),m=N(),n=null,n=nb.getElementsByTagName("html")[0],n=n&&n.dir&&n.dir.match(/rtl/i);if(a=a===b?ib.id:a,v(),ib.url=K(Sb?i:j),c=ib.url,ib.wmode=!ib.wmode&&ib.useHighPerformance?"transparent":ib.wmode,null!==ib.wmode&&(lb.match(/msie 8/i)||!Hb&&!ib.useHighPerformance)&&navigator.platform.match(/win32|win64/i)&&(Ab.push(x.spcWmode),ib.wmode=null),l={name:a,id:a,src:c,quality:"high",allowScriptAccess:ib.allowScriptAccess,bgcolor:ib.bgColor,pluginspage:Tb+"www.macromedia.com/go/getflashplayer",title:"JS/Flash audio component (SoundManager 2)",type:"application/x-shockwave-flash",wmode:ib.wmode,hasPriority:"true"},ib.debugFlash&&(l.FlashVars="debug=1"),ib.wmode||delete l.wmode,Hb)i=nb.createElement("div"),f=['<object id="'+a+'" data="'+c+'" type="'+l.type+'" title="'+l.title+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+Tb+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">',d("movie",c),d("AllowScriptAccess",ib.allowScriptAccess),d("quality",l.quality),ib.wmode?d("wmode",ib.wmode):"",d("bgcolor",ib.bgColor),d("hasPriority","true"),ib.debugFlash?d("FlashVars",l.FlashVars):"","</object>"].join("");else for(e in i=nb.createElement("embed"),l)l.hasOwnProperty(e)&&i.setAttribute(e,l[e]);if(H(),m=N(),l=D())if(ib.oMC=h(ib.movieID)||nb.createElement("div"),ib.oMC.id)g=ib.oMC.className,ib.oMC.className=(g?g+" ":"movieContainer")+(m?" "+m:""),ib.oMC.appendChild(i),Hb&&(e=ib.oMC.appendChild(nb.createElement("div")),e.className="sm2-object-box",e.innerHTML=f),qb=!0;else{if(ib.oMC.id=ib.movieID,ib.oMC.className="movieContainer "+m,e=m=null,ib.useFlashBlock||(ib.useHighPerformance?m={position:"fixed",width:"8px",height:"8px",bottom:"0px",left:"0px",overflow:"hidden"}:(m={position:"absolute",width:"6px",height:"6px",top:"-9999px",left:"-9999px"},n&&(m.left=Math.abs(parseInt(m.left,10))+"px"))),Ib&&(ib.oMC.style.zIndex=1e4),!ib.debugFlash)for(g in m)m.hasOwnProperty(g)&&(ib.oMC.style[g]=m[g]);try{Hb||ib.oMC.appendChild(i),l.appendChild(ib.oMC),Hb&&(e=ib.oMC.appendChild(nb.createElement("div")),e.className="sm2-object-box",e.innerHTML=f),qb=!0
2
- }catch(o){throw Error(L("domError")+" \n"+(""+o))}}return pb=!0},y=function(){return ib.html5Only?(E(),!1):kb||!ib.url?!1:(kb=ib.getMovie(ib.id),kb||(ub?(Hb?ib.oMC.innerHTML=vb:ib.oMC.appendChild(ub),ub=null,pb=!0):E(ib.id,ib.url),kb=ib.getMovie(ib.id)),"function"==typeof ib.oninitmovie&&setTimeout(ib.oninitmovie,1),!0)},t=function(){setTimeout(u,1e3)},u=function(){var b,c=!1;return!ib.url||wb?!1:(wb=!0,bb.remove(a,"load",t),Pb&&!Ob?!1:(rb||(b=ib.getMoviePercent(),b>0&&100>b&&(c=!0)),setTimeout(function(){return b=ib.getMoviePercent(),c?(wb=!1,a.setTimeout(t,1),!1):(!rb&&Qb&&(null===b?ib.useFlashBlock||0===ib.flashLoadTimeout?ib.useFlashBlock&&M():!ib.useFlashBlock&&V?a.setTimeout(function(){ib.setup({preferFlash:!1}).reboot(),ib.didFlashBlock=!0,ib.beginDelayedInit()},1):r({type:"ontimeout",ignoreInit:!0}):0!==ib.flashLoadTimeout&&J(!0)),void 0)},ib.flashLoadTimeout),void 0))},w=function(){return Ob||!Pb?(bb.remove(a,"focus",w),!0):(Ob=Qb=!0,wb=!1,t(),bb.remove(a,"focus",w),!0)},m=function(b){if(rb)return!1;if(ib.html5Only)return rb=!0,s(),!0;var c,d=!0;return ib.useFlashBlock&&ib.flashLoadTimeout&&!ib.getMoviePercent()||(rb=!0,sb&&(c={type:!db&&Bb?"NO_FLASH":"INIT_TIMEOUT"})),(sb||b)&&(ib.useFlashBlock&&ib.oMC&&(ib.oMC.className=N()+" "+(null===ib.getMoviePercent()?"swf_timedout":"swf_error")),r({type:"ontimeout",error:c,ignoreInit:!0}),F(c),d=!1),sb||(ib.waitForWindowLoad&&!tb?bb.add(a,"load",s):s()),d},j=function(){var a,c=ib.setupOptions;for(a in c)c.hasOwnProperty(a)&&(ib[a]===b?ib[a]=c[a]:ib[a]!==c[a]&&(ib.setupOptions[a]=ib[a]))},k=function(){if(rb)return!1;if(ib.html5Only)return rb||(bb.remove(a,"load",ib.beginDelayedInit),ib.enabled=!0,m()),!0;y();try{kb._externalInterfaceTest(!1),G(!0,ib.flashPollingInterval||(ib.useHighPerformance?10:50)),ib.debugMode||kb._disableDebug(),ib.enabled=!0,ib.html5Only||bb.add(a,"unload",i)}catch(b){return F({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),J(!0),m(),!1}return m(),bb.remove(a,"load",ib.beginDelayedInit),!0},A=function(){return C?!1:(C=!0,j(),H(),!db&&ib.hasHTML5&&ib.setup({useHTML5Audio:!0,preferFlash:!1}),ab(),!db&&Bb&&(Ab.push(x.needFlash),ib.setup({flashLoadTimeout:1})),nb.removeEventListener&&nb.removeEventListener("DOMContentLoaded",A,!1),y(),!0)},_=function(){return"complete"===nb.readyState&&(A(),nb.detachEvent("onreadystatechange",_)),!0},B=function(){tb=!0,bb.remove(a,"load",B)},z=function(){Mb&&(ib.setupOptions.useHTML5Audio=!0,ib.setupOptions.preferFlash=!1,Fb||Gb&&!lb.match(/android\s2\.3/i))&&(Fb&&(ib.ignoreFlash=!0),Db=!0)},z(),eb(),bb.add(a,"focus",w),bb.add(a,"load",t),bb.add(a,"load",B),nb.addEventListener?nb.addEventListener("DOMContentLoaded",A,!1):nb.attachEvent?nb.attachEvent("onreadystatechange",_):F({type:"NO_DOM2_EVENTS",fatal:!0})}var d=null;void 0!==a.SM2_DEFER&&SM2_DEFER||(d=new c),a.SoundManager=c,a.soundManager=d}(window),function(){var a;!function(){"use strict";a={log:function(){},instrument:function(){}}}(),function(){"use strict";function a(a){var b=this;angular.forEach(a,function(a,b){this[b]=a},this),this.paused=!0;var c=this._sound=new e(a.url);f.$watch(function(){return c.paused},function(a){b.paused=a}),f.$watch(function(){return c.position},function(a){b.position=a}),f.$watch(function(){return c.duration},function(a){b.duration=a})}function b(a){return function(){return this._sound[a].apply(this._sound,Array.prototype.slice.call(arguments))}}function c(a,b,c){d=a,e=b,f=c;var g=this;this.paused=!0,f.$watch(function(){return(g.nowPlaying||{paused:!0}).paused},function(a){g.paused=a})}for(var d,e,f,g=["play","stop","resume","setPosition"],h=g.length-1;h>=0;h-=1)a.prototype[g[h]]=b(g[h]);c.prototype.play=function(b){return void 0===b?this.resume():(b.constructor!==a&&(b=this.newSong(b)),void 0!==this.nowPlaying&&this.nowPlaying.stop(),this.nowPlaying=b,this.nowPlaying.play(),this.nowPlaying)},c.prototype.resume=function(){if(void 0===this.nowPlaying)throw"No Song Loaded";this.nowPlaying.resume()},c.prototype.pause=function(){d.pauseAll()},c.prototype.newSong=function(b){return new a(b)},c.prototype.seekTo=function(a){return this.nowPlaying.setPosition(a)},c.$inject=["phSoundManager","PlayerHaterSound","$rootScope"],angular.module("ngPlayerHater",["phSoundManager"]).service("playerHater",c)}(),angular.module("phSoundManager",["phSoundManager.service","phSoundManager.sound"]),function(){"use strict";function a(a){return function(b){return function(){var c=Array.prototype.slice.call(arguments);return a.then(function(a){return a[b].apply(a,c)})}}}function b(b,d){function e(){d.$apply(function(){f.resolve(window.soundManager),"function"==typeof c.options.originalonready&&c.options.originalonready.call(null)})}var f=b.defer(),g=a(f.promise),h=c.options;return e._shim=!0,h.originalonready=void 0===h.onready||h.onready._shim?void 0:h.onready,h.onready=e,window.soundManager.setup(h),{createSound:g("createSound"),canPlayLink:g("canPlayLink"),canPlayMIME:g("canPlayMIME"),canPlayURL:g("canPlayURL"),mute:g("mute"),pauseAll:g("pauseAll"),resumeAll:g("resumeAll"),stopAll:g("stopAll"),unmute:g("unmute")}}var c={$get:b,options:{url:"/assets",flashVersion:9,preferFlash:!1,debugMode:!1}};b.$inject=["$q","$rootScope"],angular.module("phSoundManager.service",["ng"]).provider("phSoundManager",c)}(),function(){"use strict";function b(a,b){return j=a,k=b,f}function c(a){return function(){var b=this;k(function(){a.call(b)})}}function d(a,b){return Array.prototype.slice.call(a,b)}function e(b){return{onload:c(function(){a.instrument("onload",arguments),1===this.readyState?(b.loading=!0,b.error=!1):2===this.readyState?(b.error=!0,b.loading=!1):3===this.readyState&&(b.loading=!1,b.error=!1,b.duration=this.duration)}),onpause:c(function(){a.instrument("onpause",arguments),b.paused=!0,b.playing=!1}),onplay:c(function(){a.instrument("onplay",arguments),b.paused=!1}),onresume:c(function(){a.instrument("onresume",arguments),b.paused=!1}),onid3:c(function(){a.instrument("onid3",arguments),angular.copy(this.id3,b.id3)}),whileloading:c(function(){a.instrument("whileloading",arguments),b.duration=this.durationEstimate}),whileplaying:c(function(){a.instrument("whileplaying",arguments),b.position=this.position})}}function f(a){if(void 0===a)throw"URL parameter is required";var b=e(this);b.url=a,this.playing=!1,this.loading=!1,this.paused=!0,this.error=!1,this.duration=void 0,this.position=void 0,this.id3={},this.sound=j.createSound(b)}function g(a){return function(b){var c=d(arguments,1);return"string"==typeof a?b[a].apply(b,c):a.apply(b,c)}}function h(a,b){return function(){var c=d(arguments).concat(b);return a.apply(this,c)}}function i(a,b){return function(){var c=d(arguments);return this[a].then(h(b,c))}}var j,k;b.$inject=["phSoundManager","$timeout"];for(var l="destruct load mute pause play resume setPan setPosition setVolume stop toogleMute togglePause unload unmute".split(" "),m=l.length-1;m>=0;m-=1)f.prototype[l[m]]=i("sound",g(l[m]));angular.module("phSoundManager.sound",["phSoundManager.service"]).factory("PlayerHaterSound",b)}()}();
2
+ }catch(o){throw Error(L("domError")+" \n"+(""+o))}}return pb=!0},y=function(){return ib.html5Only?(E(),!1):kb||!ib.url?!1:(kb=ib.getMovie(ib.id),kb||(ub?(Hb?ib.oMC.innerHTML=vb:ib.oMC.appendChild(ub),ub=null,pb=!0):E(ib.id,ib.url),kb=ib.getMovie(ib.id)),"function"==typeof ib.oninitmovie&&setTimeout(ib.oninitmovie,1),!0)},t=function(){setTimeout(u,1e3)},u=function(){var b,c=!1;return!ib.url||wb?!1:(wb=!0,bb.remove(a,"load",t),Pb&&!Ob?!1:(rb||(b=ib.getMoviePercent(),b>0&&100>b&&(c=!0)),setTimeout(function(){return b=ib.getMoviePercent(),c?(wb=!1,a.setTimeout(t,1),!1):(!rb&&Qb&&(null===b?ib.useFlashBlock||0===ib.flashLoadTimeout?ib.useFlashBlock&&M():!ib.useFlashBlock&&V?a.setTimeout(function(){ib.setup({preferFlash:!1}).reboot(),ib.didFlashBlock=!0,ib.beginDelayedInit()},1):r({type:"ontimeout",ignoreInit:!0}):0!==ib.flashLoadTimeout&&J(!0)),void 0)},ib.flashLoadTimeout),void 0))},w=function(){return Ob||!Pb?(bb.remove(a,"focus",w),!0):(Ob=Qb=!0,wb=!1,t(),bb.remove(a,"focus",w),!0)},m=function(b){if(rb)return!1;if(ib.html5Only)return rb=!0,s(),!0;var c,d=!0;return ib.useFlashBlock&&ib.flashLoadTimeout&&!ib.getMoviePercent()||(rb=!0,sb&&(c={type:!db&&Bb?"NO_FLASH":"INIT_TIMEOUT"})),(sb||b)&&(ib.useFlashBlock&&ib.oMC&&(ib.oMC.className=N()+" "+(null===ib.getMoviePercent()?"swf_timedout":"swf_error")),r({type:"ontimeout",error:c,ignoreInit:!0}),F(c),d=!1),sb||(ib.waitForWindowLoad&&!tb?bb.add(a,"load",s):s()),d},j=function(){var a,c=ib.setupOptions;for(a in c)c.hasOwnProperty(a)&&(ib[a]===b?ib[a]=c[a]:ib[a]!==c[a]&&(ib.setupOptions[a]=ib[a]))},k=function(){if(rb)return!1;if(ib.html5Only)return rb||(bb.remove(a,"load",ib.beginDelayedInit),ib.enabled=!0,m()),!0;y();try{kb._externalInterfaceTest(!1),G(!0,ib.flashPollingInterval||(ib.useHighPerformance?10:50)),ib.debugMode||kb._disableDebug(),ib.enabled=!0,ib.html5Only||bb.add(a,"unload",i)}catch(b){return F({type:"JS_TO_FLASH_EXCEPTION",fatal:!0}),J(!0),m(),!1}return m(),bb.remove(a,"load",ib.beginDelayedInit),!0},A=function(){return C?!1:(C=!0,j(),H(),!db&&ib.hasHTML5&&ib.setup({useHTML5Audio:!0,preferFlash:!1}),ab(),!db&&Bb&&(Ab.push(x.needFlash),ib.setup({flashLoadTimeout:1})),nb.removeEventListener&&nb.removeEventListener("DOMContentLoaded",A,!1),y(),!0)},_=function(){return"complete"===nb.readyState&&(A(),nb.detachEvent("onreadystatechange",_)),!0},B=function(){tb=!0,bb.remove(a,"load",B)},z=function(){Mb&&(ib.setupOptions.useHTML5Audio=!0,ib.setupOptions.preferFlash=!1,Fb||Gb&&!lb.match(/android\s2\.3/i))&&(Fb&&(ib.ignoreFlash=!0),Db=!0)},z(),eb(),bb.add(a,"focus",w),bb.add(a,"load",t),bb.add(a,"load",B),nb.addEventListener?nb.addEventListener("DOMContentLoaded",A,!1):nb.attachEvent?nb.attachEvent("onreadystatechange",_):F({type:"NO_DOM2_EVENTS",fatal:!0})}var d=null;void 0!==a.SM2_DEFER&&SM2_DEFER||(d=new c),a.SoundManager=c,a.soundManager=d}(window),function(){var a;!function(){"use strict";a={log:function(){},instrument:function(){}}}(),function(){"use strict";function a(a){angular.forEach(a,function(a,b){this[b]=a},this),this.paused=!0,this._sound=new f(a.url),b(this)}function b(a){g.$watch(function(){return a._sound.paused},function(b){a.paused=b}),g.$watch(function(){return a._sound.position},function(b){a.position=b}),g.$watch(function(){return a._sound.duration},function(b){a.duration=b})}function c(a){return function(){return this._sound[a].apply(this._sound,Array.prototype.slice.call(arguments))}}function d(a,b,c){e=a,f=b,g=c;var d=this;this.paused=!0,g.$watch(function(){return(d.nowPlaying||{paused:!0}).paused},function(a){d.paused=a})}for(var e,f,g,h=["play","stop","resume","setPosition"],i=h.length-1;i>=0;i-=1)a.prototype[h[i]]=c(h[i]);d.prototype.play=function(b){return void 0===b?this.resume():(b.constructor!==a&&(b=this.newSong(b)),void 0!==this.nowPlaying&&this.nowPlaying.stop(),this.nowPlaying=b,this.nowPlaying.play(),this.nowPlaying)},d.prototype.resume=function(){if(void 0===this.nowPlaying)throw"No Song Loaded";this.nowPlaying.resume()},d.prototype.pause=function(){e.pauseAll()},d.prototype.newSong=function(b){return new a(b)},d.prototype.seekTo=function(a){return this.nowPlaying.setPosition(a)},d.prototype.makeSongClass=function(c){if(void 0===c)return c=function(){a.apply(this,arguments)},c.prototype=angular.copy(a.prototype),c;if("function"==typeof c){var d=function(){c.apply(this,arguments);var a=this;g.$watch(function(){return a.url},function(b){a._sound=void 0!==b?new f(b):void 0}),b(this)};return angular.extend(d,c),angular.extend(d.prototype,c.prototype),angular.extend(d.prototype,a.prototype),d}},d.$inject=["phSoundManager","PlayerHaterSound","$rootScope"],angular.module("ngPlayerHater",["phSoundManager"]).service("playerHater",d)}(),angular.module("phSoundManager",["phSoundManager.service","phSoundManager.sound"]),function(){"use strict";function a(a){return function(b){return function(){var c=Array.prototype.slice.call(arguments);return a.then(function(a){return a[b].apply(a,c)})}}}function b(b,d){function e(){d.$apply(function(){f.resolve(window.soundManager),"function"==typeof c.options.originalonready&&c.options.originalonready.call(null)})}var f=b.defer(),g=a(f.promise),h=c.options;return e._shim=!0,h.originalonready=void 0===h.onready||h.onready._shim?void 0:h.onready,h.onready=e,window.soundManager.setup(h),{createSound:g("createSound"),canPlayLink:g("canPlayLink"),canPlayMIME:g("canPlayMIME"),canPlayURL:g("canPlayURL"),mute:g("mute"),pauseAll:g("pauseAll"),resumeAll:g("resumeAll"),stopAll:g("stopAll"),unmute:g("unmute")}}var c={$get:b,options:{url:"/assets",flashVersion:9,preferFlash:!1,debugMode:!1}};b.$inject=["$q","$rootScope"],angular.module("phSoundManager.service",["ng"]).provider("phSoundManager",c)}(),function(){"use strict";function b(a,b){return j=a,k=b,f}function c(a){return function(){var b=this;k(function(){a.call(b)})}}function d(a,b){return Array.prototype.slice.call(a,b)}function e(b){return{onload:c(function(){a.instrument("onload",arguments),1===this.readyState?(b.loading=!0,b.error=!1):2===this.readyState?(b.error=!0,b.loading=!1):3===this.readyState&&(b.loading=!1,b.error=!1,b.duration=this.duration)}),onpause:c(function(){a.instrument("onpause",arguments),b.paused=!0,b.playing=!1}),onplay:c(function(){a.instrument("onplay",arguments),b.paused=!1}),onresume:c(function(){a.instrument("onresume",arguments),b.paused=!1}),onid3:c(function(){a.instrument("onid3",arguments),angular.copy(this.id3,b.id3)}),whileloading:c(function(){a.instrument("whileloading",arguments),b.duration=this.durationEstimate}),whileplaying:c(function(){a.instrument("whileplaying",arguments),b.position=this.position})}}function f(a){if(void 0===a)throw"URL parameter is required";var b=e(this);b.url=a,this.playing=!1,this.loading=!1,this.paused=!0,this.error=!1,this.duration=void 0,this.position=void 0,this.id3={},this.sound=j.createSound(b)}function g(a){return function(b){var c=d(arguments,1);return"string"==typeof a?b[a].apply(b,c):a.apply(b,c)}}function h(a,b){return function(){var c=d(arguments).concat(b);return a.apply(this,c)}}function i(a,b){return function(){var c=d(arguments);return this[a].then(h(b,c))}}var j,k;b.$inject=["phSoundManager","$timeout"];for(var l="destruct load mute pause play resume setPan setPosition setVolume stop toogleMute togglePause unload unmute".split(" "),m=l.length-1;m>=0;m-=1)f.prototype[l[m]]=i("sound",g(l[m]));angular.module("phSoundManager.sound",["phSoundManager.service"]).factory("PlayerHaterSound",b)}()}();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ng_player_hater-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.2
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - chrisrhoden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-09 00:00:00.000000000 Z
11
+ date: 2013-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler