Prismplayer是一套在線視頻播放技術方案,同時支持Flash和Html5兩種播放技術,可對播放器進行功能配置和皮膚定制。其在線使用文檔地址為:https://help.aliyun.com/document_detail/43549.html?spm=5176.video44236.6.128.tLFTj1
需要購買阿里雲產品和服務的,點擊此鏈接領取優惠券紅包,優惠購買哦,領取后一個月內有效: https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=fp9ccf07
以下為本人按照文檔寫的一個小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>