Embed a player on your site

Also asked as: embed code · add to my website · install the script · iframe

Copy the embed code from the player editor and paste it into your page's HTML. It takes the shape of a script tag plus a container.

<script src="https://player.tru.guide/bootstrap-v3.js"></script>
<div data-widget-id="YOUR_PLAYER_ID"></div>

The script finds any element carrying data-widget-id and renders the player into it.

Attributes you can set

AttributePurpose
data-widget-idRequired. Identifies which player to load.
data-widthOverrides the rendered width.
data-heightOverrides the rendered height.
data-player-versionPins a specific runtime version.
data-seo-prerenderOpts the embed into prerendered markup for crawlers.

You can put more than one player on a page - each container needs its own data-widget-id, and one script tag serves all of them.

Always copy the snippet from the player editor rather than retyping it, so the script URL and player ID are exactly right.