VOD Player integration
To integrate the Dejacast player for securely embedding protected VOD content into a website, follow these steps:
- Access the Embed Code:
Copy the following basic embed code structure and modify it by replacing the placeholders with the appropriate values.
<script type="text/javascript" src="https://app.dejacast.com/player/[PLAYER_SLUG]/v[VIDEO_UUID].js?playbackURL=[VOD_PLAYBACK_URL]"></script>
- Understanding the Variables:
Each part of the embed code contains dynamic variables that you will need to replace with specific information related to your player and the video.
[PLAYER_SLUG]: This is the unique identifier for the video player you want to use. You can obtain this from the Dejacast platform by navigating to Dashboard -> Settings -> Players, on the ID column. You can also click the player's name to open its settings, where the Player ID is displayed.
[VIDEO_UUID]: This represents the UUID of the video you are embedding. You can find this either by navigating to Dashboard -> Media Library and opening the video (the UUID is shown in the video details), or by using the Videos API.
[VOD_PLAYBACK_URL]: The video playback URL must be generated using the Dejacast API for each specific video embed session. The URL should be URL-encoded before using it in the embed code. Detailed instructions on generating the VOD playback URL can be found in the API documentation here.
- Generate the VOD Playback URL:
To get the [VOD_PLAYBACK_URL], you’ll need to make a request to the Dejacast API. Follow the steps in the API documentation to retrieve the playback URL. Make sure the URL is encoded correctly before inserting it into the embed code.
- Embed the Code:
Once you have all the necessary values, replace the placeholders in the embed code with the actual values. For example:
<script type="text/javascript" src="https://app.dejacast.com/player/examplePlayer/vExampleUUID.js?playbackURL=https%3A%2F%2Fexample.com%2FVOD_Url"></script>
- Integrate the Embed Code on Your Website:
Paste the modified embed code into the HTML source of your website, where you want the VOD player to appear.
By following these steps, you’ll successfully integrate the Dejacast VOD player into your website. Make sure to check the settings and test the player before moving to production.