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

JW Player is requesting HTML page as image


JWPlayer seems to be requesting the page the video is embedded in itself as an image. Can anyone explain why this is going on, or, more importantly, how to stop it?

This is causing problems for our form submissions, which use a CSRF token in the form HTML to guarantee same-site submissions. However, the CSRF token, server-side, gets refreshed every time the page is called, making the client-side CSRF token in the form expire, making the form fail.

To see the strange JW Player behavior, go here in chrome with the network console open:
https://answersingenesis.org/media/video/evolution/lucy-shes-no-lady/

Filter the network calls by "Img" types only.

Chrome is a little quirky about what code gets blamed as the initiator (hit refresh a few times and the initiator may change), but sometimes it blames JW Player, and this problem happens on every page on this site that has JW Player on it that I have tested, and no pages without JW Player, so I think the player is the culprit.

I am using JWPlayer 6.12. Here is all the relevant code I think:

<video id="my-video" src="https://assets.answersingenesis.org/vid/ondemand/lucy-shes-no-lady.mp4"
poster="https://assets.answersingenesis.org/img/mediafile/preview_image/lucy-shes-no-lady.jpg"
controls="controls" analytic="Lucy—She’s No Lady" preload="none" width="100%">
<a href="https://assets.answersingenesis.org/vid/ondemand/lucy-shes-no-lady.mp4" target="_blank" title="Lucy—She’s No Lady">
<img src="https://assets.answersingenesis.org/img/mediafile/preview_image/lucy-shes-no-lady.jpg" alt="Lucy—She’s No Lady" border="0" />
</a>
</video>
<script>
jwplayer('my-video').setup(
{
"file": 'https://assets.answersingenesis.org/vid/ondemand/lucy-shes-no-lady.mp4',
"controlbar": 'bottom',
"image": 'https://assets.answersingenesis.org/img/mediafile/preview_image/lucy-shes-no-lady.jpg',
"type": 'mp4',
"width": '100%',
"aspectratio": '16:9',
"menu": false,
"skin": 'https://assets.answersingenesis.org/lib/js/jwplayer/skins/aig-2.0/aig.xml',
"controlbar.idlehide": true
});
</script>

Thanks for any help you can offer!

11 Community Answers

Heidi

JW Player Support Agent  
0 rated :

I tried the form on your page and I see that it fails, but I do not see a relationship between the failed form submission and the player. Is your video in an iframe? The player does not request pages but sends video and ad tag requests (if you include them), but does not request pages. Could you please add some further reproduction steps that will help me understand the issue?

jwplayer

User  
0 rated :

It is not in an iFrame and don't worry too much about the form submission.

The problem I have is that in Chrome (on both Mac and Windows) JW Player seems to be requesting the page itself, apparently as an image (Accept:image/webp,image/*,*/*;q=0.8). It does it on load and then again when I mouseover the JW Player video on the page. This does not appear to occur in FireFox. Chrome claims the first odd call is initiated by "jwplayer.js:formatted:809". This maps to the following line of code in the JW Player (v 6.12) JS file:

b.insertRule(k,

Of course, I have no idea what that line of code actually does. How can I stop JW Player from requesting the page it resides on in Chrome?

jwplayer

User  
0 rated :

Here is a screenshot of what I am seeing in Chrome with the problem request circled in red:
https://assets.answersingenesis.org/img/testing/jw-error.png

jwplayer

User  
0 rated :

Here is a much simpler page with the exact same problem -- in Chrome, JW Player requests the page itself as an image:
https://assets.answersingenesis.org/doc/test/jwplayer-test.html

jwplayer

User  
0 rated :

And this page is even simpler, with the same weird behavior:
https://assets.answersingenesis.org/doc/test/jwplayer-test-2.html

jwplayer

User  
0 rated :

It appears to be related to our custom skin, because the problem goes away when we remove the skin:
https://assets.answersingenesis.org/lib/js/jwplayer/skins/aig-2.0/aig.xml

I double-checked that all the images we refer to in the skin are in fact present. I don't know what else to do though. What about the skin could be causing JW Player in Chrome to request the current page as an image?

Heidi

JW Player Support Agent  
0 rated :

Have you tested using JW 7?

jwplayer

User  
0 rated :

I have not. Do you think that will resolve it?

Heidi

JW Player Support Agent  
0 rated :

There have been a great number of bug fixes and updates since JW 6.12. Please give JW 7 a try on a test page, and let me know if that helps.

jwplayer

User  
0 rated :

That does appear to fix the problem. Thank you!

Heidi

JW Player Support Agent  
0 rated :

Hello,

I’m happy that fixed your issue. Feel free to reach out if you have further questions.

Yours, Heidi

Heidi Williams-Foy
Support Engineer, JW Player

This question has received the maximum number of answers.