Skip to content

Commit

Permalink
fix: make decode error a terminal error
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Dec 7, 2024
1 parent 6ddc8ae commit e532d75
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,7 @@ export class AudioSinkManager {
HMSLogger.d(this.TAG, 'Track updated', `${track}`);
};

private handleTrackAdd = async ({
track,
peer,
callListener = true,
}: {
track: HMSRemoteAudioTrack;
peer: HMSRemotePeer;
callListener?: boolean;
}) => {
private handleTrackAdd = async ({ track, peer }: { track: HMSRemoteAudioTrack; peer: HMSRemotePeer }) => {
const audioEl = document.createElement('audio');
audioEl.style.display = 'none';
audioEl.id = track.trackId;
Expand All @@ -137,7 +129,7 @@ export class AudioSinkManager {
this.audioSink?.append(audioEl);
this.outputDevice && (await track.setOutputDevice(this.outputDevice));
audioEl.srcObject = new MediaStream([track.nativeTrack]);
callListener && this.listener?.onTrackUpdate(HMSTrackUpdate.TRACK_ADDED, track, peer);
this.listener?.onTrackUpdate(HMSTrackUpdate.TRACK_ADDED, track, peer);
await this.handleAutoplayError(track);
};

Expand Down

0 comments on commit e532d75

Please sign in to comment.