使用jwplayer插件播放视频

142次阅读
没有评论

共计 668 个字符,预计需要花费 2 分钟才能阅读完成。

Github地址:https://github.com/jwplayer/jwplayer

示例代码:

<!DOCTYPE>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>use jw</title>

    <script src="jwplayer/jwplayer.js"></script>
    <!-- 并不是每个用户独有的身份码,官网给的唯一的,不用改 -->
    <script>jwplayer.key="bAoNHra71KE/mHvb0sirT4HeWLTAkpiYa1mVsA==";</script>
</head>
<body>
    <div id="myElement">Loading the player...</div>
    <script type="text/javascript">
    var playerInstance = jwplayer("myElement");
    playerInstance.setup({
        file: "http://img.zidafone.com/test.flv",
        image: "http://img.zidafone.com/test.jpg",
        width: 640,
        height: 360,
        title: 'Beautiful Woman',
        description: 'This is the most beautiful woman in the world, do you agree?'
    });
    </script>
</body>
</html>

 

正文完
 
admin
版权声明:本站原创文章,由 admin 2019-12-17发表,共计668字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码