iFrame Integration
While the glomex-integration web component is our recommended integration method, the iFrame approach provides an alternative when you’re unable to use external JavaScript code.
When using the iFrame integration, we cannot guarantee:
- Correct sizing of the player
- Full URL availability in reporting and monetization
- Advanced customization capabilities
If you must use an iFrame, ensure that all attributes from the embed code below are included in your iFrame.
iFrame Embed Code
The following code creates a responsive embed that sizes the player to fill the entire width of its container while maintaining a 16:9 aspect ratio. This implementation includes all required permissions to support the full range of player features.
<div style="width: 100%; aspect-ratio: 16/9;">
<iframe
style="width:100%; height:100%;"
allow="encrypted-media; accelerometer; autoplay; clipboard-write; gyroscope; picture-in-picture; payment"
allowfullscreen
frameborder="0"
scrolling="no"
loading="lazy"
referrerpolicy="unsafe-url"
src="https://player.glomex.com/integration/1/integration.html?integrationId=REPLACE_WITH_INTEGRATION_ID&playlistId=REPLACE_WITH_PLAYLIST_ID"
></iframe>
</div>The allow="encrypted-media" permission is critical for playing DRM-protected videos. Without this permission, premium content that uses Digital Rights Management will fail to play in your iframe embed.
Always include the loading="lazy" attribute to ensure the iframe loads efficiently and only when needed.
Required Parameters
Integration ID
An Integration ID represents a specific player configuration including:
- Color settings
- Autoplay behavior
- Overall player appearance
You can create and manage player configurations at exchange.glomex.com → Manage → Player.
Example: integrationId=id1234567890
Playlist ID
A Playlist ID can reference one of three content types:
| Type | Format | Example |
|---|---|---|
| Single Video | v-[numbers] | playlistId=v-123456789 |
| Playlist | pl-[numbers] | playlistId=pl-123456789 |
| Curated Playlist | cl-[numbers] | playlistId=cl-123456789 |
| Contextual Playlist | auto | playlist-id="auto" |
Sandbox Policy
If you’re implementing a sandbox policy for enhanced security, include the following values to ensure full functionality:
sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"The sandbox attribute restricts the capabilities of the iframe. The values above provide the minimum permissions needed for the glomex player to function correctly.