time=jwplayer('flvPlayDiv').getPosition()
// console.log(time)
})
将JW Player嵌入到网页中非常的简单,只需要进行如下3个步骤:1、解压mediaplayer-viral.zip文件,将jwplayer.js和player.swf文件拷贝到工程中;
2、在页面引入jwplayer.js文件:
<script type="text/JavaScript" src="/jwplayer/jwplayer.js"></script>
3、将下面代码粘贴在body标签内,如下所示:
<div id="Container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "/jwplayer/player.swf",
file: "/uploads/video.mp4",
height: 270,
width: 480
})
</script>