Skip to content

Commit

Permalink
feat(FEC-8631): bumper plugin (#224)
Browse files Browse the repository at this point in the history
Set `inBrowserFullscreenForIOS :true` by default
  • Loading branch information
yairans authored Jun 13, 2019
1 parent 0237207 commit 627dc15
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/common/utils/setup-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ function getDefaultOptions(options: PartialKPOptionsObject): KPOptionsObject {
configureLGTVDefaultOptions(defaultOptions);
configureDAIDefaultOptions(defaultOptions);
configureExternalStreamRedirect(defaultOptions);
maybeSetDefaultUiComponents(defaultOptions);
return defaultOptions;
}
Expand Down Expand Up @@ -496,6 +497,29 @@ function hasYoutubeSource(sources: PKSourcesConfigObject): boolean {
return !!(source && source[0] && source[0].mimetype === 'video/youtube');
}
/**
* Maybe set the UI component based on the runtime platform and the plugins.
* @private
* @param {KPOptionsObject} options - kaltura player options
* @returns {void}
*/
function maybeSetDefaultUiComponents(options: KPOptionsObject): void {
if (isIos() && options.plugins && options.plugins.bumper) {
const fullscreenConfig = Utils.Object.getPropertyPath(options, 'ui.components.fullscreen');
if (!fullscreenConfig) {
Utils.Object.mergeDeep(options, {
ui: {
components: {
fullscreen: {
inBrowserFullscreenForIOS: true
}
}
}
});
}
}
}

export {
printSetupMessages,
supportLegacyOptions,
Expand Down

0 comments on commit 627dc15

Please sign in to comment.