Private video delivery with api.video players
The recommended way and easiest way to deliver private videos is with our in-house player. This method will allow you to delivery the private videos without additional coding efforts and without handling any extra parameters.
Embedded private video delivery to HTML
When delivering the embedded video, we will use our in-house player to playback the video. The steps for that are pretty simple as consuming public videos. In the example below you can consume it directly by passing in the private video URL into HTML:
iframes in incognito mode
When playing an embedded private video in a browser that runs in incognito mode you'll have to leverage sessions. Check out the guide for retaining a private session here.
In order to build a dynamically served private videos, you can leverage the /videos endpoint in order to get the url of the video and private token. For example the following steps are possible:
- Make a request to
curl --request GET \
--url https://ws.api.video/videos/ABC \
--header 'accept: application/json' \
--header 'authorization: Basic ZYX='
- You will get the following response, where the private token is embedded in the url:
- All you have to do now is to get the iframe and pass it as a value to the HTML that will be generated by the server. We will handle the rest.
Use api.video Android SDK player to deliver private videos
The same method can be applied to the Android SDK player we offer. Playing the private video is simple as just passing in the video id and private token.
In the example folder you'll be able to find the implementation using just video id and the private token.
Was this page helpful?