阿里云Prismplayer-Web播放器的使用

Prismplayer是一套在线视频播放技术方案,同时支持Flash和Html5两种播放技术,可对播放器进行功能配置和皮肤定制。其在线使用文档地址为:https://help.aliyun.com/document_detail/43549.html?spm=5176.video44236.6.128.tLFTj1

以下为本人按照文档写的一个小demo。本例中引入的js是H5版本的

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/1.7.4/skins/default/index.css" />
    <script src="https://g.alicdn.com/de/prismplayer/1.7.4/prism-h5-min.js"></script>
    <style>
        .video-wrap {
            position: relative;
            width: 800px;
            margin: 100px auto;
        }
    </style>
</head>
<body>
<div class="video-wrap">
    <div id="J_prismPlayer" class="prism-player"></div>
</div>
<script>
    // 初始化播放器
    var player = new prismplayer({
        id: "J_prismPlayer", // 容器id
        source: "http://cloud.video.taobao.com/play/u/2554695624/p/1/e/6/t/1/fv/102/28552077.mp4",  //视频地址
        cover: "http://cdn.img.mtedu.com/images/assignment/day_3.jpg",  //播放器封面图
        autoplay: false,      // 是否自动播放
        width: "100%",       // 播放器宽度
        height: "450px",      // 播放器高度
        playsinline: true,
        seekable: true,
        skinLayout: [{
            "name": "bigPlayButton",
            "align": "cc",
            //"x": 30,
            //"y": 80
        }, {
            "align": "blabs",
            "x": 0,
            "y": 0,
            "name": "controlBar",
            "children": [
                {
                    "align": "tl",
                    "x": 15,
                    "y": 26,
                    "name": "playButton"
                }, {
                    "align": "tl",
                    "x": 10,
                    "y": 24,
                    "name": "timeDisplay"
                }, {
                    "align": "tr",
                    "x": 20,
                    "y": 25,
                    "name": "fullScreenButton"
                }, {
                    "align": "tr",
                    "x": 20,
                    "y": 25,
                    "name": "volume"
                },
                {
                    "name": "progress",
                    "align": "tlabs",
                    "x": 0,
                    "y": 0
                }
            ]
        }]
    });
</script>
</body>
</html>

 

转载于:https://www.cnblogs.com/libo0125ok/p/7027868.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值