diff --git a/src/common/plugins/plugins-config-store.ts b/src/common/plugins/plugins-config-store.ts index 8600c3d30..7c8d2d0ce 100644 --- a/src/common/plugins/plugins-config-store.ts +++ b/src/common/plugins/plugins-config-store.ts @@ -52,7 +52,9 @@ const defaultConfig: dataStoreType = { partnerId: '{{partnerId}}', uiConfId: '{{uiConfId}}', entryId: '{{entryId}}', - embedBaseUrl: '{{embedBaseUrl}}' + embedBaseUrl: '{{embedBaseUrl}}', + embedWidth: '{{embedWidth}}', + embedHeight: '{{embedHeight}}' } }; diff --git a/src/common/plugins/plugins-config.ts b/src/common/plugins/plugins-config.ts index a16432cc4..81fe49e3c 100644 --- a/src/common/plugins/plugins-config.ts +++ b/src/common/plugins/plugins-config.ts @@ -131,6 +131,12 @@ const getModel = (options: Partial): any => { } }); Utils.Object.mergeDeep(dataModel, entryDataModel); + + const { uiConfData } = options; + if (uiConfData) { + dataModel['embedWidth'] = uiConfData.width; + dataModel['embedHeight'] = uiConfData.height; + } return dataModel; }; diff --git a/src/types/kaltura-player-options.ts b/src/types/kaltura-player-options.ts index 9f1998cd4..5f122be67 100644 --- a/src/types/kaltura-player-options.ts +++ b/src/types/kaltura-player-options.ts @@ -35,6 +35,7 @@ export interface KalturaPlayerConfig { viewability: ViewabilityConfig; network?: NetworkConfig; abr?: PKAbrConfigObject; + uiConfData?: UIConfDataObject; } export type PartialKPOptionsObject = Omit< @@ -52,3 +53,9 @@ export interface LegacyPartialKPOptionsObject { provider: ProviderOptionsObject; ui?: UiConfig; } + +export interface UIConfDataObject { + width?: string; + height?: string; + name?: string; +}