Skip to content

Commit

Permalink
fix: add to paused tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed May 21, 2024
1 parent f57c04b commit d2f1b01
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,7 @@ export class AudioSinkManager {
}

private handleAudioPaused = async (event: any) => {
const audioEl = event.target as HTMLAudioElement;
//@ts-ignore
const track = audioEl.srcObject?.getAudioTracks()[0];
if (!track?.enabled) {
// No need to play if already disabled
return;
}
// this means the audio paused because of external factors(headset removal)
// this means the audio paused because of external factors(headset removal, incoming phone call)
HMSLogger.d(this.TAG, 'Audio Paused', event.target.id);
const audioTrack = this.store.getTrackById(event.target.id);
if (audioTrack) {
Expand Down

0 comments on commit d2f1b01

Please sign in to comment.