电视台视频嵌入代码一直自启动

TV Station Video Embed Code Keeps Autostarting

我在 Google 上搜索了一段时间如何嵌入视频以停止自动播放,但似乎没有任何效果。

有人能帮忙吗?这是网站,视频在页面底部附近。 https://www.prestigek9.com/

这是我的代码:

    <div class="video-wrap">
    <div class="video-embed">
    <iframe width="640" height="360" src="https://media.9news.com/embeds/video/2186497/iframe?autostart=false" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" autoPlay="false"></iframe>
    </div>
    </div>

自动播放属性应与支持它的标签一起使用,例如 HTNL5 视频标签。在您的示例中,它实际上被用于 iframe 标记。

iframe 标签本身不支持自动播放。

如果以 YouTube 视频为例,您会发现自动播放实际上与视频 url 而不是 iframe 标签相关联。实际上,对于 YouTube,它只是 YouTube URL 支持的一部分,而不是 iframe 或 HTML5 视频标签属性 - 例如(经典 RickRoll 示例):

<iframe width="420" height="345" src="http://www.youtube.com/embed/oHg5SJYRHA0?autoplay=1" frameborder="0" allowfullscreen></iframe>

要播放视频,您需要在 iFrame 中插入的 HTML5 页面支持自动播放属性,或者如果它是您自己在 iframe 中的 HTMNL 代码,您需要在那里有视频标签。