Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

videojs-wavesurfer

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-wavesurfer - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

6

CHANGES.md
videojs-wavesurfer changelog
============================
2.1.2 - 2017/12/13
------------------
- Fix compatibility issue with videojs-record plugin (#46)
2.1.1 - 2017/12/12

@@ -5,0 +11,0 @@ ------------------

24

dist/videojs.wavesurfer.js
/**
* videojs-wavesurfer
* @version 2.1.1
* @version 2.1.2
* @see https://github.com/collab-project/videojs-wavesurfer

@@ -103,3 +103,3 @@ * @copyright 2014-2017 Collab

/**
* Determine whether or not the player is trying use wavesurfer
* Determine whether or not the player is trying use the wavesurfer plugin
* @returns {boolean}

@@ -112,4 +112,13 @@ */

value: function playerIsUsingWavesurfer() {
return this.activePlayer.activeWavesurferPlugin !== undefined;
var availablePlugins = videojs.getPlugins();
var usingWavesurferPlugin = 'wavesurfer' in availablePlugins;
var usingRecordPlugin = 'record' in availablePlugins;
return usingWavesurferPlugin && !usingRecordPlugin;
}
/**
* Start playback.
*/
}, {

@@ -125,2 +134,7 @@ key: 'play',

}
/**
* Pause playback.
*/
}, {

@@ -1167,3 +1181,3 @@ key: 'pause',

Wavesurfer.VERSION = '2.1.1';
Wavesurfer.VERSION = '2.1.2';

@@ -1186,2 +1200,2 @@ // register plugin

});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJlczUvZGVmYXVsdHMuanMiLCJlczUvdGVjaC5qcyIsImVzNS91dGlscy9mb3JtYXQtdGltZS5qcyIsImVzNS91dGlscy9sb2cuanMiLCJub2RlX21vZHVsZXMvZ2xvYmFsL3dpbmRvdy5qcyJdLCJu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GlzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aXZlUGxheWVyLmFjdGl2ZVdhdmVzdXJmZXJQbHVnaW4ucGF1c2UoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIGN1cnJlbnQgdGltZVxuICAgICAgICAgKiBAcmV0dXJuIHtudW1iZXJ9XG4gICAgICAgICAqL1xuXG4gICAgfSwge1xuICAgICAgICBrZXk6ICdjdXJyZW50VGltZScsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjdXJyZW50VGltZSgpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5wbGF5ZXJJc1VzaW5nV2F2ZXN1cmZlcigpKSB7XG4gICAgICAgICAgICAgICAgLy8gZmFsbCBiYWNrIHRvIGh0bWw1IHRlY2ggZnVuY3Rpb25hbGl0eVxuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZSksICdjdXJyZW50VGltZScsIHRoaXMpLmNhbGwodGhpcyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdGhpcy53YXZlcmVhZHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aXZlUGxheWVyLmFjdGl2ZVdhdmVzdXJmZXJQbHVnaW4uZ2V0Q3VycmVudFRpbWUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgdGhlIGN1cnJlbnQgZHVyYXRpb25cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybiB7bnVtYmVyfVxuICAgICAgICAgKiAgICAgICAgIFRoZSBkdXJhdGlvbiB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GVQbHVnaW5zO1xuXG4gICAgICAgICAgICByZXR1cm4gdXNpbmdXYXZlc3VyZmVyUGx1Z2luICYmICF1c2luZ1JlY29yZFBsdWdpbjtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTdGFydCBwbGF5YmFjay5cbiAgICAgICAgICovXG5cbiAgICB9LCB7XG4gICAgICAgIGtleTogJ3BsYXknLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcGxheSgpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5wbGF5ZXJJc1VzaW5nV2F2ZXN1cmZlcigpKSB7XG4gICAgICAgICAgICAgICAgLy8gZmFsbCBiYWNrIHRvIGh0bWw1IHRlY2ggZnVuY3Rpb25hbGl0eVxuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZSksICdwbGF5JywgdGhpcykuY2FsbCh0aGlzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aXZlUGxheWVyLmFjdGl2ZVdhdmVzdXJmZXJQbHVnaW4ucGxheSgpO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFBhdXNlIHBsYXliYWNrLlxuICAgICAgICAgKi9cblxuICAgIH0sIHtcbiAgICAgICAga2V5OiAncGF1c2UnLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gcGF1c2UoKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMucGxheWVySXNVc2luZ1dhdmVzdXJmZXIoKSkge1xuICAgICAgICAgICAgICAgIC8vZmFsbCBiYWNrIHRvIGh0bWw1IHRlY2ggZnVuY3Rpb25hbGl0eVxuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZSksICdwYXVzZScsIHRoaXMpLmNhbGwodGhpcyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGl2ZVBsYXllci5hY3RpdmVXYXZlc3VyZmVyUGx1Z2luLnBhdXNlKCk7XG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBjdXJyZW50IHRpbWVcbiAgICAgICAgICogQHJldHVybiB7bnVtYmVyfVxuICAgICAgICAgKi9cblxuICAgIH0sIHtcbiAgICAgICAga2V5OiAnY3VycmVudFRpbWUnLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gY3VycmVudFRpbWUoKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMucGxheWVySXNVc2luZ1dhdmVzdXJmZXIoKSkge1xuICAgICAgICAgICAgICAgIC8vIGZhbGwgYmFjayB0byBodG1sNSB0ZWNoIGZ1bmN0aW9uYWxpdHlcbiAgICAgICAgICAgICAgICByZXR1cm4gX2dldChXYXZlc3VyZmVyVGVjaC5wcm90b3R5cGUuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihXYXZlc3VyZmVyVGVjaC5wcm90b3R5cGUpLCAnY3VycmVudFRpbWUnLCB0aGlzKS5jYWxsKHRoaXMpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXRoaXMud2F2ZXJlYWR5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGl2ZVBsYXllci5hY3RpdmVXYXZlc3VyZmVyUGx1Z2luLmdldEN1cnJlbnRUaW1lKCk7XG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSBjdXJyZW50IGR1cmF0aW9uXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm4ge251bWJlcn1cbiAgICAgICAgICogICAgICAgICBUaGUgZHVyYXRpb24gb2YgdGhlIG1lZGlhIG9yIDAgaWYgdGhlcmUgaXMgbm8gZHVyYXRpb24uXG4gICAgICAgICAqL1xuXG4gICAgfSwge1xuICAgICAgICBrZXk6ICdkdXJhdGlvbicsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBkdXJhdGlvbigpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5wbGF5ZXJJc1VzaW5nV2F2ZXN1cmZlcigpKSB7XG4gICAgICAgICAgICAgICAgLy8gZmFsbCBiYWNrIHRvIGh0bWw1IHRlY2ggZnVuY3Rpb25hbGl0eVxuICAgICAgICAgICAgICAgIHJldHVybiBfZ2V0KFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZS5fX3Byb3RvX18gfHwgT2JqZWN0LmdldFByb3RvdHlwZU9mKFdhdmVzdXJmZXJUZWNoLnByb3RvdHlwZSksICdkdXJhdGlvbicsIHRoaXMpLmNhbGwodGhpcyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdGhpcy53YXZlcmVhZHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWN0aXZlUGxheWVyLmFjdGl2ZVdhdmVzdXJmZXJQbHVnaW4uZ2V0RHVyYXRpb24oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTZXQgdGhlIGN1cnJlbnQgdGltZVxuICAgICAgICAgKlxuICAgICAgICAgKiBAc2luY2UgMi4xLjFcbiAgICAgICAgICogQHBhcmFtIHtudW1iZXJ9IHRpbWVcbiAgICAgICAgICogQHJldHVybnMgeyp9XG4gICAgICAgICAqL1xuXG4gICAgfSwge1xuICAgICAgICBrZXk6ICdzZXRDdXJyZW50VGltZScsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBzZXRDdXJyZW50VGltZSh0aW1lKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMucGxheWVySXNVc2luZ1dhdmVzdXJmZXIoKSkge1xuICAgICAgICAgICAgICAgIC8vIGZhbGwgYmFjayB0byBodG1sNSB0ZWNoIGZ1bmN0aW9uYWxpdHlcbiAgICAgICAgICAgICAgICByZXR1cm4gX2dldChXYXZlc3VyZmVyVGVjaC5wcm90b3R5cGUuX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihXYXZlc3VyZmVyVGVjaC5wcm90b3R5cGUpLCAnY3VycmVudFRpbWUnLCB0aGlzKS5jYWxsKHRoaXMsIHRpbWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIXRoaXMud2F2ZXJlYWR5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFjdGl2ZVBsYXllci5hY3RpdmVXYXZlc3VyZmVyUGx1Z2luLnN1cmZlci5zZWVrVG8odGltZSAvIHRoaXMuYWN0aXZlUGxheWVyLmFjdGl2ZVdhdmVzdXJmZXJQbHVnaW4uc3VyZmVyLmdldER1cmF0aW9uKCkpO1xuICAgICAgICB9XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFNldHMgdGhlIGN1cnJlbnQgcGxheWJhY2sgcmF0ZS4gQSBwbGF5YmFjayByYXRlIG9mXG4gICAgICAgICAqIDEuMCByZXByZXNlbnRzIG5vcm1hbCBzcGVlZCBhbmQgMC41IHdvdWxkIGluZGljYXRlIGhhbGYtc3BlZWRcbiAgICAgICAgICogcGxheWJhY2ssIGZvciBpbnN0YW5jZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHNpbmNlIDIuMS4xXG4gICAgICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbcmF0ZV1cbiAgICAgICAgICogICAgICAgTmV3IH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GxvZ1R5cGUgPT09IFdBUk4pIHtcbiAgICAgICAgICAgIHZpZGVvanMubG9nLndhcm4oYXJncyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2aWRlb2pzLmxvZyhhcmdzKTtcbiAgICAgICAgfVxuICAgIH1cbn07XG5cbmV4cG9ydHMuZGVmYXVsdCA9IGxvZzsiLCJ2YXIgd2luO1xuXG5pZiAodHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgIHdpbiA9IHdpbmRvdztcbn0gZWxzZSBpZiAodHlwZW9mIGdsb2JhbCAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgIHdpbiA9IGdsb2JhbDtcbn0gZWxzZSBpZiAodHlwZW9mIHNlbGYgIT09IFwidW5kZWZpbmVkXCIpe1xuICAgIHdpbiA9IHNlbGY7XG59IGVsc2Uge1xuICAgIHdpbiA9IHt9O1xufVxuXG5tb2R1bGUuZXhwb3J0cyA9IHdpbjtcbiJdfQ==
/**
* videojs-wavesurfer
* @version 2.1.1
* @version 2.1.2
* @see https://github.com/collab-project/videojs-wavesurfer

@@ -8,2 +8,2 @@ * @copyright 2014-2017 Collab

*/
!function e(t,r,i){function o(s,n){if(!r[s]){if(!t[s]){var l="function"==typeof require&&require;if(!n&&l)return l(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[s]={exports:{}};t[s][0].call(h.exports,function(e){var r=t[s][1][e];return o(r||e)},h,h.exports,e,t,r,i)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={debug:!1,msDisplayMax:3}},{}],2:[function(e,t,r){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=function e(t,r,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,r,i)}if("value"in o)return o.value;var s=o.get;if(void 0!==s)return s.call(i)},s=videojs.getTech("Html5"),n=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.nativeTextTracks=!1;var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return o.activePlayer=videojs(e.playerId),o.waveready=!1,o.activePlayer.on("waveReady",function(){o.waveready=!0}),o.playerIsUsingWavesurfer()?(o.activePlayer.activeWavesurferPlugin.on("timeupdate",function(){o.trigger("timeupdate")}),o):i(o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}(t,s),o(t,[{key:"playerIsUsingWavesurfer",value:function(){return void 0!==this.activePlayer.activeWavesurferPlugin}},{key:"play",value:function(){return this.playerIsUsingWavesurfer()?this.activePlayer.activeWavesurferPlugin.play():a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"play",this).call(this)}},{key:"pause",value:function(){return this.playerIsUsingWavesurfer()?this.activePlayer.activeWavesurferPlugin.pause():a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"pause",this).call(this)}},{key:"currentTime",value:function(){return this.playerIsUsingWavesurfer()?this.waveready?this.activePlayer.activeWavesurferPlugin.getCurrentTime():0:a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"currentTime",this).call(this)}},{key:"duration",value:function(){return this.playerIsUsingWavesurfer()?this.waveready?this.activePlayer.activeWavesurferPlugin.getDuration():0:a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"duration",this).call(this)}},{key:"setCurrentTime",value:function(e){return this.playerIsUsingWavesurfer()?this.waveready?this.activePlayer.activeWavesurferPlugin.surfer.seekTo(e/this.activePlayer.activeWavesurferPlugin.surfer.getDuration()):0:a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"currentTime",this).call(this,e)}},{key:"setPlaybackRate",value:function(e){return this.playerIsUsingWavesurfer()&&this.activePlayer.activeWavesurferPlugin.surfer.setPlaybackRate(e),a(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setPlaybackRate",this).call(this,e)}}]),t}();n.isSupported=function(){return!0},r.default=n},{}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=function(e,t,r){e=e<0?0:e,t=t||e;var i=Math.floor(e%60),o=Math.floor(e/60%60),a=Math.floor(e/3600),s=Math.floor(t/60%60),n=Math.floor(t/3600),l=Math.floor(1e3*(e-i));return(isNaN(e)||e===1/0)&&(a=o=i=l="-"),t>0&&t<r?(l<100&&(l=l<10?"00"+l:"0"+l),l=":"+l):l="",a=a>0||n>0?a+":":"",o=((a||s>=10)&&o<10?"0"+o:o)+":",i=i<10?"0"+i:i,a+o+i+l}},{}],4:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=function(e,t,r){!0===r&&("error"===t?videojs.log.error(e):"warn"===t?videojs.log.warn(e):videojs.log(e))}},{}],5:[function(e,t,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,r){(function(r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=i(e(4)),n=i(e(3)),l=i(e(1)),u=i(e(2)),h=i(e(5)),f=i("undefined"!=typeof window?window.videojs:void 0!==r?r.videojs:null),p=i("undefined"!=typeof window?window.WaveSurfer:void 0!==r?r.WaveSurfer:null),c=f.default.getPlugin("plugin"),y="vjs-wavedisplay",d=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));if(r=f.default.mergeOptions(l.default,r),i.waveReady=!1,i.waveFinished=!1,i.liveMode=!1,i.debug="true"===r.debug.toString(),i.msDisplayMax=parseFloat(r.msDisplayMax),i.player.activeWavesurferPlugin=i,void 0!==i.player.options_.plugins.wavesurfer&&i.player.addClass("videojs-wavesurfer"),"live"===r.src){if(void 0===p.default.microphone)return i.onWaveError("Could not find wavesurfer.js microphone plugin!"),o(i);i.liveMode=!0,i.waveReady=!0}return i.player.one("ready",i.initialize.bind(i)),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}(t,c),a(t,[{key:"initialize",value:function(){if(this.player.bigPlayButton.hide(),!0===this.player.usingNativeControls_&&void 0!==this.player.tech_.el_&&(this.player.tech_.el_.controls=!1),!0===this.player.options_.controls){this.player.controlBar.show(),this.player.controlBar.el_.style.display="flex",this.player.controlBar.progressControl.hide();[this.player.controlBar.currentTimeDisplay,this.player.controlBar.timeDivider,this.player.controlBar.durationDisplay].forEach(function(e){void 0!==e&&(e.el_.style.display="block",e.show())}),void 0!==this.player.controlBar.remainingTimeDisplay&&this.player.controlBar.remainingTimeDisplay.hide(),this.player.controlBar.playToggle.on(["tap","click"],this.onPlayToggle.bind(this)),this.liveMode||this.player.controlBar.playToggle.hide()}var e=this.parseOptions(this.player.options_.plugins.wavesurfer);this.surfer=p.default.create(e),this.surfer.on("error",this.onWaveError.bind(this)),this.surfer.on("finish",this.onWaveFinish.bind(this)),!0===this.liveMode&&this.surfer.microphone.on("deviceError",this.onWaveError.bind(this)),this.surferReady=this.onWaveReady.bind(this),this.surferProgress=this.onWaveProgress.bind(this),this.surferSeek=this.onWaveSeek.bind(this),this.liveMode||this.setupPlaybackEvents(!0),this.player.on("volumechange",this.onVolumeChange.bind(this)),this.player.on("fullscreenchange",this.onScreenChange.bind(this)),!0===this.player.options_.fluid&&(this.surfer.drawer.wrapper.className=y,this.responsiveWave=p.default.util.debounce(this.onResizeChange.bind(this),150),h.default.addEventListener("resize",this.responsiveWave)),this.startPlayers()}},{key:"parseOptions",value:function(e){var t=this.player.el_.getBoundingClientRect();this.originalWidth=this.player.options_.width||t.width,this.originalHeight=this.player.options_.height||t.height;var r=this.player.controlBar.height();if(!0===this.player.options_.controls&&0===r&&(r=30),void 0===e.container&&(e.container=this.player.el_),void 0===e.waveformHeight){var i=t.height;e.height=i-r}else e.height=opts.waveformHeight;return e.splitChannels&&!0===e.splitChannels&&(e.height/=2),!0===this.liveMode&&(e.plugins=[p.default.microphone.create(e)],this.log("wavesurfer.js microphone plugin enabled.")),e}},{key:"startPlayers",value:function(){var e=this.player.options_.plugins.wavesurfer;void 0!==e.src?void 0===this.surfer.microphone?(this.player.loadingSpinner.show(),this.load(e.src,e.peaks)):(this.player.loadingSpinner.hide(),e.wavesurfer=this.surfer):this.player.loadingSpinner.hide()}},{key:"setupPlaybackEvents",value:function(e){!1===e?(this.surfer.un("ready",this.surferReady),this.surfer.un("audioprocess",this.surferProgress),this.surfer.un("seek",this.surferSeek)):!0===e&&(this.surfer.on("ready",this.surferReady),this.surfer.on("audioprocess",this.surferProgress),this.surfer.on("seek",this.surferSeek))}},{key:"load",value:function(e,t){var r=this;if(e instanceof Blob||e instanceof File)this.log("Loading object: "+JSON.stringify(e)),this.surfer.loadBlob(e);else if(void 0!==t){p.default.util.ajax({url:t,responseType:"json"}).on("success",function(i,o){200==o.target.status?(r.log("Loading URL: "+e+"\nLoading Peak Data URL: "+t),r.surfer.load(e,i.data)):(r.log("Unable to retrieve peak data from "+t+". Status code: "+o.target.status),r.log("Loading URL: "+e),r.surfer.load(e))})}else this.log("Loading URL: "+e),this.surfer.load(e)}},{key:"play",value:function(){if(this.player.controlBar.playToggle.handlePlay(),this.liveMode)if(this.surfer.microphone.active){!this.surfer.microphone.paused?this.pause():(this.log("Resume microphone"),this.surfer.microphone.play())}else this.log("Start microphone"),this.surfer.microphone.start();else this.log("Start playback"),this.player.play(),this.surfer.play()}},{key:"pause",value:function(){this.player.controlBar.playToggle.handlePause(),this.liveMode?(this.log("Pause microphone"),this.surfer.microphone.pause()):(this.log("Pause playback"),this.waveFinished?this.waveFinished=!1:this.surfer.pause(),this.setCurrentTime())}},{key:"dispose",value:function(){this.liveMode&&this.surfer.microphone&&(this.surfer.microphone.destroy(),this.log("Destroyed microphone plugin")),this.surfer.destroy(),this.log("Destroyed plugin")}},{key:"destroy",value:function(){this.player.dispose()}},{key:"setVolume",value:function(e){void 0!==e&&(this.log("Changing volume to: "+e),this.player.volume(e))}},{key:"exportImage",value:function(e,t){return this.surfer.exportImage(e,t)}},{key:"getCurrentTime",value:function(){var e=this.surfer.getCurrentTime();return e=isNaN(e)?0:e}},{key:"setCurrentTime",value:function(e,t){this.trigger("timeupdate"),void 0===e&&(e=this.surfer.getCurrentTime()),void 0===t&&(t=this.surfer.getDuration()),e=isNaN(e)?0:e,t=isNaN(t)?0:t;var r=Math.min(e,t);this.player.controlBar.currentTimeDisplay.formattedTime_=this.player.controlBar.currentTimeDisplay.contentEl().lastChild.textContent=(0,n.default)(r,t,this.msDisplayMax)}},{key:"getDuration",value:function(){var e=this.surfer.getDuration();return e=isNaN(e)?0:e}},{key:"setDuration",value:function(e){void 0===e&&(e=this.surfer.getDuration()),e=isNaN(e)?0:e,this.player.controlBar.durationDisplay.formattedTime_=this.player.controlBar.durationDisplay.contentEl().lastChild.textContent=(0,n.default)(e,e,this.msDisplayMax)}},{key:"onWaveReady",value:function(){this.waveReady=!0,this.waveFinished=!1,this.liveMode=!1,this.log("Waveform is ready"),this.player.trigger("waveReady"),this.setCurrentTime(),this.setDuration(),this.player.controlBar.playToggle.show(),this.player.loadingSpinner.hide(),!0===this.player.options_.autoplay&&this.play()}},{key:"onWaveFinish",value:function(){var e=this;this.log("Finished playback"),this.player.trigger("playbackFinish"),!0===this.player.options_.loop?(this.surfer.stop(),this.play()):(this.waveFinished=!0,this.pause(),this.player.trigger("ended"),this.surfer.once("seek",function(){e.player.controlBar.playToggle.removeClass("vjs-ended"),e.player.trigger("pause")}))}},{key:"onWaveProgress",value:function(e){this.setCurrentTime()}},{key:"onWaveSeek",value:function(){this.setCurrentTime()}},{key:"onWaveError",value:function(e){this.player.trigger("error",e),this.log(e,"error")}},{key:"onPlayToggle",value:function(){this.player.controlBar.playToggle.hasClass("vjs-ended")&&this.player.controlBar.playToggle.removeClass("vjs-ended"),this.surfer.isPlaying()?this.pause():this.play()}},{key:"onVolumeChange",value:function(){var e=this.player.volume();this.player.muted()&&(e=0),this.surfer.setVolume(e)}},{key:"onScreenChange",value:function(){var e=this,t=this.player.setInterval(function(){var r=void 0,i=void 0;if(e.player.isFullscreen()||(r=e.originalWidth,i=e.originalHeight),e.waveReady){if(e.liveMode&&!e.surfer.microphone.active)return;e.redrawWaveform(r,i)}e.player.clearInterval(t)},100)}},{key:"onResizeChange",value:function(){void 0!==this.surfer&&this.redrawWaveform()}},{key:"redrawWaveform",value:function(e,t){var r=this.player.el_.getBoundingClientRect();void 0===e&&(e=r.width),void 0===t&&(t=r.height),this.surfer.drawer.destroy(),this.surfer.params.width=e,this.surfer.params.height=t-this.player.controlBar.height(),this.surfer.createDrawer(),this.surfer.drawer.wrapper.className=y,this.surfer.drawBuffer(),this.surfer.drawer.progress(this.surfer.backend.getPlayedPercents())}},{key:"log",value:function(e,t){(0,s.default)(e,t,this.debug)}}]),t}();d.VERSION="2.1.1",f.default.Wavesurfer=d,f.default.registerPlugin("wavesurfer",d),f.default.registerTech("Html5",u.default),t.exports={Wavesurfer:d}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[6]);
!function e(t,r,i){function o(a,n){if(!r[a]){if(!t[a]){var l="function"==typeof require&&require;if(!n&&l)return l(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var h=r[a]={exports:{}};t[a][0].call(h.exports,function(e){var r=t[a][1][e];return o(r||e)},h,h.exports,e,t,r,i)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={debug:!1,msDisplayMax:3}},{}],2:[function(e,t,r){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),s=function e(t,r,i){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,r,i)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(i)},a=videojs.getTech("Html5"),n=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e.nativeTextTracks=!1;var o=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));return o.activePlayer=videojs(e.playerId),o.waveready=!1,o.activePlayer.on("waveReady",function(){o.waveready=!0}),o.playerIsUsingWavesurfer()?(o.activePlayer.activeWavesurferPlugin.on("timeupdate",function(){o.trigger("timeupdate")}),o):i(o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}(t,a),o(t,[{key:"playerIsUsingWavesurfer",value:function(){var e=videojs.getPlugins();return"wavesurfer"in e&&!("record"in e)}},{key:"play",value:function(){return this.playerIsUsingWavesurfer()?this.activePlayer.activeWavesurferPlugin.play():s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"play",this).call(this)}},{key:"pause",value:function(){return this.playerIsUsingWavesurfer()?this.activePlayer.activeWavesurferPlugin.pause():s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"pause",this).call(this)}},{key:"currentTime",value:function(){return this.playerIsUsingWavesurfer()?this.waveready?this.activePlayer.activeWavesurferPlugin.getCurrentTime():0:s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"currentTime",this).call(this)}},{key:"duration",value:function(){return this.playerIsUsingWavesurfer()?this.waveready?this.activePlayer.activeWavesurferPlugin.getDuration():0:s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"duration",this).call(this)}},{key:"setCurrentTime",value:function(e){return this.playerIsUsingWavesurfer()?this.waveready?this.activePlayer.activeWavesurferPlugin.surfer.seekTo(e/this.activePlayer.activeWavesurferPlugin.surfer.getDuration()):0:s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"currentTime",this).call(this,e)}},{key:"setPlaybackRate",value:function(e){return this.playerIsUsingWavesurfer()&&this.activePlayer.activeWavesurferPlugin.surfer.setPlaybackRate(e),s(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setPlaybackRate",this).call(this,e)}}]),t}();n.isSupported=function(){return!0},r.default=n},{}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=function(e,t,r){e=e<0?0:e,t=t||e;var i=Math.floor(e%60),o=Math.floor(e/60%60),s=Math.floor(e/3600),a=Math.floor(t/60%60),n=Math.floor(t/3600),l=Math.floor(1e3*(e-i));return(isNaN(e)||e===1/0)&&(s=o=i=l="-"),t>0&&t<r?(l<100&&(l=l<10?"00"+l:"0"+l),l=":"+l):l="",s=s>0||n>0?s+":":"",o=((s||a>=10)&&o<10?"0"+o:o)+":",i=i<10?"0"+i:i,s+o+i+l}},{}],4:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default=function(e,t,r){!0===r&&("error"===t?videojs.log.error(e):"warn"===t?videojs.log.warn(e):videojs.log(e))}},{}],5:[function(e,t,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,r){(function(r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),a=i(e(4)),n=i(e(3)),l=i(e(1)),u=i(e(2)),h=i(e(5)),f=i("undefined"!=typeof window?window.videojs:void 0!==r?r.videojs:null),p=i("undefined"!=typeof window?window.WaveSurfer:void 0!==r?r.WaveSurfer:null),c=f.default.getPlugin("plugin"),y="vjs-wavedisplay",d=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r));if(r=f.default.mergeOptions(l.default,r),i.waveReady=!1,i.waveFinished=!1,i.liveMode=!1,i.debug="true"===r.debug.toString(),i.msDisplayMax=parseFloat(r.msDisplayMax),i.player.activeWavesurferPlugin=i,void 0!==i.player.options_.plugins.wavesurfer&&i.player.addClass("videojs-wavesurfer"),"live"===r.src){if(void 0===p.default.microphone)return i.onWaveError("Could not find wavesurfer.js microphone plugin!"),o(i);i.liveMode=!0,i.waveReady=!0}return i.player.one("ready",i.initialize.bind(i)),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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)}(t,c),s(t,[{key:"initialize",value:function(){if(this.player.bigPlayButton.hide(),!0===this.player.usingNativeControls_&&void 0!==this.player.tech_.el_&&(this.player.tech_.el_.controls=!1),!0===this.player.options_.controls){this.player.controlBar.show(),this.player.controlBar.el_.style.display="flex",this.player.controlBar.progressControl.hide();[this.player.controlBar.currentTimeDisplay,this.player.controlBar.timeDivider,this.player.controlBar.durationDisplay].forEach(function(e){void 0!==e&&(e.el_.style.display="block",e.show())}),void 0!==this.player.controlBar.remainingTimeDisplay&&this.player.controlBar.remainingTimeDisplay.hide(),this.player.controlBar.playToggle.on(["tap","click"],this.onPlayToggle.bind(this)),this.liveMode||this.player.controlBar.playToggle.hide()}var e=this.parseOptions(this.player.options_.plugins.wavesurfer);this.surfer=p.default.create(e),this.surfer.on("error",this.onWaveError.bind(this)),this.surfer.on("finish",this.onWaveFinish.bind(this)),!0===this.liveMode&&this.surfer.microphone.on("deviceError",this.onWaveError.bind(this)),this.surferReady=this.onWaveReady.bind(this),this.surferProgress=this.onWaveProgress.bind(this),this.surferSeek=this.onWaveSeek.bind(this),this.liveMode||this.setupPlaybackEvents(!0),this.player.on("volumechange",this.onVolumeChange.bind(this)),this.player.on("fullscreenchange",this.onScreenChange.bind(this)),!0===this.player.options_.fluid&&(this.surfer.drawer.wrapper.className=y,this.responsiveWave=p.default.util.debounce(this.onResizeChange.bind(this),150),h.default.addEventListener("resize",this.responsiveWave)),this.startPlayers()}},{key:"parseOptions",value:function(e){var t=this.player.el_.getBoundingClientRect();this.originalWidth=this.player.options_.width||t.width,this.originalHeight=this.player.options_.height||t.height;var r=this.player.controlBar.height();if(!0===this.player.options_.controls&&0===r&&(r=30),void 0===e.container&&(e.container=this.player.el_),void 0===e.waveformHeight){var i=t.height;e.height=i-r}else e.height=opts.waveformHeight;return e.splitChannels&&!0===e.splitChannels&&(e.height/=2),!0===this.liveMode&&(e.plugins=[p.default.microphone.create(e)],this.log("wavesurfer.js microphone plugin enabled.")),e}},{key:"startPlayers",value:function(){var e=this.player.options_.plugins.wavesurfer;void 0!==e.src?void 0===this.surfer.microphone?(this.player.loadingSpinner.show(),this.load(e.src,e.peaks)):(this.player.loadingSpinner.hide(),e.wavesurfer=this.surfer):this.player.loadingSpinner.hide()}},{key:"setupPlaybackEvents",value:function(e){!1===e?(this.surfer.un("ready",this.surferReady),this.surfer.un("audioprocess",this.surferProgress),this.surfer.un("seek",this.surferSeek)):!0===e&&(this.surfer.on("ready",this.surferReady),this.surfer.on("audioprocess",this.surferProgress),this.surfer.on("seek",this.surferSeek))}},{key:"load",value:function(e,t){var r=this;if(e instanceof Blob||e instanceof File)this.log("Loading object: "+JSON.stringify(e)),this.surfer.loadBlob(e);else if(void 0!==t){p.default.util.ajax({url:t,responseType:"json"}).on("success",function(i,o){200==o.target.status?(r.log("Loading URL: "+e+"\nLoading Peak Data URL: "+t),r.surfer.load(e,i.data)):(r.log("Unable to retrieve peak data from "+t+". Status code: "+o.target.status),r.log("Loading URL: "+e),r.surfer.load(e))})}else this.log("Loading URL: "+e),this.surfer.load(e)}},{key:"play",value:function(){if(this.player.controlBar.playToggle.handlePlay(),this.liveMode)if(this.surfer.microphone.active){!this.surfer.microphone.paused?this.pause():(this.log("Resume microphone"),this.surfer.microphone.play())}else this.log("Start microphone"),this.surfer.microphone.start();else this.log("Start playback"),this.player.play(),this.surfer.play()}},{key:"pause",value:function(){this.player.controlBar.playToggle.handlePause(),this.liveMode?(this.log("Pause microphone"),this.surfer.microphone.pause()):(this.log("Pause playback"),this.waveFinished?this.waveFinished=!1:this.surfer.pause(),this.setCurrentTime())}},{key:"dispose",value:function(){this.liveMode&&this.surfer.microphone&&(this.surfer.microphone.destroy(),this.log("Destroyed microphone plugin")),this.surfer.destroy(),this.log("Destroyed plugin")}},{key:"destroy",value:function(){this.player.dispose()}},{key:"setVolume",value:function(e){void 0!==e&&(this.log("Changing volume to: "+e),this.player.volume(e))}},{key:"exportImage",value:function(e,t){return this.surfer.exportImage(e,t)}},{key:"getCurrentTime",value:function(){var e=this.surfer.getCurrentTime();return e=isNaN(e)?0:e}},{key:"setCurrentTime",value:function(e,t){this.trigger("timeupdate"),void 0===e&&(e=this.surfer.getCurrentTime()),void 0===t&&(t=this.surfer.getDuration()),e=isNaN(e)?0:e,t=isNaN(t)?0:t;var r=Math.min(e,t);this.player.controlBar.currentTimeDisplay.formattedTime_=this.player.controlBar.currentTimeDisplay.contentEl().lastChild.textContent=(0,n.default)(r,t,this.msDisplayMax)}},{key:"getDuration",value:function(){var e=this.surfer.getDuration();return e=isNaN(e)?0:e}},{key:"setDuration",value:function(e){void 0===e&&(e=this.surfer.getDuration()),e=isNaN(e)?0:e,this.player.controlBar.durationDisplay.formattedTime_=this.player.controlBar.durationDisplay.contentEl().lastChild.textContent=(0,n.default)(e,e,this.msDisplayMax)}},{key:"onWaveReady",value:function(){this.waveReady=!0,this.waveFinished=!1,this.liveMode=!1,this.log("Waveform is ready"),this.player.trigger("waveReady"),this.setCurrentTime(),this.setDuration(),this.player.controlBar.playToggle.show(),this.player.loadingSpinner.hide(),!0===this.player.options_.autoplay&&this.play()}},{key:"onWaveFinish",value:function(){var e=this;this.log("Finished playback"),this.player.trigger("playbackFinish"),!0===this.player.options_.loop?(this.surfer.stop(),this.play()):(this.waveFinished=!0,this.pause(),this.player.trigger("ended"),this.surfer.once("seek",function(){e.player.controlBar.playToggle.removeClass("vjs-ended"),e.player.trigger("pause")}))}},{key:"onWaveProgress",value:function(e){this.setCurrentTime()}},{key:"onWaveSeek",value:function(){this.setCurrentTime()}},{key:"onWaveError",value:function(e){this.player.trigger("error",e),this.log(e,"error")}},{key:"onPlayToggle",value:function(){this.player.controlBar.playToggle.hasClass("vjs-ended")&&this.player.controlBar.playToggle.removeClass("vjs-ended"),this.surfer.isPlaying()?this.pause():this.play()}},{key:"onVolumeChange",value:function(){var e=this.player.volume();this.player.muted()&&(e=0),this.surfer.setVolume(e)}},{key:"onScreenChange",value:function(){var e=this,t=this.player.setInterval(function(){var r=void 0,i=void 0;if(e.player.isFullscreen()||(r=e.originalWidth,i=e.originalHeight),e.waveReady){if(e.liveMode&&!e.surfer.microphone.active)return;e.redrawWaveform(r,i)}e.player.clearInterval(t)},100)}},{key:"onResizeChange",value:function(){void 0!==this.surfer&&this.redrawWaveform()}},{key:"redrawWaveform",value:function(e,t){var r=this.player.el_.getBoundingClientRect();void 0===e&&(e=r.width),void 0===t&&(t=r.height),this.surfer.drawer.destroy(),this.surfer.params.width=e,this.surfer.params.height=t-this.player.controlBar.height(),this.surfer.createDrawer(),this.surfer.drawer.wrapper.className=y,this.surfer.drawBuffer(),this.surfer.drawer.progress(this.surfer.backend.getPlayedPercents())}},{key:"log",value:function(e,t){(0,a.default)(e,t,this.debug)}}]),t}();d.VERSION="2.1.2",f.default.Wavesurfer=d,f.default.registerPlugin("wavesurfer",d),f.default.registerTech("Html5",u.default),t.exports={Wavesurfer:d}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[6]);

@@ -70,3 +70,3 @@ 'use strict';

/**
* Determine whether or not the player is trying use wavesurfer
* Determine whether or not the player is trying use the wavesurfer plugin
* @returns {boolean}

@@ -79,4 +79,13 @@ */

value: function playerIsUsingWavesurfer() {
return this.activePlayer.activeWavesurferPlugin !== undefined;
var availablePlugins = videojs.getPlugins();
var usingWavesurferPlugin = 'wavesurfer' in availablePlugins;
var usingRecordPlugin = 'record' in availablePlugins;
return usingWavesurferPlugin && !usingRecordPlugin;
}
/**
* Start playback.
*/
}, {

@@ -92,2 +101,7 @@ key: 'play',

}
/**
* Pause playback.
*/
}, {

@@ -94,0 +108,0 @@ key: 'pause',

{
"name": "videojs-wavesurfer",
"version": "2.1.1",
"version": "2.1.2",
"description": "video.js plugin that adds a navigable waveform for audio and video files.",

@@ -113,3 +113,3 @@ "author": "Collab",

"node-sass": "^4.6.1",
"nodemon": "^1.12.5",
"nodemon": "^1.12.6",
"npm-run-all": "^4.1.2",

@@ -116,0 +116,0 @@ "portscanner": "^2.1.1",

@@ -49,3 +49,3 @@ /**

/**
* Determine whether or not the player is trying use wavesurfer
* Determine whether or not the player is trying use the wavesurfer plugin
* @returns {boolean}

@@ -55,5 +55,12 @@ */

{
return this.activePlayer.activeWavesurferPlugin !== undefined;
let availablePlugins = videojs.getPlugins();
let usingWavesurferPlugin = 'wavesurfer' in availablePlugins;
let usingRecordPlugin = 'record' in availablePlugins;
return usingWavesurferPlugin && !usingRecordPlugin;
}
/**
* Start playback.
*/
play() {

@@ -68,2 +75,5 @@ if (!this.playerIsUsingWavesurfer()) {

/**
* Pause playback.
*/
pause() {

@@ -70,0 +80,0 @@ if (!this.playerIsUsingWavesurfer()) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc