filesafe/public/libs/videojs-wavesurfer/videojs.wavesurfer.min.js

8 lines
16 KiB
JavaScript
Raw Permalink Normal View History

/*!
* videojs-wavesurfer
* @version 3.8.0
* @see https://github.com/collab-project/videojs-wavesurfer
* @copyright 2014-2021 Collab
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("video.js"),require("wavesurfer.js")):"function"==typeof define&&define.amd?define("VideojsWavesurfer",["video.js","wavesurfer.js"],t):"object"==typeof exports?exports.VideojsWavesurfer=t(require("video.js"),require("wavesurfer.js")):e.VideojsWavesurfer=t(e.videojs,e.WaveSurfer)}(self,(function(e,t){return(()=>{var r={21:function(e,t,r){var i;!function(t){"use strict";function a(e,t){t=t||2;var r,i=Number(e)<0,a=e.toString();return i&&(a=a.slice(1)),r=t-a.length+1,(i?"-":"")+(a=new Array(r).join("0").concat(a))}void 0===(i=function(){return a}.call(t,r,t,e))||(e.exports=i)}(this)},997:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={debug:!1,displayMilliseconds:!0};t.default=r,e.exports=t.default},537:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};r.READY="ready",r.ERROR="error",r.VOLUMECHANGE="volumechange",r.FULLSCREENCHANGE="fullscreenchange",r.TIMEUPDATE="timeupdate",r.ENDED="ended",r.PAUSE="pause",r.FINISH="finish",r.SEEK="seek",r.REDRAW="redraw",r.AUDIOPROCESS="audioprocess",r.DEVICE_READY="deviceReady",r.DEVICE_ERROR="deviceError",r.AUDIO_OUTPUT_READY="audioOutputReady",r.WAVE_READY="waveReady",r.PLAYBACK_FINISH="playbackFinish",r.ABORT="abort",r.RESIZE="resize",Object.freeze(r);var i=r;t.default=i,e.exports=t.default},200:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={setSource:function(e,t){if(this.player.usingPlugin("wavesurfer")){var r=this.player.wavesurfer().surfer.params.backend,i=e.src,a=e.peaks;switch(r){case"WebAudio":this.player.wavesurfer().load(i);break;default:t(null,e);var o=this.player.tech_.el();void 0===a?this.player.wavesurfer().load(o):this.player.wavesurfer().load(o,a)}}else t(null,e)}};t.default=r,e.exports=t.default},518:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(21)),a=o(r(455));function o(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=e<0?0:e,(isNaN(e)||e===1/0)&&(e=0);var o=(0,a.default)(1e3*e),s=o;void 0!==t&&(s=(0,a.default)(1e3*t));var n=(0,i.default)(o.hours),l=(0,i.default)(o.minutes),u=(0,i.default)(o.seconds),h=(0,i.default)(o.milliseconds,3);if(o.days>0||s.days>0){var c=(0,i.default)(o.days);return"".concat(c,":").concat(n,":").concat(l,":").concat(u)}return o.hours>0||s.hours>0?"".concat(n,":").concat(l,":").concat(u):r?"".concat(l,":").concat(u,":").concat(h):"".concat(l,":").concat(u)};t.default=s,e.exports=t.default},456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,a=(i=r(390))&&i.__esModule?i:{default:i};var o=function(e,t,r){!0===r&&("error"===t?a.default.log.error(e):"warn"===t?a.default.log.warn(e):a.default.log(e))};t.default=o,e.exports=t.default},908:(e,t,r)=>{var i;i="undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{},e.exports=i},455:(e,t,r)=>{"use strict";function i(e){if("number"!=typeof e)throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(1e3*e)%1e3,nanoseconds:t(1e6*e)%1e3}}r.r(t),r.d(t,{default:()=>i})},390:t=>{"use strict";t.exports=e},410:e=>{"use strict";e.exports=t}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var o=i[e]={exports:{}};return r[e].call(o.exports,o,o.exports,a),o.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag