Recent Topics

[4.1.x] Can't embed HD YouTube videos

started by on Dec 18, 2011 – Last touched: Dec 20, 2013

Dec 18, 2011 00:25    

My b2evolution Version: 4.1.x

Is there an easy way to embed HD YouTube videos? When using the "YouTube" button it won't allow the HD code at the end of the video. And if you try and embed via HTML, then when you flip over to WYSIWYG and back it disappears...

Super frustrating!

Jan 07, 2012 06:50

If the WYSIWYG is TinyMCE, it is what is removing the code when you switch over to it. You can tell TinyMCE in the configuration (edit the plugin) not to scrub out the code.

Or, you can simply wait until near the end of writing and just go to HTML mode and add the video and then save it while in the HTML mode.

Jan 13, 2012 22:20

This sounds like this is exactly what's happening but I can't find the setting in the Plugin Settings area. Can you provide a little more info - I'm excited to get this resolved! Thanks!

Jan 14, 2012 08:51

Ethan, it should be in your user settings. Go to the group settings for your level of user; go to security filters; untick 'prevent iframes'. Should work... it could be one of the other security settings, but as Youtube moved over to iframe embed codes I think that's right.

Jan 15, 2012 22:27

Well, I did that long ago (that's one of the first things I do when I set up a new site) so that's not it... Any other ideas?

Jan 16, 2012 00:25

Not sure. I only recently upgraded and yesterday noticed the same issue - that setting used to do it for me. I saved while in HTML mode, my only thought is that there's some way to edit the plugin files to prevent it happening (like you didn't see any settings in the backend), but have no ideas where.

Sorry, I'm a bit useless ;)

Feb 03, 2012 22:28

This is getting very frustrating - is there really no way to embed HD YouTube videos?! That's just crazy...

Mar 05, 2012 02:22

Can you guys post the code here please?

Mar 05, 2012 18:06

Well, if you try and enter the HD link in when the prompt appears for the YouTube video ID it won't allow it - you must remove the ?hd=1 for it to work. I'm not sure how to embed using the full HTML code w/ HD, YouTube doesn't seem to provide code for this, I just assumed you would add the ?hd=1 in the embed code, for example:

Code

<iframe width="560" height="315" src="http://www.youtube.com/embed/aEbppeMgmuE?hd=1" frameborder="0" allowfullscreen></iframe>

But I don't believe that works either. Am I missing something?

Mar 05, 2012 18:16

I'm going to allow ? and = signs in the code. Will see if it works...

Mar 05, 2012 18:53

Ok, look at /plugins/videoplug_plugin/_videoplug.plugin.php

Find and edit the following code starting around line 140

Code

case 'youtube':
  // Allow HD video code with ?hd=1 at the end
  if( video_ID.match( /^[a-z0-9_?=-]+$/i ) )
  { // valid
    valid_video_ID = true;
  }
  break;

Mar 07, 2012 21:49

One last question; how do we change the default video size when using the YouTube quick insert in TinyMCE? The HD doesn't seem to work when hardcoding...but if we can specify the size somewhere in code for the quick insert it will solve the problem.

***UPDATE***

Nevermind - found it, same file, line 58 I think...

Mar 08, 2012 04:21

Are you talking about video placeholder 425x350px ? You can edit this size directly in /_videoplug.plugin.php

Mar 08, 2012 05:29

Yeah, that's what I found - thanks!


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.