-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(FEC-8046): 360 support #130
Conversation
src/common/ui-wrapper.js
Outdated
@@ -38,6 +38,14 @@ class UIWrapper { | |||
this.setConfig(Utils.Object.mergeDeep({}, previewThumbnailConfig, seekbarConfig), 'seekbar'); | |||
} | |||
|
|||
setFullscreenConfig(config: ProviderMediaConfigObject): void { | |||
if (this._disabled) return; | |||
if (Utils.Object.getPropertyPath(config, 'plugins.vr')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe better to check the plugin does exist via getPlugin('vr')
src/kaltura-player.js
Outdated
@@ -77,4 +79,16 @@ export default class KalturaPlayer { | |||
set: undefined | |||
}; | |||
} | |||
|
|||
_addBindings(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is massive and too specific referring between kaltura player and a plugin.
The plugin should handle this logic and not the kaltura player.
If the problem is that the plugin cannot listen to the UI events the solution is to move the plugin manager to the kaltura player level and not bind the kaltura player to a specific plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more thing is - if we will run kaltura player in chromeless mode ({ui: {disable: true}}
) the vr navigation won't work since the ui manager isn't created and the following events will not be triggered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/common/plugins/plugins-config.js
Outdated
@@ -12,7 +12,8 @@ function evaluatePluginsConfig(options: KalturaPlayerOptionsObject): void { | |||
if (options.plugins) { | |||
const dataModel: Object = { | |||
pVersion: __VERSION__, | |||
pName: __NAME__ | |||
pName: __NAME__, | |||
target: options.targetId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target is too generic term, suggest to change to domRootElementId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/common/ui-wrapper.js
Outdated
} | ||
|
||
_setStereoConfig(config: KalturaPlayerOptionsObject): void { | ||
if (config.plugins.vr.toggleStereo || (Env.device.type && config.plugins.vr.toggleStereo !== false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I understand this condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OrenMe toggleStereo
is false
by default for desktop and true
for mobile. is it clear?
src/kaltura-player.js
Outdated
@@ -23,12 +23,14 @@ export default class KalturaPlayer { | |||
this._logger = getLogger('KalturaPlayer' + Utils.Generator.uniqueId(5)); | |||
this._uiWrapper = new UIWrapper(this._player, options.ui); | |||
this._provider = new Provider(options.provider, __VERSION__); | |||
this._uiWrapper.handleVr(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not handle this in the uiWrapper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/kaltura-player.js
Outdated
@@ -77,4 +79,16 @@ export default class KalturaPlayer { | |||
set: undefined | |||
}; | |||
} | |||
|
|||
_addBindings(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of the Changes
vrStereo
ui component when 'vr' plugin is setCheckLists