苹果CMSv10整合阿里云播放器教程

本教程是根据苹果CMSv10整合其他播放器教程整理而来,本播放器精简了弹幕和资源预加载,保留的非常强大的播放记忆功能。支持M3U8,MP4

一、第一步

在苹果CMS后台-视频-播放器-添加一个播放器 基本设置如下

状态:启用

编码:aliplayer

名称:阿里云播放器

备注:aliplayer

解析状态:禁用

解析接口:空

排序:自设 例10

提示:空

播放器代码:

 

二、第二步

在苹果CMS的网站目录找到/static/player/目录中新建一个aliplayer.html文件,并复制源码粘贴保存!

播放器代码:

MacPlayer.Html = ‘<iframe src=”‘+maccms.path+’/static/player/aliplayer.html” width=”100%” height=”‘+MacPlayer.Height+'” frameborder=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no”></iframe>’; MacPlayer.Show();

在苹果CMS的网站目录找到/static/player/目录中新建一个aliplayer.html文件,并复制源码粘贴保存!

<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″>
<meta http-equiv=”x-ua-compatible” content=”IE=edge” >
<meta name=”viewport” content=”width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no”/>
<title>Aliplayer</title>
<link rel=”stylesheet” href=”//g.alicdn.com/de/prismplayer/2.7.2/skins/default/aliplayer-min.css” />
<script type=”text/javascript” charset=”utf-8″ src=”//g.alicdn.com/de/prismplayer/2.7.2/aliplayer-min.js”></script>
<script type=”text/javascript” charset=”utf-8″ src=”//player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js”></script>
</head>
<body>
<div class=”prism-player” id=”player-con”></div>
<script>
var player = new Aliplayer({
“id”: “player-con”,
“source”: “”,
“width”: “100%”,
“height”: “100%”,
“autoplay”: true,
“isLive”: false,
components: [{
name: ‘MemoryPlayComponent’,
type: AliPlayerComponent.MemoryPlayComponent,
}]
}, function (player) {
console.log(“播放器创建成功”);
});
</script>
</body>
</html>