Skip to main content

Getting started JS


  • Knowledge of HTML
  • Basic understanding of JavaScript

Adding a video#

Load the JavaScript SDK#

Before you can use our SDK you have to add the JavaScript library to your page, preferably in the <head>.

<script src="//"></script>

Setup the HTML#

Once that is loaded on your page you can embed any desired video or livestream in your page.

The way it works is that you have to tell the player where it should place the video. In this example it needs to be placed in the <div> element with id "video-wrapper".

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script src="//"></script>
<h1>Video webpage</h1>
<div id="video-wrapper" style="height: 480px"></div>

Loading the video#

So we need to have the link to the video (you can get that from VDO-X or the API) and we are ready to emebed the video.

We start with finding the "video-wrapper" element, and then tell the PrivacyPlayer that it should mount the video in there.

let video_wrapper = document.querySelector("#video-wrapper")
let player = new PrivacyPlayer(
video_wrapper, true, true

The result should look like this (screenshot, not actual player): player screenshot