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

JWP 7.8.xx is very slow loading YouTube videos...


Hello! I have in the same webpage 4 YouTube videos and I setup as below:

<div class="otvideo" style="float: left; margin: 0 5px 5px 0"><div id="container_1712201612179498">&nbsp;</div><script type="text/javascript">jwplayer("container_1712201612179498").setup({file: "https://www.youtube-nocookie.com/v/8TNwLiRjb-0?rel=0", type: 'youtube', height: 315, width: 560, primary: 'html5', image: "https://img.youtube.com/vi/8TNwLiRjb-0/hqdefault.jpg"});</script><noscript><span class="no-plugin">&nbsp;</span></noscript></div>

<div class="otvideo" style="float: left; margin: 0 5px 5px 0"><div id="container_182016173149377">&nbsp;</div><script language="javascript" type="text/javascript">jwplayer("container_182016173149377").setup({file: "https://www.youtube-nocookie.com/v/4YtTamLG62g?rel=0", type: 'youtube', height: 315, width: 560, primary: 'html5', image: "https://img.youtube.com/vi/4YtTamLG62g/hqdefault.jpg"});</script><noscript><span class="no-plugin">&nbsp;</span></noscript></div>

<div class="otvideo" style="float: left; margin: 0 5px 5px 0"><div id="container_612016125634996">&nbsp;</div><script language="javascript" type="text/javascript">jwplayer("container_612016125634996").setup({file: "https://www.youtube-nocookie.com/v/EWC9JZtMOWQ?rel=0", type: 'youtube', height: 315, width: 560, primary: 'html5', image: "https://img.youtube.com/vi/EWC9JZtMOWQ/hqdefault.jpg"});</script><noscript><span class="no-plugin">&nbsp;</span></noscript></div>

<div class="otvideo" style="float: left; margin: 0 5px 5px 0"><div id="container_8102015154143966">&nbsp;</div><script language="javascript" type="text/javascript">jwplayer("container_8102015154143966").setup({file: "https://www.youtube-nocookie.com/v/javqj8YzTWk?rel=0", type: 'youtube', height: 315, width: 560, primary: 'html5', image: "https://img.youtube.com/vi/javqj8YzTWk/hqdefault.jpg"});</script><noscript><span class="no-plugin">&nbsp;</span></noscript></div>

My webpage takes a lot of seconds to load the YouTube videos and is not a issue of my server because if I remove the YouTube videos from my html, the webpage load all only in one second and is very fast since I have a super speed internet connection and my website is hosted in webfarm where my website is located in SSD (solid state disk)... I suspect that JWPlayer has some problem loading the Youtube videos into virtual iframe provided by JWP...

How to solve this issue?

11 Community Answers

a...

User  
0 rated :

language attribute is used under html 4.01 with loose doctype... in future I plan to remove it at moment my webpage has no errors of syntax

a...

User  
0 rated :

I'm using self hosted version of JWPlayer...

Todd

JW Player Support Agent  
0 rated :

Please see our notes about YouTube embeds with our player at https://support.jwplayer.com/customer/portal/articles/1406725-youtube-video-embed :

Due to the frequency in which YouTube is making changes on their end and the advancements that we have made to our hosting and streaming platform, we are no longer actively maintaining our YouTube integration. This means that it will still be included in the player for the time being, but your mileage may vary and it may work in some situations and not others.

And what kind of YouTube URL is https://www.youtube-nocookie.com/v/8TNwLiRjb-0?rel=0 ? I tried to load this in my browser and it took a long time to load. But when I went to https://www.youtube.com/v/8TNwLiRjb-0?rel=0 it loaded right away.

a...

User  
0 rated :

I taken directly from YouTube: <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/8TNwLiRjb-0" frameborder="0" allowfullscreen></iframe>

youtube-nocookie is the advanced privacy modality provided for cookie law, since this fix should prevent generate cookie without consent... but this is another story...

Todd

JW Player Support Agent  
0 rated :

Ok, just as long as that URL is not slowing down the loading of the video…

a...

User  
0 rated :

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/8TNwLiRjb-0?rel=0" frameborder="0" allowfullscreen></iframe>

becomes:

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/8TNwLiRjb-0?rel=0&amp;html5=1" frameborder="0" allowfullscreen></iframe>

I'd like to solve allowfullscreen that is invalid html tag and I have no idea to fix it... for this reason I'd like continue using JWPlayer... if you have another idea let's me know...

Kind Regards

PS: the future is YouTube and hear that YouTube support (by JWPlayer) is now broken sounds me like a bad thing...

Todd

JW Player Support Agent  
0 rated :

I do not understand your question. “allowfullscreen” is required inside an <iframe> if you want the viewers to be able to make the video go to fullscreen.

a...

User  
0 rated :

Yes, sure... but allowfullscreen is not validated by w3c.org and all validation services using the guidelines of w3c.org.. so my website is well validated by w3c.org and I'd like to continue in this way... so, jwplayer allows me to go in fullscreen without having any validation issue... I'm really sorry to hear that you have broken the YouTube Support...

You can think again about it? Thanks anyway for what you do!

I hope to hear good news from JWP Team...

Todd

JW Player Support Agent  
0 rated :

This page:

http://www.gtpdesigns.com/design-blog/view/w3c-valid-xthml-and-html5-youtube-iframe-embeds

says "UPDATED: The “allowfullscreen” attribute is now valid in the W3C HTML5 validator. Thanks to Mike Ratcliffe for the updated information!" back in 2013.

a...

User  
0 rated :

At moment I fixed YouTube so that:

<div class="otvideo" style="float: left; margin: 0 5px 5px 0"><iframe style="width: 560px; height: 315px; border: none" src="https://www.youtube-nocookie.com/embed/8TNwLiRjb-0?rel=0&amp;html5=1"><noframes><span class="no-plugin">&nbsp;</span></noframes></iframe></div>

Adding to the url html5=1 load the Videos in HTML5 mode...

My webpage is well validated and I have 0 cookies from youtube-nocookie.com

Before this modify with JWPlayer I did see a lot of cookie set from youtube even if I set JWPlayer with youtube-nocookie... this helps me with cookie law, now I'm compliant cookie law at 100%...

Sorry for having removed JWPlayer for YouTube, I will plan to use JWPlayer for others kind of Videos...

allowfullscreen is valid maybe for HTML5 markup but remains not validated for other kind of DocType...

At the moment I use without allowfullscreen... if in future something will change I'll see to implement into my code again...

Kind regards

a...

User  
0 rated :

Better fix is this:

<div class="otvideo" style="float: left; margin: 0 5px 5px 0"><iframe style="width: 560px; height: 315px; border: none" src="https://www.youtube-nocookie.com/embed/8TNwLiRjb-0?rel=0&amp;html5=1">Your Browser doesn't support iframe!</iframe></div>

Everything work great with this fix but don't allow FullScreen...

Thanks!

This question has received the maximum number of answers.