[英]jwplayer not working
I've downloaded the files and followed the steps provided but the player simply isn't 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>
All it shows is "Loading the Player."它只显示“加载播放器”。 As you can see I've linked the JWplayer and jquery scripts.
如您所见,我已经链接了 JWplayer 和 jquery 脚本。 What am I missing?
我错过了什么? Any help would be greatly appreciated.
任何帮助将不胜感激。 I use web expressions... when I try to follow the jwplayer link "jwplayer(container)," i says that a link could not be found.
我使用 web 表达式...当我尝试访问 jwplayer 链接“jwplayer(container)”时,我说找不到链接。
Try this code.试试这段代码。 With relative address, it works for me.
有了相对地址,它对我有用。 I hope this will help you.
我希望这能帮到您。
<!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>
Just get rid of the /
in your code so that it reads as follows:只需删除代码中的
/
,使其内容如下:
flashplayer: "player.swf"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.