头
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
体
<div id="test">Loading the player ...</div>
<script type="text/javascript">
jwplayer("test").setup({ // this is critical line
flashplayer: "/jwplayer/player.swf",
file: "video.mp4",
height: 270,
width: 480
});
</script>
“jwplayer.js”和“player.swf”位于根目录中的“jwplayer”文件夹中。
“video.mp4”直接在root中
div test出现在页面上,但是玩家没有。
Firefox 16
签入firebug控制台说:
ReferenceError: jwplayer is not defined
jwplayer("test").setup({