YouTube API Blog: HTTPS Support for YouTube Embeds - 0 views
-
Anyone can try HTTPS with YouTube embeds today—simply change the protocol portion of the URL from HTTP to HTTPs. For example, HTTP://www.youtube.com/embed/Zhawgd0REhA becomes HTTPs://www.youtube.com/embed/Zhawgd0REhA. This applies to URLs found in our newer <iframe> embeds as well as our older-style <object> + <embed> codes.
-
If your site can be accessed either via HTTP or HTTPS, you could employ protocol-relative URLs instead of hardcoding a value; //www.youtube.com/ will automatically resolve to HTTP or HTTPS depending on the protocol used by the host page.