• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 YouTube Embedded Speed?

Chris D

XenForo developer
Staff member
#6
I have to stop assuming that everyone uses a decent browser... because they just don't :D

Yeah, Jake is spot on. Could definitely be a client browser too - but certainly not a XenForo thing. The YouTube content is rendered in an iframe so your browser just goes to YouTube to get the content.
 
#7
Wow guys, excellent answers. I hadn't considered that the rendering engine of the browser could affect playback speed in an iframe, but that makes perfect sense. Thanks so much!
 

Ingenious

Well-known member
#8
I found this too, viewing any YT video embedded in the forum was quite stuttery compared to viewing it on YT itself. What fixed it for me was upgrading my RAM from 4GB to 8GB and also upgrading Firefox. So I'm now fine, but some of my forum members are not. Anyone running older browsers or slower machines can struggle with video or image heavy posts, but as others have said above, it's not XenForo.
 

Chris D

XenForo developer
Staff member
#9
Doubling the RAM is very extreme.

Though having an up to date browser is an absolute must.

If you check my most recent resource I released there's one that notifies users of their old browsers.

Another method is YouTube still has available older embed code which is more compatible with older browsers. In theory you could replace the XenForo code that pulls the iframe with the old code that does embedding.

Though technically, iframe should be better!
 

Chris D

XenForo developer
Staff member
#10
Here's the code.

Admin CP > BB Code Media Sites > YouTube

Replace all code in Embed HTML with:

Code:
<object width="500" height="300"><param name="movie" value="http://www.youtube.com/v/{$id}?version=3&amp;hl=en_GB&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/{$id}?version=3&amp;hl=en_GB&amp;rel=0" type="application/x-shockwave-flash" width="500" height="300" allowscriptaccess="always" allowfullscreen="true"></embed></object>
I haven't tested this, but it is the old embed code and should work.
 

Ingenious

Well-known member
#11
PS. I didn't double my RAM just to load videos quicker :) I doubled it for other reasons, but noticed a stark and immediate increase in browsing performance (odd actually, as it's already a Core 2 Duo Macbook Pro, but it wasn't exactly swift at browsing big web pages, until the ram upgrade).

Good point Yorick about the iframes and old embed code, it might be why some older forum users (including mine from when I ran vB3) reckon Xenforo is slower with video stuff. Be interesting if someone tries this out and sees if it's quicker.