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

JW Player YT Player Bug


Hi All,

I am a long time JW Player user, back in the days when JW Player was a simple mp3 player :) Anyway I moved from V6 to V7 as YT support expired for the API, the new API is great it seems to be the chromeless player it loads which enables the YT cards and overlays etc.

The issue I have noticed is on browser FF 48 and others if you click pause on a video it pauses but after a few seconds it starts to play again the youtube video, the player thinks its pausing. It is worse on iOS since you press stop and it keeps opening the video back up until it finishes and then begins to play again. You can only avoid by killing safari or somehow managing to click another link.

Initally I thought it was because I had autoplay on or so switched it to false but the same issue. Happy to show it to you if needed, any assistance how to avoid.

Thanks
Suley

8 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi Suley,

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

I am unable to reproduce that behavior, either in Firefox 48 (for both Mac and Windows) or in Safari for iOS. I was using the player found on our YouTube Video Embed support article to test with.

If you are still seeing this behavior, can you please provide me with the URL that you are seeing this behavior on, in addition to letting me know what operating system you are seeing it on in Firefox and which version of iOS you are seeing it on?

Thank you.

Suley

User  
0 rated :

Hi Alex,

Nice to meet you,

Please try http://bit.ly/2b8KVrV on iOS, I have just tried again and the same error, apologies in advance if Safari on iOS crashes, The code is generated from a php script and each page would load as a iFrame see http://bit.ly/2aAwf2B

iOS 9.3.4
Windows 7, 10

Code below edited so google cant scrape :)

<script type="text/javascript" src="[JS Path]/7.5/jwplayer.js" ></script>

<script type="text/javascript">jwplayer.key="[key]";</script>

<div id="dbvideo">Loading the player...</div>

<script type="text/javascript">

jwplayer("dbvideo").setup({
aboutlink: "domain",
abouttext: "Player Build 7.4.3",
sharing: {},
analytics: {
cookies: false
},
width: "100%",
height: "100%",
stretching: "exactfit",
autostart: "true",

file: "[link]"

});


</script>

Suley

User  
0 rated :

Please note the code base might be a little old Ethan helped me set it up years ago :)

Alex

JW Player Support Agent  
0 rated :

Hi Suley,

I’m unable to reproduce it on iOS, but I am able to see it in Firefox on Windows, although very intermittently. And when I am able to reproduce it, it only happens on your page – not when I embed the same YouTube video with the same version of the player on this test page. I did notice that the code that your PHP script injects into the page does not contain a DOCTYPE or <html> tags. Since both YouTube’s API and our player use a lot of HTML5-specific functionality, I would suggest having your PHP code also inject those elements so that the page is able to properly use HTML5. The page should end up with the following code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script type="text/javascript" src="[JS Path]/7.5/jwplayer.js"></script>
  <script type="text/javascript">
    jwplayer.key = "[key]";
  </script>
  <div id="dbvideo">Loading the player...</div>
  <script type="text/javascript">
    jwplayer("dbvideo").setup({
      aboutlink: "domain",
      abouttext: "Player Build 7.4.3",
      sharing: {},
      analytics: {
        cookies: false
      },
      width: "100%",
      height: "100%",
      stretching: "exactfit",
      autostart: "true",

      file: "[link]"

    });
  </script>
</body>
</html>

If it still happens with that code, can you try it using the “beta” and developer builds of Firefox so we can be sure it’s not an issue just with this version of the browser?

Thank you.

a...

User  
0 rated :

I have done some further decoding and I have identified the cause, now I am trying to work out the fix.

Simply placing 100% as with or height seems to cause the issue. Why is a good question, I tried to look at other implementations and so far no joy. A defined height or width does not create the issue, i think when it stops and resizes back down, its conflicitng thinking its not 100% so starts to play again. I will attempt to make a video to show the issue

Suley

User  
0 rated :

Ok, I seem to have got around the issue by adding aspectratio: "16:9", it simply makes the iframe not entirely responsive as the content is not 100% of the frame size however it keeps its aspect ratio. I would have preferred not to use this work around but it does the job

Suley

User  
0 rated :

Strangely adding the aspect ratio to my old code fixed the issue, anyway i needed to rejog my iframe code to be more responsive, now i have perfect fit in terms of the site. It does not streach the video like it used to but thats not a major issue right now :)

Alex

JW Player Support Agent  
0 rated :

Great. I’m glad you got it working!

This question has received the maximum number of answers.