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
| Attribute | Purpose |
|---|---|
data-widget-id | Required. Identifies which player to load. |
data-width | Overrides the rendered width. |
data-height | Overrides the rendered height. |
data-player-version | Pins a specific runtime version. |
data-seo-prerender | Opts 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.