Quickstart
Embed the player as a custom element or as an iframe
VTurb's video player was built to deliver customized and personalized playback experiences.
Basic implementation
Every embedded player instance comes with a unique ID that identifies it and lets you manipulate it. Paste one of these into your page:
<vturb-smartplayer
id="vid-PLAYER_ID"
style="display: block; margin: 0 auto; width: 100%"
></vturb-smartplayer>
<script
src="https://scripts.converteai.net/ACCOUNT_ID/players/PLAYER_ID/v4/player.js"
async
></script>
Replace ACCOUNT_ID and PLAYER_ID with the values from your own embed code.
The id attribute is how you reach the player to attach events and call methods. On the custom
element it carries the vid- prefix; on the iframe, the ifr_ prefix.
If the page has a single embed, you can skip the ID entirely and use document.querySelector("vturb-smartplayer").
Where to go next
Both embed modes expose the same events, but you reach them differently — see Element vs iframe. The full list of events is in the events reference, and Examples puts them to work.