text: /**
   * lamejs plugin for videojs-record
   * @version 2.1.1
   * @see https://github.com/collab-project/videojs-record
   * @copyright 2014-2018 Collab
   * @license MIT
   */
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.lamejs = f()}})(function(){var define,module,exports;return (function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(require,module,exports){
  "use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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}function _inherits(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)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),RecordEngine=videojs.getComponent("RecordEngine"),LamejsEngine=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,RecordEngine),_createClass(t,[{key:"setup",value:function(e,t,o){this.inputStream=e,this.mediaType=t,this.debug=o;var n={debug:this.debug,sampleRate:this.sampleRate};this.audioContext=new AudioContext,this.audioSourceNode=this.audioContext.createMediaStreamSource(this.inputStream),this.processor=this.audioContext.createScriptProcessor(16384,1,1),n.sampleRate=this.audioContext.sampleRate,this.engine=new Worker(this.audioWorkerURL),this.engine.onmessage=this.onWorkerMessage.bind(this),this.engine.postMessage({cmd:"init",config:n})}},{key:"start",value:function(){this.processor.onaudioprocess=this.onAudioProcess.bind(this),this.audioSourceNode.connect(this.processor),this.processor.connect(this.audioContext.destination)}},{key:"stop",value:function(){this.audioSourceNode.disconnect(),this.processor.disconnect(),this.processor.onaudioprocess=null,this.inputStream.getAudioTracks().forEach(function(e){return e.stop()}),this.audioContext.close(),this.engine.postMessage({cmd:"finish"})}},{key:"onWorkerMessage",value:function(e){switch(e.data.cmd){case"end":this.onStopRecording(new Blob(e.data.buf,{type:"audio/mp3"}));break;case"error":this.player().trigger("error",e.data.error);break;default:this.player().trigger("error",e.data)}}},{key:"onAudioProcess",value:function(e){var t=e.inputBuffer.getChannelData(0);this.engine.postMessage({cmd:"encode",buf:t})}}]),t}();videojs.LamejsEngine=LamejsEngine,exports["default"]=LamejsEngine;
  
  },{}]},{},[1])(1)
  });