[英]jwplayer not working
我已下載文件並按照提供的步驟操作,但播放器根本無法工作。
<code>
<html>
<head>
<script type="text/javascript" src="/jwplayer.js"></script>
<script type="text/javascript" src="/jquery.js"></script>
</head>
<body>
<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "/player.swf",
file: "/video.mp4",
height: 270,
width: 480
});
</script>
</body>
</html>
</code>
它只顯示“加載播放器”。 如您所見,我已經鏈接了 JWplayer 和 jquery 腳本。 我錯過了什么? 任何幫助將不勝感激。 我使用 web 表達式...當我嘗試訪問 jwplayer 鏈接“jwplayer(container)”時,我說找不到鏈接。
試試這段代碼。 有了相對地址,它對我有用。 我希望這能幫到您。
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js/jquery.js"></script>
</head>
<body>
<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "//cdnjs.cloudflare.com/ajax/libs/jplayer/2.9.2/jplayer/jquery.jplayer.swf",
file: "http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4",
height: 270,
width: 480
});
</script>
</body>
</html>
只需刪除代碼中的/
,使其內容如下:
flashplayer: "player.swf"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.