1. 首页
  2. 技术
  3. Linux

使用jwplayer插件播放视频

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,如若转载,请注明出处:https://www.huiyingwu.com/2698/

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注