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

script.js

The glomex script.js can be used to initialize the integration using a single script-tag. If you use TypeScript you can get the latest type definition from script.d.ts .

Examples

<script src="https://player.glomex.com/integration/1/script.js?integrationId=REPLACE_WITH_INTEGRATION_ID" ></script>

This will initialize the integration and append it to the DOM:

  • for friendly iframe: as a sibling of the iframe
  • for unfriendly iframe: inside the body of the iframe
  • not in iframe: as a sibling of the script-tag

All available GET parameters can be found in SetupConfig. All on GET parameters must be string names referencing functions on the window object (e.g. &onReady=myOnReady references the window.myOnReady function).

<script src="https://player.glomex.com/integration/1/script.js"> </script> <script> const integration = window.glomex.setupIntegration({ integrationId: 'REPLACE_WITH_INTEGRATION_ID' }); </script>

When no GET parameter integrationId is provided to script.js, the integration is not initialized and added directly. It then can be initialized and added later using the window.glomex.setupIntegration method.

Interfaces

References

IntegrationElementEventMap

Re-exports IntegrationElementEventMap

Last updated on