From baf78048575ab7ca17685934f011e79682fd0a4c Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 10 Apr 2018 00:56:10 +0200 Subject: [PATCH] [lib.audio-manager] chromium/webkit fix + revert to MediaRecorder + removed debugs --- parcel/lib/audio-manager.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/parcel/lib/audio-manager.js b/parcel/lib/audio-manager.js index d12590d..327b098 100644 --- a/parcel/lib/audio-manager.js +++ b/parcel/lib/audio-manager.js @@ -191,8 +191,6 @@ export default class AudioManager{ /* (1) Bind audio stream ---------------------------------------------------------*/ - console.log('BINDING', _stream); - /* (1) bind our audio stream to our source */ this.input = this.ctx.createMediaStreamSource(_stream); @@ -424,20 +422,20 @@ export default class AudioManager{ /* (2) Set our streaming binding function */ let streaming_binding = function(stream){ - // this.recorder = new MediaRecorder(stream); + this.recorder = new MediaRecorder(stream); this.bindRecorderStream(stream); - // this.recorder.onstart = () => console.warn('[audio] recording'); + this.recorder.onstart = () => console.warn('[audio] recording'); - // this.recorder.onstop = () => { - // this.recorder.stream.getTracks().map( t => t.stop() ); - // this.recorder = null; - // console.warn('[audio] stopped recording'); - // }; + this.recorder.onstop = () => { + this.recorder.stream.getTracks().map( t => t.stop() ); + this.recorder = null; + console.warn('[audio] stopped recording'); + }; - // // start recording - // this.recorder.start(); + // start recording + this.recorder.start(); }.bind(this);