禁用YouTube嵌入代码中的自动播放功能

问题描述 投票:0回答:3

如何禁用YouTube嵌入式代码中的自动播放选项。我的视频嵌入代码如下所示,我检查了?autoplay = 0方法。但它不起作用。

这是YouTube代码:

<iframe width="711" height="400" src="https://www.youtube.com/embed/E5ln4uR4TwQ?rel=0?ecver=1" frameborder="0" allowfullscreen></iframe>

我检查过如下:

<iframe width="1400" height="400" src="https://www.youtube.com/embed/E5ln4uR4TwQ?autoplay=0&rel=0&ecver=1" frameborder="0" allowfullscreen></iframe>

谢谢

html youtube autoplay
3个回答
1
投票

要禁用自动播放,只需将&autoplay=0放在视频ID之后。见下面的行:

<embed src="http://www.youtube.com/blahblah&autoplay=0"

0
投票

尝试这个希望它会帮助你。

<object width="425" height="350">
<param name="movie" value="https://www.youtube.com/embed/E5ln4uR4TwQ?autoplay=0"></param>
<embed src="https://www.youtube.com/embed/E5ln4uR4TwQ?autoplay=0" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>

0
投票

我也在寻找答案,发现在链接的末尾添加?rel=0似乎有效

例:

<iframe width="560" height="315" src="https://www.youtube.com/embed/code for video?rel=0" frameborder="0" allow="encrypted-media" allowfullscreen></iframe>
© www.soinside.com 2019 - 2024. All rights reserved.