Skip to content

Commit

Permalink
fix(FEC-11037): multiple decorator exist after destroy plugin with de…
Browse files Browse the repository at this point in the history
…corator (#418)

Issue: pass the entire plugin instead of a specific function to avoid memory leak/non-relevant instance.
Solution: pass the only function that relevant and his name to verify the same plugin won't register twice.
  • Loading branch information
Yuvalke authored Feb 28, 2021
1 parent ca577f4 commit 9e9685c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kaltura-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import {
getLogger,
loadPlayer,
LogLevel,
registerEngineDecoratorProvider,
TextStyle,
ThumbnailInfo,
Track,
Utils
Utils,
EngineDecoratorProvider
} from '@playkit-js/playkit-js';
import {PluginReadinessMiddleware} from './common/plugins/plugin-readiness-middleware';
import {ThumbnailManager} from './common/thumbnail-manager';
Expand Down Expand Up @@ -809,7 +809,7 @@ class KalturaPlayer extends FakeEventTarget {
}

if (typeof plugin.getEngineDecorator === 'function') {
registerEngineDecoratorProvider(plugin);
this._localPlayer.registerEngineDecoratorProvider(new EngineDecoratorProvider(plugin));
}
}
} else {
Expand Down

0 comments on commit 9e9685c

Please sign in to comment.