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

VAST raising XMLHttpRequest withCredentials=true for tag file


I'm getting an error because VAST plugin sets withCredentials=true for the XMLHttpRequest for the ad tag file and the server is set with 'Access-Control-Allow-Origin: *'

There is no setup parameter for jwplayer to specify the withCredentials value for ad tag files and withCredentials=false is supposed to be the default for XMLHttpRequest. Is this a bug or there is a way to specify the withCredentials value?

7 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi there,

The player currently makes requests for the ad tag with withCredentials=true first and then, if that request fails, it should request the ad tag a second time with withCredentials=false. If you are not seeing this happen, please supply a URL to a reproduction page so we may take a look at this for you.

The ability to control whether or not the ad tag requests get set with withCredentials set to true or false is something that is on our roadmap, but there is no ETA for that functionality as of yet.

Thank you.

Antonio Pérez

User  
0 rated :

Thanks for reply.

You can check live the error as it happens here: http://holacdn.com/playground?media=hls&player=jwplayer7&tech=html5&mode=attach&file_type=default&ad_scheme=vast&vast_preroll=on

Check this screenshot https://drive.google.com/file/d/0B-VLue0eK4w5eDJUQkNpTjF2YnM/view?usp=sharing, captured after pressing the play button in the player.

It looks like the requests for preroll.xml tag file work fine (why 4 anyway?), all of them get a 200 status. Nonetheless, you can see the error in the console about the withCredentials flag and no actual ad is played.

Alex

JW Player Support Agent  
0 rated :

Hi Antonio,

When I visit your test page but change the player to 7.9.1, the ad plays fine. However, when I first visited the page, it was using version 7.1.0 – which version are you testing with?

Please let me know. Thank you.

Antonio Pérez

User  
0 rated :

Hi Alex,

we use both, among all other players in the list, it´s a test bench for different players.

Thanks,
Antonio

Alex

JW Player Support Agent  
0 rated :

Hi Antonio,

Are you not seeing the ad play when testing with 7.9.1?

Antonio Pérez

User  
0 rated :

Hi Alex,

I do see the ad with 7.9.1, which is an improvement, thanks. I still get the same error in console for preroll.xml xhr failing due to withCredentials flag.

Alex

JW Player Support Agent  
0 rated :

Hi Antonio,

You will continue seeing that error as it is firing when the withCredentials flag on the request for the ad tag is set to “true” which it always is on the first request. Since that is failing, the request is going out a second time with the flag set to “false” and that is the request that is successfully able to retrieve your ad. Our Engineers do have a feature on our roadmap to allow you to configure whether or not that first request is fired with the withCredentials flag set to “true” or not which would eliminate this error, but I do not have an ETA on when to expect this. You can keep an eye on our JW 7 Release Notes page as we post release notes and bug fixes with every new update.

Thank you.

This question has received the maximum number of answers.