1. 在页面中引入css,js文件,当时最新版本是2.8.2
<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css" />
<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js"></script>
2. 定义一个播放器容器
<div class="prism-player" id="myPlayer"></div>
3. 初始化Web播放器
其中source,cover是事先定义好的变量,及播放url和封面图
var player = new Aliplayer({
"id": "myPlayer", //播放器外层容器的dom元素id
"source":source, //视频播放地址url
"width": "100%",
"height": "300px",
"autoplay": false,