Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.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_Video_Youtube - Fatal编程技术网

Html 无法使用YouTube上的链接播放视频

Html 无法使用YouTube上的链接播放视频,html,video,youtube,Html,Video,Youtube,我无法播放视频,链接取自YouTube,代码如下: <!DOCTYPE html> <html> <head> <title>Audio & Video</title> </head> <body> <h1></h1> <video src="https://www.youtube.com/watch?v=Et2HGG_

我无法播放视频,链接取自YouTube,代码如下:

<!DOCTYPE html>
<html>
  <head>
    <title>Audio & Video</title>
  </head>
  <body>  
    <h1></h1>  

    <video src="https://www.youtube.com/watch?v=Et2HGG_Hfdk&t=3s" controls autoplay>  
     Your Browser Does Not Support the Video Format   
    </video>

  </body>
</html>

音频和视频
您的浏览器不支持视频格式

这不是嵌入YouTube视频的正确方法

您需要使用YouTube的官方嵌入方法,如下所示:

<iframe src="https://www.youtube.com/embed/Et2HGG_Hfdk?start=3" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

这不是嵌入YouTube视频的正确方法

您需要使用YouTube的官方嵌入方法,如下所示:

<iframe src="https://www.youtube.com/embed/Et2HGG_Hfdk?start=3" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

看看这个。您可以将youtube视频放入iframe中

<iframe width="560" height="315" src="https://www.youtube.com/watch?v=Et2HGG_Hfdk&t=3s" frameborder="0" autoplay allowfullscreen></iframe>

看看这个。您可以将youtube视频放入iframe中

<iframe width="560" height="315" src="https://www.youtube.com/watch?v=Et2HGG_Hfdk&t=3s" frameborder="0" autoplay allowfullscreen></iframe>

您需要使用iframe将视频嵌入html

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


有关嵌入youtube视频的更多信息,请访问链接

,您需要使用iframe将视频嵌入html

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

有关嵌入youtube视频的更多信息,请点击链接