Skip to content

Commit

Permalink
fix: use retry for decode error
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Dec 10, 2024
1 parent 3905f08 commit e15ad22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/hms-video-store/src/device-manager/DeviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ export class DeviceManager implements HMSDeviceManager {
*/
// eslint-disable-next-line complexity
public autoSelectAudioOutput = async () => {
if ('ondevicechange' in navigator.mediaDevices || !this.audioInputChanged) {
// do this only after join so the earpiece would be selected at the right time
if ('ondevicechange' in navigator.mediaDevices || !this.store.getLocalPeer()?.joinedAt) {
return;
}
const { bluetoothDevice, earpiece, speakerPhone, wired } = this.categorizeAudioInputDevices();
Expand Down

0 comments on commit e15ad22

Please sign in to comment.