我有一个充满视频链接的页面,点击后会打开一个带有 flowplayer 的模式窗口。我通过调用 .load 函数将视频加载到模式中,但我无法阻止视频自动播放。
<div class="modal hide fade">
<div class="flowplayer">
<video preload="none">
<!-- these are just dummy videos that will be replaced by the .load function -->
<source type="video/mp4" src="/Assets/video/dummy.mp4">
<source type="video/webm" src="/Assets/video/dummy.webm">
</video>
</div>
</div>
//script, called when user clicks a video link
var api = flowplayer();
api.load([
{ mp4: //path to video clicked, stored in data- in div },
{ webm: //path to video clicked, stored in data- in div }
]);
视频加载和播放正常,我只是不知道如何停止自动播放。