Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Signed Cookies on cloudfront with HLS and DASH


Hi there,

We are using 7.5 beta 1, and have a premium account.

I have a dash clip and an hls clip behind a cloudfront distribution that requires signed cookies/urls

I've set up jwplayer as follows (for our hls clip)

playerInstance.setup({
"playlist" : [{
file: "http://d1sx7thxkfnvf1.cloudfront.net/TSF_HLS_1080_576_380/TSF_HLS_1080_MASTER.m3u8",
withCredentials: true
}],
"height": 360,
"width": 640,
});

Upon playing, the player shows an error: "Cannot load M3U8": 403 Status code
In chrome's dev tools it looks like the request for the master playlist file is receiving the following error: <?xml version="1.0" encoding="UTF-8"?><Error><Code>MissingKey</Code><Message>Missing Key-Pair-Id query parameter or cookie value</Message></Error>

I know for sure that we are setting the cookies on the page request, but it doesn't seem to be getting set when jwplayer requests the m3u8 file. Is this working correctly?

Regards,

Rane

9 Community Answers

w...

User  
0 rated :

I've also tried this with "hlshtml": true setting, which then returns a crossdomain error (even though I have enabled the OPTIONS header in the cloudfront distribution). I've also got a visible crossdomain.xml file. Any help would be most appreciated.

w...

User  
0 rated :

I've uploaded an example here: https://www.madman.com.au/signed.jsp

Alex

JW Player Support Agent  
0 rated :

Hi there,

My name is Alex and I am one of the Support Engineers at JW Player. I will be more than happy to assist you with your questions.

I receive the same “Missing Key-Pair-Id query parameter or cookie value” when I try to access your stream directly in Safari, not using our player. I would recommend contacting either your streaming provider or Amazon for further assistance as this does not look to be an issue caused by our player.

Please let me know if you need any more help or have any other questions.

Thank you!

w...

User  
0 rated :

Hi Alex,

I think the issue is that the cookies are not being set on the request for the m3u8 file even though I have withCredentials: true set in the playlist file. I could confirm this by using chrome developer tools.

w...

User  
0 rated :

Accessing the stream directly in safari would not work as the signed cookies for the request are being set in the page that the player is on

w...

User  
0 rated :

Sorry, the problem here was due to the domains not being the same. I set up a cname for the cloudfront distribution eg test-content.test-domain.com then used the domain dev.test-domain.com for my development machine, and set the cookie with the domain test-domain.com which worked (for HLS)

w...

User  
0 rated :

However, the DASH provider does not seem to be sending cookie values, so I am receiving the 403 forbidden error. Will there be a fix coming for this?

Cheers,

Rane

Alex

JW Player Support Agent  
0 rated :

Rane,

Can you give me a URL for a DASH stream that is showing this behavior?

Thank you.

w...

User  
1 rated :

Hi there, I've sent through a support request for this, as the url I have provided is password protected, and I didn't want to put it on a public forum.

Regards,

Rane

This question has received the maximum number of answers.