繁体   English   中英

jwplayer 不工作

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM