UNPKG

react-mic-record

Version:
27 lines (19 loc) 767 B
"use strict"; exports.__esModule = true; 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; }(); exports.default = AudioContext; module.exports = exports["default"];