如何使用jwplayer在视频结束后再次显示海报图片?这是一段代码:
<video
src="video/Motion.mp4"
height="860"
id="video"
width="620"
poster="img/poster.png"
onclick="play();">
</video>
<script type="text/javascript">
jwplayer("video").setup({
flashplayer: "jwplayer/player.swf",
controlbar: "none",
});
jwplayer().getPlugin("display").hide();
</script>
答案 0 :(得分:0)
您是否尝试过利用onComplete事件?
<script type="text/javascript">
jwplayer("video").setup({
flashplayer: "jwplayer/player.swf",
controlbar: "none",
events: {
onComplete: function() {
alert('video has finished..do something here..');
}
});
</script>