Skip to content
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

SUP-46065: Player shows VR button based on "360" (or variations) tag #255

Closed
wants to merge 6 commits into from

Conversation

yambenari24
Copy link
Contributor

@yambenari24 yambenari24 commented Jan 28, 2025

issue:
360 tag is being concat and playing 360VR video when no needed.

fix:
support new feature: add to the configuration a tag in the vr plugin, and compare it to the metadata tags of the entry.
Tag is being transferred using the player, which transfer it to the provider.
kaltura/kaltura-player-js#915
kaltura/playkit-js-vr#110

solved:
SUP-46065

Object.assign(sourcesObject.metadata, mediaEntry.metadata);
return sourcesObject;
}

// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
public _updatePlayerVrPluginIsOn(vrTag: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setVr(..)

}

if(this._vrPluginIsOn && this._vrTag)
if (mediaEntry.metadata && typeof mediaEntry.metadata.tags === 'string' && mediaEntry.metadata.tags.split(', ').includes(this._vrTag)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split by "," and trim the value before checking includes

sourcesObject.vr = {};
}

if(this._vrPluginIsOn && this._vrTag)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this._vrPluginIsOn is not needed

sourcesObject.vr = {};

if(this._vrTag) {
if (mediaEntry.metadata && typeof mediaEntry.metadata.tags === 'string' && mediaEntry.metadata.tags.split(',').map(tag => tag.trim().includes(this._vrTag))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use some instead of map, as one good tag is needed

@yambenari24 yambenari24 closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants