laipower/wp-content/plugins/audioigniter/player/build/app.js

1 line
282 KiB
JavaScript
Raw Normal View History

!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=29)}([function(e,t,n){"use strict";e.exports=n(30)},function(e,t,n){"use strict";e.exports=n(38)()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if(v.ok())return t(v.createSound(e)),function(){};y||(y=!0,v.beginDelayedInit());var n=function(){t(v.createSound(e))};return m.push(n),function(){m.splice(m.indexOf(n),1)}}function u(){}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(0),d=r(f),p=n(41),h=r(p),m=[],y=!1,v=void 0;if("undefined"!=typeof window){var g=n(43);v=g.soundManager,v.onready(function(){m.slice().forEach(function(e){return e()})})}var b={PLAYING:"PLAYING",STOPPED:"STOPPED",PAUSED:"PAUSED"},k=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"componentDidMount",value:function(){var e=this;this.createSound(function(t){return e.updateSound(t)})}},{key:"componentWillUnmount",value:function(){this.removeSound()}},{key:"componentDidUpdate",value:function(e){var t=this;this.props.url!==e.url?this.createSound(function(n){return t.updateSound(n,e)}):this.updateSound(this.sound)}},{key:"updateSound",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&(this.props.playStatus===b.PLAYING?(0===e.playState&&e.play(),e.paused&&e.resume()):this.props.playStatus===b.STOPPED?0!==e.playState&&e.stop():e.paused||e.pause(),null!=this.props.playFromPosition&&this.props.playFromPosition!==t.playFromPosition&&e.setPosition(this.props.playFromPosition),null!=this.props.position&&e.position!==this.props.position&&Math.round(e.position)!==Math.round(this.props.position)&&e.setPosition(this.props.position),this.props.volume!==t.volume&&e.setVolume(this.props.volume),this.props.playbackRate!==t.playbackRate&&e.setPlaybackRate(this.props.playbackRate))}},{key:"createSound",value:function(e){var t=this;this.removeSound();var n=this;this.props.url&&(this.stopCreatingSound=l({url:this.props.url,autoLoad:this.props.autoLoad,volume:this.props.volume,position:this.props.playFromPosition||this.props.position||0,playbackRate:this.props.playbackRate,whileloading:function(){n.props.onLoading(this)},whileplaying:function(){n.props.onPlaying(this)},onerror:function(e,t){n.props.onError(e,t,this)},onload:function(){n.props.onLoad(this)},onpause:function(){n.props.onPause(this)},onresume:function(){n.props.onResume(this)},onstop:function(){n.props.onStop(this)},onfinish:function(){n.props.loop&&n.props.playStatus===b.PLAYING?n.sound.play():n.props.onFinishedPlaying()},onbufferchang