1

So I've managed to successfully use AWS Elemental MediaConvert to convert a mp4 file into a stream (couple of .m3u8 files, and a bunch of .ts files). So they're now sitting in a folder. And the video loads fine if I use https://bucketname.s3.amazonaws.com/filename.m3u8 in my web video player (videojs).

Here's the problem: If I make the bucket private and use a signed URL to access the above .m3u8 file in my video player, then the playlist is unable to access the other segment files, because they're all private. And the only way it works is to make the entire folder public, which is not secure. I've tried to put a CORS bucket policy to only make it play from my domain, but nothing works except making all of the files public.

So if I access the m3u8 via a signed url, how can it then access the other segments (.ts files) in the same folder without having to make them all public?

Thanks for your help.

Ravi Jayagopal
  • 916
  • 7
  • 10

1 Answers1

0

There's two options to get private content from cloudfront/s3

Signed urls: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html

Signed cookies: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html

The last one is what you will need. Just create a signed cookie for multiple files/paths. This will allow your end user to get all parts of your video with just one cookie.