We are always trying to come up with new ways to help you protect your video content from various ways of exploitation. Some of the most frequent among them are the attempts at accessing the content without having paid for it or trying to download the content. Signed URLs are an effective approach to securing your content and countering such actions.
That is why we are thrilled to announce the new Stream Loader feature! It gives the FV Player Pro users the option to protect their HLS streams with URL tokens. It works with any CDN supported by FV Player Pro (CloudFront, Bunny CDN, KeyCDN, Cloudflare, StackPath) and AWS S3 or DigitalOcean Spaces.
These tokens are digitally signed, ensuring that the attributes of the token will not be tampered with. The tokens are valid only for a certain time and they are tied to the user ID. Therefore, requests beyond the expiration time will return an HTTP error code. So will request with an altered or missing token.
The basic building block of HLS stream is the m3u8 file. However, these files are static, thus they cannot use video segment URLs with time-sensitive tokens. Stream Loader inserts proper URL tokens on the fly, which allows it to get past these limitations.
This way, the video will be protected from people trying to obtain the URL to the HLS stream itself (for example, to send it to people not signed in as members) or trying to download it.
If you are also encrypting your videos, this is an additional layer of protection.
How to enable Stream Loader
First, you need to enable URL tokens on your CDN and configure it in the Hosting tab.
If you are using our free Coconut add-on to encode and encrypt your videos, you can skip the CDN setups and just enable the feature in your FV Player Pro, as Coconut does this automatically.
Since many of our users distribute their videos via CloudFront, we have prepared the steps for this CDN:
- You will need to restrict viewer access. In order to be able to do that, you first need to obtain and insert your Private Key. On how to do that, please follow this guide.
- Then, go to CloudFront Distributions page in your AWS console.
- Check the box of your distribution.
- Go to the Behaviours tab, select the default behaviour, and click Edit.
5. Look for Restrict Viewer Access (Use Signed URLs or Signed Cookies) option and pick “Yes“. Enabling this opens up two new options. In Trusted Key Groups or Trusted Signer pick “Trusted Signer“. In the next option, pick “Self” as the Trusted Signer.
6. Save by clicking “Yes,Edit” in the bottom right corner of the page.
7. Go back to the General tab of your CloudFront distribution and copy the domain name.
8. Now go to Settings -> FV Player Pro -> Hosting tab -> CloudFront (Pro) and enter the domain name of your distribution into the CloudFront domain field.
Note: If you already have other domains in this field, just separate them with a comma.
Go to Settings -> FV Player Pro -> Setup tab -> Stream Loader and click Enable.
If you have a large amount of viewers and the performance of your website could be negatively affected by this feature, you can also select the Speed-up option, which activates faster serving by bypassing WordPress.
Try it out yourself. Try obtaining the HLS URL from the source code of this page or try to download the video.
Stay tuned for more
We are trying to make our FV Player plugin better ever single day by bringing more and more upgrades and updates. You can help us a lot, by giving us feedback.
If you have any tips or questions, don’t hesitate and contact us via our Forum!