Skip to content

Commit

Permalink
fix(uiManager): support initial forceTouchUI config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv committed Mar 5, 2018
1 parent f34ca79 commit b9e585e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
15 changes: 1 addition & 14 deletions src/common/utils/setup-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,18 +175,6 @@ function setUISeekbarConfig(data: Object, uiManager: UIManager): void {
}, "seekbar");
}

/**
* Sets the shell component whether to force touch ui.
* @param {boolean} isTouch - If is touch.
* @param {UIManager} uiManager - The ui manager.
* @returns {void}
*/
function setUITouchConfig(isTouch: ?boolean, uiManager: UIManager): void {
uiManager.setConfig({
forceTouchUI: !!isTouch
}, "shell");
}

/**
* Sets the media info on error component to the "retry" functionality.
* @param {ProviderMediaInfoObject} mediaInfo - The media info.
Expand All @@ -196,7 +184,7 @@ function setUITouchConfig(isTouch: ?boolean, uiManager: UIManager): void {
function setUIErrorOverlayConfig(mediaInfo: ProviderMediaInfoObject, uiManager: UIManager): void {
uiManager.setConfig({
mediaInfo: mediaInfo
}, "errorOverlay");
}, "error");
}

/**
Expand Down Expand Up @@ -319,7 +307,6 @@ export {
checkNativeHlsSupport,
getDefaultOptions,
setUISeekbarConfig,
setUITouchConfig,
setUIErrorOverlayConfig,
isSafari,
isIos
Expand Down
1 change: 0 additions & 1 deletion src/kaltura-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default class KalturaPlayer {
this._player = loadPlayer(options.player);
this._logger = getLogger('KalturaPlayer' + Utils.Generator.uniqueId(5));
this._uiManager = new UIManager(this._player, options.ui);
setUITouchConfig(options.ui.forceTouchUI, this._uiManager);
this._provider = new Provider(options.provider, __VERSION__);
this._uiManager.buildDefaultUI();
Object.assign(this._player, {loadMedia: (mediaInfo) => this.loadMedia(mediaInfo)});
Expand Down

0 comments on commit b9e585e

Please sign in to comment.