Skip to content

Commit

Permalink
fix: handle plugin failure on migration
Browse files Browse the repository at this point in the history
  • Loading branch information
raviteja83 committed Aug 1, 2024
1 parent 2a64652 commit 56023c0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
HMSVideoTrackSettings as IHMSVideoTrackSettings,
ScreenCaptureHandle,
} from '../../interfaces';
import { HMSException } from '../../internal';
import { HMSPluginSupportResult, HMSVideoPlugin } from '../../plugins';
import { HMSMediaStreamPlugin, HMSVideoPluginsManager } from '../../plugins/video';
import { HMSMediaStreamPluginsManager } from '../../plugins/video/HMSMediaStreamPluginsManager';
Expand Down Expand Up @@ -100,7 +101,9 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
);
if (this.pluginsManager.pluginsMap.size > 0) {
this.pluginsManager.pluginsMap.forEach(value => {
track.addPlugin(value);
track
.addPlugin(value)
.catch((e: HMSException) => HMSLogger.e(this.TAG, 'Plugin add failed while migrating', value, e));
});
}
if (this.mediaStreamPluginsManager.plugins.size > 0) {
Expand Down

0 comments on commit 56023c0

Please sign in to comment.