Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube https embedding causes warning in Firefox

I'm working on a site that requires a login and includes embedded Youtube videos. Because of the login, I need to get SSL working, which it largely is. I'm hitting an unexpected problem with the Youtube embeds, though. It's easy enough to point at https://www.youtube.com, but Firefox still complains that there's unencrypted content on an encrypted page. According to Firebug, the only unencrypted load was from http://[stuff].youtube.com/videoplayback?[more stuff].

Now, it's perfectly understandable that Youtube doesn't want the overhead of encrypting their video streams, and I don't think that this poses an actual security vulnerability. I just need to keep the browser happy. (I know that that warning can be disabled, of course, but I can't do that on my users' machines.) There must be a way to do this, because https://www.youtube.com itself doesn't make this error pop up, even though it uses http: for the video streams, too.

I have not seen similar errors in other browsers, but I haven't looked very hard just yet.

If it matters, my development machine doesn't have a valid SSL certificate; I just added an exception.

like image 824
user1618143 Avatar asked Feb 11 '13 20:02

user1618143


People also ask

What happens when you allow embedding on YouTube?

Embedded video content allows you to optimize your video's title, description, and transcription for top-ranking keywords. Your video's thumbnail can also appear in the search results, further assisting with that sought-after searchability.

Do I need permission to put embedded YouTube videos on my website?

By default, Content Manager users can add YouTube videos to their websites and apps by embedding them. You can control where your videos get embedded by specifying which websites and apps to block or allow. These rules can be applied to videos you own (Licensed content) and videos you claim (User-uploaded content).

Why can't I allow embedding on YouTube?

The first possible reason is the simplest one: your video is not allowed to be embedded. To fix this, go to your video settings and check the box here. If, after that, the problem persists, we will try other methods. According to this article, new YouTube accounts need to be in good standing (according to YouTube).


2 Answers

If you are using <iframe> use <embed> or check other embedding code options that YouTube API provides.

like image 165
XIMRX Avatar answered Nov 08 '22 03:11

XIMRX


I have a ssl secured website and this works for me in Firefox

<iframe id="player" src="https://www.youtube.com/embed/XfI....Ctpo?enablejsapi=1&origin=https://yourdomain.com&showinfo=0&iv_load_policy=3&modestbranding=1&theme=light&color=white&rel=0" frameborder="0"></iframe>
like image 34
ywwy Avatar answered Nov 08 '22 02:11

ywwy