UNPKG

react-mic-record

Version:
22 lines (16 loc) 691 B
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var AudioContext = function () { function AudioContext() { _classCallCheck(this, AudioContext); this.audioCtx = new (window.AudioContext || window.webkitAudioContext)(); this.analyser = this.audioCtx.createAnalyser(); } AudioContext.prototype.getAudioContext = function getAudioContext() { return this.audioCtx; }; AudioContext.prototype.getAnalyser = function getAnalyser() { return this.analyser; }; return AudioContext; }(); export { AudioContext as default };