Either pass the HTML element ID as the first parameter:
Copy
<div id="your_element_id"></div><script>let player = new Vidbeo.Player("your_element_id", { id: "your_video_id", width: 1280, height: 720});</script></body>
Or you could do the same with an event listener:
Copy
<div id="your_element_id"></div><script> document.addEventListener("DOMContentLoaded", function(event) { let player = new Vidbeo.Player("your_element_id", { id: "your_video_id", width: 1280, height: 720 }); }</script>
Or you might like to use the Player API to control an existing player. In which case you need to pass a reference to that HTML element as the first parameter. For example:
Copy
<iframe src="..." allowfullscreen></iframe><script> let iframe = document.querySelector("iframe"); let player = new Vidbeo.Player(iframe);</script>
There are a variety of options available. The examples above were deliberately kept simple.