|
@@ -47,14 +47,11 @@ PCMPlayer.prototype.getTypedArray = function () {
|
|
|
};
|
|
|
|
|
|
PCMPlayer.prototype.createContext = function () {
|
|
|
- var handleSuccess = function (stream) {
|
|
|
- this.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
|
|
- this.gainNode = this.audioCtx.createGain();
|
|
|
- this.gainNode.gain.value = 1;
|
|
|
- this.gainNode.connect(this.audioCtx.destination);
|
|
|
- this.startTime = this.audioCtx.currentTime;
|
|
|
- }
|
|
|
- navigator.mediaDevices.getUserMedia({audio: true, video: true}).then(handleSuccess);
|
|
|
+ this.audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
|
|
+ this.gainNode = this.audioCtx.createGain();
|
|
|
+ this.gainNode.gain.value = 1;
|
|
|
+ this.gainNode.connect(this.audioCtx.destination);
|
|
|
+ this.startTime = this.audioCtx.currentTime;
|
|
|
};
|
|
|
|
|
|
PCMPlayer.prototype.isTypedArray = function (data) {
|