Javascript SDK

Video Channels can be embedded using a Javascript and HTML snippet, simply include it in your web page.

The JavaScript SDK scans the page on load, loading into each <div id="PLAYER_ID"></div> a player instance based on element id attribute.

- Step 1: Include the JavaScript SDK on your page once (replace the id with your real player id).


<script>
  (function (d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s);
    js.id = id;
    js.src = "https://player.ex.co/player/PLAYER_ID";
    fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'JS-ID'));
</script>

- Step 2: Place the following HTML snippet wherever you want the player to appear on your page (replace the id with your real player id).


<div id="PLAYER_ID"></div>



NOTE: The player will inherit the width and height of its parent element. To ensure that the player receives the correct size, see that the parent element has the intended width and height.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us how can we improve this article!

Select atleast one of the reasons

Feedback sent

We apprciate your effort and will try to fix the article