Skip to content

Commit

Permalink
fix: cleanup order
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Sep 24, 2024
1 parent 9cdc533 commit d5896a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
*/
async cleanup() {
this.removeTrackEventListeners(this.nativeTrack);
await this.mediaStreamPluginsManager.cleanup();
await this.pluginsManager.cleanup();
super.cleanup();
this.transceiver = undefined;
await this.pluginsManager.cleanup();
await this.mediaStreamPluginsManager.cleanup();
this.processedTrack?.stop();
this.isPublished = false;
if (isBrowser && isMobile()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ export class HMSMediaStreamPluginsManager {
}

async cleanup() {
this.plugins.forEach(plugin => plugin.stop());
this.removePlugins(Array.from(this.plugins));
}
}

0 comments on commit d5896a8

Please sign in to comment.