Skip to content

Commit

Permalink
fix: send krisp event if usage > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 authored Mar 21, 2024
1 parent f802c94 commit 4d8dc6a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/hms-video-store/src/transport/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,10 @@ export default class HMSTransport {
this.joinParameters = undefined;
HMSLogger.d(TAG, 'leaving in transport');
try {
this.eventBus.analytics.publish(
AnalyticsEventFactory.getKrispUsage(this.pluginUsageTracker.getPluginUsage('HMSKrispPlugin')!),
);
const usage = this.pluginUsageTracker.getPluginUsage('HMSKrispPlugin');
if (usage) {
this.eventBus.analytics.publish(AnalyticsEventFactory.getKrispUsage(usage));
}
this.state = TransportState.Leaving;
this.publishStatsAnalytics?.stop();
this.subscribeStatsAnalytics?.stop();
Expand Down

0 comments on commit 4d8dc6a

Please sign in to comment.