paul_striker
5 years agoReel Rookie
Roku video player with AWS CloudFront Signed cookies
I'm using AWS CloudFront as CDN to host my videos (HLS i.e., .m3u8) and using signed cookies to authenticate. Three set of cookies need to be set to the request header, CloudFront-Policy, CloudFront-Signature and CloudFront-Key-Pair-Id in order to retrive the .m3u8 file from CloudFront. I tried the following:
httpAgent = CreateObject("roHttpAgent") cookies = [ { Name: "CloudFront-Policy", Value: "val", Path: "/", Domain: "domain.com" }, { Name: "CloudFront-Signature", Value: "val", Path: "/", Domain: "domain.com"}, { Name: "CloudFront-Key-Pair-Id", Value: "val", Path: "/", Domain: "domain.com"} ] httpAgent.EnableCookies() httpAgent.AddCookies(cookies) m.videoPlayer.setHttpAgent(httpAgent)
and
httpAgent.AddHeader("Cookie", "CloudFront-Policy=" + val1 + "; " + "CloudFront-Signature=" + val2 + "; " + "CloudFront-Key-Pair-Id=" + val3)
But none helped! ๐
Even, I tried using the Roku Stream/RAF Tester but unfortunately I have TelstraTV device which didn't allow me to link with the Roku developer account.