MyBB Community Forums
YouTube Embedding Not Working with HTTPS Forums - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: YouTube Embedding Not Working with HTTPS Forums (/thread-186899.html)



YouTube Embedding Not Working with HTTPS Forums - own3mall - 12-04-2015

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.


RE: YouTube Embedding Not Working with HTTPS Forums - Devilshakerz - 12-04-2015

MyBB 1.8.7 has the video embeds' URLs updated to protocol-less: https://github.com/mybb/mybb/blob/feature/install/resources/mybb_theme.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


RE: YouTube Embedding Not Working with HTTPS Forums - own3mall - 12-05-2015

(12-04-2015, 11:31 PM)Devilshakerz Wrote: MyBB 1.8.7 has the video embeds' URLs updated to protocol-less: https://github.com/mybb/mybb/blob/feature/install/resources/mybb_theme.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!