Youtube redirecting http to https and using flash player instead of HTML5

I am using the youtube embed to show videos. Using IE11 (also FF28 but not FF27), when I am logged into my google account, the http request gets redirected to https, which isn't a big deal, except that even though I am specifying the html5 player, youtube serves up the flash player.

Is there some way to force http or force the html5 player over https?

Re-create: Log in to google account and navigate to url "http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=1&html5=1" redirects to https and flash player

Log out of google account and navigate to url "http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=1&html5=1" Stays http and gets html5 player

Thanks in advance!


If you put the video in a sandboxed iframe and don't specifically allow plugins it can't load flashplayer, and thus has to use the html5 player. Note you have to at a minimum allow-same-origin, and allow-scripts or playback doesn't work. If you want the youtube button to be able to open the youtube page for the video you will also need allow-popups. Note that in the new window created from the youtube button the sandbox is still in effect even if navigated elsewhere manually by typing in a new URL.

<iframe seamless="" height="100%" width="100%"
  sandbox="allow-same-origin allow-scripts"
  src="http://www.youtube.com/embed/u1zgFlCw8Aw?autoplay=1">
</iframe>
链接地址: http://www.djcxy.com/p/44762.html

上一篇: Php动态嵌入YouTube视频

下一篇: YouTube将http重定向到https并使用Flash Player而不是HTML5