From e532d7528ca70fdb48f0395e66bb8ca0cd17ae0c Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Sat, 7 Dec 2024 21:42:27 +0530 Subject: [PATCH] fix: make decode error a terminal error --- .../src/audio-sink-manager/AudioSinkManager.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 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 121d7cdd70..b9f90c3ca8 100644 --- a/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts +++ b/packages/hms-video-store/src/audio-sink-manager/AudioSinkManager.ts @@ -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; @@ -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); };