Cache != single use token on private video

Hi,

I want to cached ApiVideo calls to optimize my page rendering.

But, in a video player url, when it’s private, a single use token is put automaticaly in the url, so my first rendering is ok, but after, i have a 404 on player.json file (single use token consequence).

Do you have a solution to avoid that ?

Thx.

Gaëtan.

Hi @unitprodweb,

Hmm. The way a private video works is that the token is good for ONE play. Once it is played, any subsequent request will get a 404 error.

That said - it probably depends where you are caching. If the webpage is in the users’ local cache, it will play again- as long as the window has not been closed (the session is cookie based - so as long as the cookie in the user’s browser is still there - it’ll work!)

Caching on a CDN/your server - well, now the video is not ‘private’ to one user - any request for this page will have the private video URL, and more than one person will get the token. So this will not work.

It appears that the private token is working as designed: to require an API call for each time the video is served. But let’s think about workarounds -

  1. Could you cache the page - and serve a dynamically created iframe?
  2. Use your authentication to verify users, and remove the private token for the video?

Have any other folks come up with a workaround for this issue?

Doug

Hi,

Thanks for your very complete answer. I’ll think about it.

Gaëtan.