MyBB Community Forums

Full Version: YouTube Embedding Not Working with HTTPS Forums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Guys,

I have a wildcard SSL cert that I use on my forums subdomain along with the rest of my site.  I noticed today that when I try to embed a YouTube video using the "Insert a video" button in the editor, it won't work when you try to load the thread.

Firefox is outputting the following error:

Blocked loading mixed active content "http://www.youtube.com/embed/embed"

To work around this, I created my own MyCode using [yt]

\[yt\](.*?)\[/yt\]

Which simply replaces that with:

<iframe width="420" height="315" src="$1" frameborder="0" allowfullscreen></iframe>

As long as you use the embed YouTube URL with HTTPS (similar to https://www.youtube.com/embed/VIDEOID), this works fine, but the built in video embed functionality does not on my HTTPS SSL only subdomains MyBB 1.8.6 installation.  Can this be fixed in the next version?

This problem may exist with other supported built in video providers, but I haven't tried it.
MyBB 1.8.7 has the video embeds' URLs updated to protocol-less: https://github.com/mybb/mybb/blob/featur...xml#L13363
You can update these templates manually as shown in the code or use a plugin that fixes these kinds of errors: http://community.mybb.com/mods.php?action=view&pid=450
(2015-12-04, 11:31 PM)Devilshakerz Wrote: [ -> ]MyBB 1.8.7 has the video embeds' URLs updated to protocol-less: https://github.com/mybb/mybb/blob/featur...xml#L13363
You can update these templates manually as shown in the code or use a plugin that fixes these kinds of errors: http://community.mybb.com/mods.php?action=view&pid=450

Excellent.  Thanks!