Skip to content

Commit

Permalink
fix: add test alert
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Oct 1, 2024
1 parent f8be05b commit 5fcae20
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { HMSAudioTrackSettings as IHMSAudioTrackSettings } from '../../interface
import { HMSAudioPlugin, HMSPluginSupportResult } from '../../plugins';
import { HMSAudioPluginsManager } from '../../plugins/audio';
import Room from '../../sdk/models/HMSRoom';
import { stringifyMediaStreamTrack } from '../../utils/json';
import HMSLogger from '../../utils/logger';
import { getAudioTrack, isEmptyTrack } from '../../utils/track';
import { TrackAudioLevelMonitor } from '../../utils/track-audio-level-monitor';
Expand Down Expand Up @@ -114,6 +115,7 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
}),
);
} else {
alert('replacing audio track');
HMSLogger.d(this.TAG, 'On visibile replacing track as it is not publishing');
await this.replaceTrackWith(this.settings);
this.eventBus.analytics.publish(
Expand Down Expand Up @@ -155,6 +157,7 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
this.tracksCreated.add(newTrack);
HMSLogger.d(this.TAG, 'replaceTrack, Previous track stopped', prevTrack, 'newTrack', newTrack);
await this.updateTrack(newTrack);
alert(stringifyMediaStreamTrack(newTrack));
} catch (e) {
// Generate a new track from previous settings so there will be audio because previous track is stopped
const newTrack = await getAudioTrack(this.settings);
Expand Down

0 comments on commit 5fcae20

Please sign in to comment.