Skip to content

Commit

Permalink
fix(FEC-11475): revert api in uiWrapper of Manager for backward compa…
Browse files Browse the repository at this point in the history
…tibility (#483)

API that was removed in FEC-11475 in uiWrapper was used also externally (i.e Reshet).
Reverted the API and inside using the new API in KalturaPlayer
  • Loading branch information
RoyBregman committed Aug 22, 2021
1 parent 1f2535a commit 1f5d4a7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/common/ui-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ class UIWrapper {
static _logger = getLogger('UIWrapper');
_uiManager: UIManager;
_disabled: boolean = false;
_player: KalturaPlayer;

constructor(player: KalturaPlayer, options: KPOptionsObject) {
this._player = player;
const config: KPUIOptionsObject = options.ui;
if (config.disable) {
this._disabled = true;
Expand Down Expand Up @@ -79,6 +81,34 @@ class UIWrapper {
return this._uiManager.addComponent(replaceComponent);
}

/**
* Deprecated - left for backward compatibility - use instead registerService in KalturaPlayer
* @param {string} name - the manager name
* @param {Object} manager - the manager object
* @returns {void}
*/
registerManager(name: string, manager: Object): void {
this._player.registerService(name, manager);
}

/**
* Deprecated - left for backward compatibility - use instead getService in KalturaPlayer
* @param {string} name - the manager name
* @returns {Object} - the manager object
*/
getManager(name: string): Object | void {
return this._player.getService(name);
}

/**
* Deprecated - left for backward compatibility - use instead hasService in KalturaPlayer
* @param {string} name - the manager name
* @returns {boolean} - if the manager exist
*/
hasManager(name: string): boolean {
return this._player.hasService(name);
}

setLoadingSpinnerState(show: boolean): void {
this.setConfig({show: show}, 'loading');
}
Expand Down

0 comments on commit 1f5d4a7

Please sign in to comment.