Skip to content

Commit

Permalink
fix: await on device change
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Dec 23, 2024
1 parent 6c676ec commit a9627c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ export class AudioSinkManager {
await this.playAudioFor(track);
};

private handleAudioDeviceChange = (event: HMSDeviceChangeEvent) => {
private handleAudioDeviceChange = async (event: HMSDeviceChangeEvent) => {
// if there is no selection that means this is an init request. No need to do anything
if (event.isUserSelection || event.error || !event.selection || event.type === 'video') {
return;
}
this.unpauseAudioTracks();
await this.unpauseAudioTracks();
};

/**
Expand Down

0 comments on commit a9627c9

Please sign in to comment.