Summary
Need clarification on the official/recommended approach for embedding multiple Kaltura Player instances with different uiConfId configurations on the same page, and how to prevent CSS contamination between their skins.
Use Case
Common scenario: displaying both video and audio players for the same content with different skins/plugins (e.g., e-learning platform offering visual + audio-only formats).
Current Undocumented Pattern
We're using window.__kalturaplayerdata to preserve separate configs:
// Load bundle 1
await loadScript(embedUrl1);
const config1 = JSON.parse(JSON.stringify(window.__kalturaplayerdata));
// Setup player 1
window.__kalturaplayerdata = config1;
KalturaPlayer.setup({targetId: "player1", provider: {partnerId, uiConfId: uiConf1}});
// Load bundle 2 (overwrites __kalturaplayerdata)
await loadScript(embedUrl2);
const config2 = JSON.parse(JSON.stringify(window.__kalturaplayerdata));
// Setup player 2
window.__kalturaplayerdata = config2;
KalturaPlayer.setup({targetId: "player2", provider: {partnerId, uiConfId: uiConf2}});
Additionally, we remove config.ui.css before setup and manually inject scoped CSS to prevent global contamination:
const cssUrl = config.ui?.css;
if (config.ui) delete config.ui.css;
// Manually inject with @scope(#containerId) { ... }
Questions
- Is
window.__kalturaplayerdata a stable API or internal implementation detail?
- What's the official pattern for multiple players with different
uiConfId on one page?
- Should CSS isolation be handled manually, or is there a built-in mechanism?
- Is this pattern future-proof for v7.x releases?
- If this approach is not recommended, what's the official alternative? This use case must be solved — guidance on the correct implementation would be appreciated.
Documentation Gap
The Player v7 docs don't cover:
- Multi-player scenarios with different configs
- CSS isolation between players
window.__kalturaplayerdata usage and stability
Environment
- Player: Kaltura Player v7.238 (OVP)
- Server: api.irp2.ovp.kaltura.com
- Browsers: Chrome 118+, Firefox 128+, Edge 118+
Request
Please document the official pattern or confirm if the approach above is correct and will remain supported.
Summary
Need clarification on the official/recommended approach for embedding multiple Kaltura Player instances with different
uiConfIdconfigurations on the same page, and how to prevent CSS contamination between their skins.Use Case
Common scenario: displaying both video and audio players for the same content with different skins/plugins (e.g., e-learning platform offering visual + audio-only formats).
Current Undocumented Pattern
We're using
window.__kalturaplayerdatato preserve separate configs:Additionally, we remove
config.ui.cssbefore setup and manually inject scoped CSS to prevent global contamination:Questions
window.__kalturaplayerdataa stable API or internal implementation detail?uiConfIdon one page?Documentation Gap
The Player v7 docs don't cover:
window.__kalturaplayerdatausage and stabilityEnvironment
Request
Please document the official pattern or confirm if the approach above is correct and will remain supported.