You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a reference from code in audioHelper.ts file
if(deviceChanged||lostDeviceIds.length){// Force a new gUM in case the underlying tracks of the active stream have changed. One// reason this might happen is when `default` is selected and set to a USB device,// then that device is unplugged or plugged back in. We can't check for the 'ended'// event or readyState because it is asynchronous and may take upwards of 5 seconds,// in my testing. (rrowland)if(this.inputDevice!==null&&this.inputDevice.deviceId==='default'){this._log.warn("Calling getUserMedia after device change to ensure that the tracks of the active device (default) have not gone stale.");this._setInputDevice(this.inputDevice.deviceId,true);}this._log.debug('#deviceChange',lostActiveDevices);this.emit('deviceChange',lostActiveDevices);}
Suggested code fix
if(deviceChanged||lostDeviceIds.length){// Force a new gUM in case the underlying tracks of the active stream have changed. One// reason this might happen is when `default` is selected and set to a USB device,// then that device is unplugged or plugged back in. We can't check for the 'ended'// event or readyState because it is asynchronous and may take upwards of 5 seconds,// in my testing. (rrowland)if((this.inputDevice===null&&this.availableInputDevices.get("default"))||(this.inputDevice&&this.inputDevice.deviceId==='default')){this._log.warn("Calling getUserMedia after device change to ensure that the tracks of the active device (default) have not gone stale.");this._setInputDevice('default',true);}this._log.debug('#deviceChange',lostActiveDevices);this.emit('deviceChange',lostActiveDevices);}
Expected behavior:
When we are switching microphone device from our system (i.e changing my default device from one inbuilt device to bluetooth device), the voice call should start taking input stream from new default device.
Actual behavior:
When we are switching microphone device from our system (i.e changing my default device from one inbuilt device to bluetooth device), input stream becomes stale and voice cannot be heard by other party on call.
Attached a code update that may be needed to fix this issue. The issue does not happen once setDevices is manually called in twilio sdk api. Once we call setDevices, inputDevice is set and from then on switching microphone device from system is no longer an issue.
or sensitive account information (API keys, credentials, etc.) when reporting this issue.
Code to reproduce the issue:
Adding a reference from code in audioHelper.ts file
Suggested code fix
Expected behavior:
When we are switching microphone device from our system (i.e changing my default device from one inbuilt device to bluetooth device), the voice call should start taking input stream from new default device.
Actual behavior:
When we are switching microphone device from our system (i.e changing my default device from one inbuilt device to bluetooth device), input stream becomes stale and voice cannot be heard by other party on call.
Attached a code update that may be needed to fix this issue. The issue does not happen once setDevices is manually called in twilio sdk api. Once we call setDevices, inputDevice is set and from then on switching microphone device from system is no longer an issue.
this.inputDevice === null || (this.inputDevice !== null && this.inputDevice.deviceId === 'default'
Software versions:
The text was updated successfully, but these errors were encountered: