Skip to Content
The new glomex player is released! 🎉View upgrade guide

Variable: sharedContext

const sharedContext: SharedContext

Module-level singleton shared by every <glomex-integration> instance on the page.

Publishers obtain it via dynamic import of integration.js to ensure they get the same singleton instance as the running player:

const { sharedContext } = await import('https://player.glomex.com/integration/1/integration.js');

When using the React wrapper, use @glomex/integration-react  instead:

import { getSharedContext } from '@glomex/integration-react'; const sharedContext = await getSharedContext();
Last updated on