Skip to content

Commit

Permalink
fix: remove test logs
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Mar 27, 2024
1 parent 9e82171 commit be4c38c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit be4c38c

Please sign in to comment.