ngDoCheck() {
...
// mic ON / OFF
if (this.service_mic.isMic === true && !this.service_mic.stream && this.service_mic.isUserMedia === false) {
this.service_mic.on((source) => {
this.service_gain.connect(source);
});
} else if (this.service_mic.isMic === false && this.service_mic.stream) {
this.service_mic.off();
this.service_gain.disconnect(this.service_mic.source);
}
...