WordPress - 需要关闭自动播放 iFrame 视频

WordPress - AutoPlay iFrame video off required

所以我使用以下代码将视频嵌入到我的 WordPress 网站中

<div class="videoWrapper"><iframe src="http://www.genericwebsitename.co.uk/wp-content/uploads/2015/11/generic-website-name-goes-in-here...mp4" width="300" height="300"></iframe></div>

我尝试添加 autoplay=0, autoplay=false 但似乎没有任何效果。它总是自动播放。

如您所见,这不是 youtube link,视频文件已上传到 WordPress 网站本身并通过 iFrame 标签link编辑。

浏览论坛我似乎找不到有效的答案。

使用下面的格式代替 iframe

你可以使用视频标签源,像这样:

  <video width="640" height="480" controls="controls" type="video/mp4" preload="none">
    <source src="http://example.com/mytestfile.mp4" autostart="false">
    Your browser does not support the video tag.
    </video>