我想当用户点击播放时,首先看到带有链接的图像,然后为他播放视频,我该怎么做?
喜欢这个链接 : 阿帕拉特
我的代码
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: 'video.mp4',
width: 640,
height: 360,
title: 'Basic Video Embed',
description: 'A video with a basic title and description!',
primary: 'html5'
});
单击以播放是播放器的默认行为。您可以在设置过程中添加图像文件。如果要添加自动播放(与上面描述的相反,只需添加"autostart:true",
<div id="myElement"></div>
<script>
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "/uploads/myVideo.mp4",
image: "/uploads/myImage.jpg",
width: 640,
height: 270,
mute: true
});
</script>