From be4c38c10655f876298934beb0f36bb89b880282 Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Wed, 27 Mar 2024 17:32:40 +0530 Subject: [PATCH] fix: remove test logs --- .../audio-sink-manager/AudioSinkManager.ts | 24 +++++++------------ .../src/device-manager/DeviceManager.ts | 1 - 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts b/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts index 41d1965714..c1bd0302e2 100644 --- a/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts +++ b/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts @@ -310,29 +310,21 @@ export class AudioSinkManager { const localAudioTrack = this.store.getLocalPeer()?.audioTrack; if (localAudioTrack && earpiece) { const externalDeviceID = bluetoothDevice?.deviceId || wired?.deviceId || speakerPhone?.deviceId; - HMSLogger.d(this.TAG, 'externalDeviceID', externalDeviceID, bluetoothDevice); + HMSLogger.d(this.TAG, 'externalDeviceID', externalDeviceID); // already selected appropriate device if (localAudioTrack.settings.deviceId === externalDeviceID) { return; } if (!this.earpieceSelected) { - await localAudioTrack.setSettings({ deviceId: earpiece?.deviceId }, true).catch(console.error); + await localAudioTrack.setSettings({ deviceId: earpiece?.deviceId }, true); this.earpieceSelected = true; } - await localAudioTrack - .setSettings( - { - deviceId: externalDeviceID, - }, - true, - ) - .catch(console.error); - HMSLogger.d(this.TAG, 'applied device id', localAudioTrack.getMediaTrackSettings().deviceId); - this.eventBus.deviceChange.publish({ - devices: this.deviceManager.getDevices(), - selection: this.deviceManager.getCurrentSelection().audioInput, - type: 'audioInput', - }); + await localAudioTrack.setSettings( + { + deviceId: externalDeviceID, + }, + true, + ); } }; } diff --git a/packages/hms-video-store/src/device-manager/DeviceManager.ts b/packages/hms-video-store/src/device-manager/DeviceManager.ts index b2231842d9..926c341573 100644 --- a/packages/hms-video-store/src/device-manager/DeviceManager.ts +++ b/packages/hms-video-store/src/device-manager/DeviceManager.ts @@ -134,7 +134,6 @@ export class DeviceManager implements HMSDeviceManager { const id = this.createIdentifier(device); return id === audioDevice; }); - console.log('local peer audio device', localPeer?.audioTrack?.getMediaTrackSettings().deviceId); const videoSelection = this.videoInput.find(device => this.createIdentifier(device) === videoDevice); return { audioInput: audioSelection,