Skip to content

Feat/kaltura v7 player#12434

Open
tweenn wants to merge 7 commits intocarbon-design-system:mainfrom
tweenn:feat/kaltura-v7-player
Open

Feat/kaltura v7 player#12434
tweenn wants to merge 7 commits intocarbon-design-system:mainfrom
tweenn:feat/kaltura-v7-player

Conversation

@tweenn
Copy link
Contributor

@tweenn tweenn commented Mar 3, 2026

Description:

Cloned the whole video-player to a video-player-v7 tag in order to integrate the new kaltura V7 player as a component;
The idea is to create a new standalone player that respects all existing properties from the previous one in order to keep full compatibility on the consuming componentes (leadspace-with-video, intersection-cards, etc.) - while consuming new endpoints and simplifying the process.

Glossary:

mediacenter-loader: Mediacenter's managed script that will handle the api and embed of the multiple players (video/audio/playlist/reels) available in mediacenter and the streaming platforms;
mediacenter-loader-api: The api functionality within the above script
mediacenter-player-plugin: Mediacenter's managed script that will handle customization and extra functionalities built on top of the out of the box vendor player;

Changelog:

Kaltura Service V7 [packages/services-store/src/actions/kalturaPlayerAPIv7.ts]
  • Added the ability to:
    • Pass a param to use a specific loader environment (developmennt, latest & next);
    • Pass a param related to the Kaltura Partner ID (mediacenter's environment, as we have public prod, learning prod and entitled prod, alongside dev and stage envs for all 3);
    • Pass a param related to the Kaltura UiConfId (aka the mediacenter player ID);

Description:
The above 3 parameters were previously hardcoded in the service and expected to always be latest version, public-production env and northstar-player - which are the fallback values if nothing is sent;
The current components will keep not passing a value to the service and falling back to default values;
The reason to this change is that in the near future, we're able to enhance this section without breaking anything;

  • Offloaded the "getThumbnailUrl" to the mediacenter-loader-api;

Description:
The thumbnail url string was processed within the service, now it just expect whatever value the mediacenter-loader-api returns;

  • Offloaded the "api" [aka media properties] request to the mediacenter-loader-api;

Description:
The service used to do a complex request to the player api regarding media properties and store the answer as an object in itself (in memory);
Now it just expect (with a simple call) whatever value the mediacenter-loader-api returns;
The mediacenter-loader-api also cache the request in memory;

  • Removed the "getMediaDuration", "getMediaDurationFormatted" and "formatTime":

Description:
Those two functionalities did the same exact thing through different ways, one use the v2 player api (that used INTL behind the scenes), the other used INTL directly;
And all three were not being used - as the components favored another function that did the same processing with extra information called formatVideoDuration inside utilities/src/utilities/formatVideoCaption/formatVideoCaption.js;

This was utter nonsense!

  • Offloaded the "fireEvent" and metrics processing part of the player to the mediacenter-player-plugin

Description:
As agreed, the metrics portion of the player will be handed by the mediacenter-player-plugin and not the carbon-web-component anymore;

  • Refactored the "embedMedia"

Description:
Removed the metrics section (as part of the previous item);
Kept the legacy "fake promisse" handling for the not promise-type response from V2 player;
Offloaded many configuration properties to simpler terms, like "playerType: background" instead of manually turning off the closed-captions, title-menu, controls, call-to-actions and other options;
Incorporated the first 3 items (environment, partner-id and player-uiconfid);
Left for future enhancement the place where the different player-types will change configuration settings;


Cloned all the player files
  • Services:
    • packages/services/src/services/KalturaPlayerV7/KalturaPlayer.js
    • packages/services/src/services/KalturaPlayerV7/**/*
  • Store:
    • packages/services-store/src/actions/kalturaPlayerAPIv7.ts
    • packages/services-store/src/reducers/kalturaPlayerAPIv7.ts
    • packages/services-store/src/types/kalturaPlayerAPIv7.ts
  • Components:
    • packages/web-components/src/components/video-player-v7/**/*

Notes:

I've found some interesting behavior in the "AutoPlay" functionalities described in this video;

And also found something very interesting in the V2 component - that I just passed over to V7 although I didn't like it:
[ Link ]

const { lc } = await LocaleAPI.getLocale();
this.lc = lc;

[...]
if (this.lc.toLowerCase() === 'en') {
  mediaTitle = this?.['customVideoName'] || this?.['caption'];
} else {
  mediaTitle = ' ';
}

Basically if the video gets the title changed, it will only show IF the page locale is english, wich absolutely defeat the purpose of having that property available for translation.

@tweenn tweenn requested a review from a team as a code owner March 3, 2026 17:53
@tweenn tweenn requested review from Valentin-Sorin-Nicolae, bruno-amorim and marcelojcs and removed request for a team March 3, 2026 17:53
@netlify
Copy link

netlify bot commented Mar 3, 2026

Deploy Preview for incomparable-wisp-8d6771 ready!

Name Link
🔨 Latest commit 471fad5
🔍 Latest deploy log https://app.netlify.com/projects/incomparable-wisp-8d6771/deploys/69a82be1bfbcb2000805568e
😎 Deploy Preview https://deploy-preview-12434--incomparable-wisp-8d6771.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Thanks for your submission! We ask that you all sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


1 out of 2 committers have signed the DCO.
✅ (marcelojcs)[https://github.com/marcelojcs]
@felipe Zuntini Abella
Felipe Zuntini Abella seems not to be a GitHub user. You need a GitHub account to be able to sign the DCO. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the DCO Assistant Lite bot.

@netlify
Copy link

netlify bot commented Mar 4, 2026

Deploy Preview for ibm-dotcom-web-components ready!

Name Link
🔨 Latest commit 471fad5
🔍 Latest deploy log https://app.netlify.com/projects/ibm-dotcom-web-components/deploys/69a82be0cf8e1e00087a3bab
😎 Deploy Preview https://deploy-preview-12434--ibm-dotcom-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants