Skip to content

Commit

Permalink
feat(FEC-10076): add support for dynamic injection (#351)
Browse files Browse the repository at this point in the history
Expose the new [`UIManager.addComponent`](kaltura/playkit-js-ui#538) api
  • Loading branch information
yairans authored Aug 19, 2020
1 parent 3c91380 commit b9e9a31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/common/ui-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ class UIWrapper {
this._uiManager.setConfig(config, componentAlias);
}

/**
* Add a component dynamically
*
* @param {KPUIComponent} component - The component to add
* @returns {Function} - Removal function
*/
addComponent(component: KPUIComponent): Function {
return this._uiManager.addComponent(component);
}

_resetErrorState(): void {
this.setConfig({hasError: false}, 'engine');
}
Expand Down

0 comments on commit b9e9a31

Please sign in to comment.