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

integration.js

The glomex-integration web component is the default method to integrate the player. If you use TypeScript you can get the latest type definition from integration.d.ts .

For the full documentation of the integration web component open IntegrationElement.

Examples

<script src="https://player.glomex.com/integration/1/integration.js" type="module" ></script> <link rel="stylesheet" href="https://player.glomex.com/variant/REPLACE_WITH_INTEGRATION_ID/variant.css" > <glomex-integration integration-id="REPLACE_WITH_INTEGRATION_ID" playlist-id="REPLACE_WITH_PLAYLIST_ID" ></glomex-integration>

This renders the player at the location of the <glomex-integration> tag within the current document.

<script type="module"> const playerDestination = document.querySelector('#playerDestination'); import('https://player.glomex.com/integration/1/integration.js'); const integration = document.createElement('glomex-integration'); integration.setAttribute('integration-id', 'REPLACE_WITH_INTEGRATION_ID'); integration.setAttribute('playlist-id', 'REPLACE_WITH_PLAYLIST_ID'); playerDestination.appendChild(integration); await customElements.whenDefined('glomex-integration'); const { IntegrationEvent } = integration.constructor; integration.addEventListener(IntegrationEvent.CONTENT_PLAY, () => { console.log('play'); }); integration.muted = true; integration.play(); </script>

Enumerations

Classes

Interfaces

Last updated on