Deliver resolution based on payment

My web app is based on a payment to rent a video for some days. Now you can pay for 1080p or 4k, if you buy the 1080p version you should see up to 1080p but now you can see the 4k too if your screen supports it. Is there a way to handle this ? If you pay for the 1080p you can see up to 1080p otherwise if you pay for 4k you can see up to 4k.

This is a good question.

So, by default - the HLS manifest will include all versions of the video from 240p to 4k. I have a few options for you - 2 are possible today, one would require a bit of dev work on our side.

  1. The “easy” option would be to upload a 1080p version for “all” and a 4k version for paid (but then everything is encoded/hosted 2x.

  2. If you want to exclude the 4k video from just one video uploaded, you could re-write the manifest file:


Stripping out the last 2 lines would remove the 4k version from the playable list. The modified manifest would no longer be compatible with the player (you win some… you lose some).

  1. We could add an option in our player SDK to remove a version (or versions) of the video. This would be client side, so not as secure as a server side approach. This is not currently on the dev teams roadmap, but we could add it in - if there is interest in its implementation.


Ok, so i am writing my own player and in this case i can modify the manifest throught my backend and give it to the user, erasing the latest 2 lines for 1080p users. What do you think? If it’s possible, where i find the manifest?

When you create or query a video with our API, the response will have an “Assets” section:

"iframe":"<iframe src="//"  ..."
"mp4":" ..."

Note: this response is for a private video, as there is a 1 use token in each url. If your video is public the token will not appear in the response

You want the HLS file - a link right to the manifest of the video.

  • iframe url: for embedding on the web
  • player url: for watching right away
  • the HLS (what you want in this case)
  • thumbnail: the image used as poster
  • mp4: this will be the 1080p mp4 link.