I need a script that generates temporary urls for JWPLAYER

442 views Asked by At

I have a site that whose video URLS are always being leeched. I am using JWPLAYER to feed videos hosted on google cloud storage. My site is pretty much being scraped and my videos hotlinked. I would like to adopt temporary urls for videos that expire. What do I need to do? What easy implementation guides should I be reading?

1

There are 1 answers

1
HeidiWF On

If you are hosting with JW Player, or registering your externally hosted links in the JW Dashboard, you will be able to use the API to add token signing to your links as described here: https://support.jwplayer.com/customer/portal/articles/1433647

To be clear, this requires additional server-side code to generate the token, using PHP or Python, for example. It works this way so as not to expose your API secret directly in client-side Javascript. Script examples can be found here: https://developer.jwplayer.com/jw-platform/docs/developer-guide/management-api/

Otherwise, you could use HLS, which is harder to steal than MP4, as it delivers your video in short segments as opposed to whole files.