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

360 Video Request without Cookie


Hi,

I am streaming a 360 Video with JWplayer 7.12 with PseudoStreaming. But there is a problem: If the Player playlist has "stereomode" its not sending the Cookies in the request. Without its sending.

What is the problem? How can i solve this? I need the Cookies in the request for authentication.


videoSetup-Konfig:
primary : 'html',
base : utils.getBaseUrl() + "/js/core/modules/jwplayer/",
autostart : autostart,
width : "100%",
height : "100%",
playlist : [{
sources : [{ file : http://localhost:8082/marsDemo/files/9002/38672v1.mp4 }],
image : "Thumbnail?oid=38672&thumbnailVersion=3&version=1"
}],
skin : {
url: utils.getBaseUrl() + "/js/core/modules/jwplayer/skins/glow.css",
name: "glow"
},
androidhls : true,
hlshtml : true,

Regards,
Osman

3 Community Answers

Heidi

JW Player Support Agent  
0 rated :

Hello,

There is a known issue in Chrome with cookies and 360 video that one of our engineers described thusly:

According to the documentation on MDN a MediaElement should never send credentials when the crossOrigin attribute is set to “anonymous”. Apparently, the interpretation of that differs per browser, for resources loaded from the same origin Firefox/IE/Safari are happy to send credentials, but Chrome does not do so.

If a customer is loading their video from the same origin, the fix for them would be to remove the crossOrigin attribute from the video tag.
The following snippet will fix their video in Chrome:

// Init player
jwplayer(“player_problem”).setup({
playlist: [{
file: ‘/jwplayer/samplefile.mp4’,
type: ‘mp4’,
stereomode: ‘monoscopic’
}],
aspectratio: “640:360”,
preload: ‘none’ /* Note: preload is none here, in order to prevent loading the video */
});

/* Credentials fix for Chrome /
if (jwplayer.utils.isChrome()) {
// Make sure to update the query selector with your container’s id.
var video = document.querySelector(‘#player_problem .jw-media video.jw-video’);
// Remove the crossOrigin attribute.
video.crossOrigin = null;
// Reset the src so that the video will be loaded with sending credentials.
video.src = video.src;
// Reset preload attribute.
video.preload = ‘auto’;
}
/
Credentials should now be sent. */

Please let me know if this helps.

Heidi

Heidi Williams-Foy
Support Team Lead, Customer Experience, JW Player

Sophie-Christine Wagner

User  
0 rated :

Hi Heidi,

thanks for the response and the code.

But it doesnt work.

At first: This check works only if the player is already ready. Otherwise there is no "video" object found.

Second: Even if the crossOrigin is set to null, its adding automatically back and with that, its not working.

Is there another way to solve this?

Heidi

JW Player Support Agent  
-1 rated :

I will need to check with our engineers, something may have changed recently in Chrome.

This question has received the maximum number of answers.