Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 即使我复制了正确的嵌入代码,Youtube嵌入也无法工作_Html - Fatal编程技术网

Html 即使我复制了正确的嵌入代码,Youtube嵌入也无法工作

Html 即使我复制了正确的嵌入代码,Youtube嵌入也无法工作,html,Html,我的代码中有一个标记,我从youtube源代码复制了整个代码,我想知道为什么我的iframe不会读取代码,也不会显示我的视频 <iframe src="http://www.youtube.com/embed/eMobfjIsOfk" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" width="560" height="315" frame

我的代码中有一个标记,我从youtube源代码复制了整个代码,我想知道为什么我的iframe不会读取代码,也不会显示我的视频

<iframe src="http://www.youtube.com/embed/eMobfjIsOfk" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" width="560" height="315" frameborder="0"></iframe>

您应该通过https加载它

工作示例-


通过https加载iframe正在工作。可能是其他原因导致了问题。我通过https加载了它,但仍然无法工作@aMJay@AlexDeneris . 没有你方的更多信息,我们将无法帮助你。尝试在您的帖子中添加一个。当我从控制台检查元素时,iframe下面的文档没有内容@IvarIt实际上是通过https加载的,即使您使用http,它也会在内部重定向。您无法从https站点连接到http。如果使用不带SSL/TLS的JSFIDLE,它可以正常工作:
<iframe src="https://www.youtube.com/embed/eMobfjIsOfk" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" width="560" height="315" frameborder="0"></iframe>