[lib.audio-manager] chromium/webkit final patch

This commit is contained in:
xdrm-brackets 2018-04-10 01:07:57 +02:00
parent baf7804857
commit 066cae054e
1 changed files with 6 additions and 5 deletions

View File

@ -54,7 +54,6 @@ export default class AudioManager{
/* (5) Bind network controller to send() function */ /* (5) Bind network controller to send() function */
this.network.out.onaudioprocess = this.send.bind(this); this.network.out.onaudioprocess = this.send.bind(this);
/*Chrome fix*/this.network.out.connect(this.output);
/* (6) Set up our filters' parameters */ /* (6) Set up our filters' parameters */
this.setUpFilters(); this.setUpFilters();
@ -162,6 +161,7 @@ export default class AudioManager{
/* (2) Also link to analyser */ /* (2) Also link to analyser */
this.input.connect(this.analyser); this.input.connect(this.analyser);
/*Chrome fix*/this.network.out.connect(this.output);
/* (3) Get first filter */ /* (3) Get first filter */
let first_filter = this.filters.voice_clarity; let first_filter = this.filters.voice_clarity;
@ -403,7 +403,7 @@ export default class AudioManager{
}.bind(this); }.bind(this);
/* (3) Debug */ /* (3) Debug */
this.ws.onopen = () => gs.get.audio_conn !== 2 && (gs.get.audio_conn = 1); // listening this.ws.onopen = () => (gs.get.audio_conn !== 2 && (gs.get.audio_conn = 1)); // listening
this.ws.onclose = () => ( gs.get.audio_conn = null ); // disconnected this.ws.onclose = () => ( gs.get.audio_conn = null ); // disconnected
@ -424,9 +424,10 @@ export default class AudioManager{
this.recorder = new MediaRecorder(stream); this.recorder = new MediaRecorder(stream);
this.bindRecorderStream(stream); this.recorder.onstart = function(){
this.bindRecorderStream(stream);
this.recorder.onstart = () => console.warn('[audio] recording'); console.warn('[audio] recording');
}.bind(this);
this.recorder.onstop = () => { this.recorder.onstop = () => {
this.recorder.stream.getTracks().map( t => t.stop() ); this.recorder.stream.getTracks().map( t => t.stop() );