苹果CMSV10整合阿里云播放器(带记忆播放)

第一步:

进入[后台],点击顶部到导航[视频],选择左边导航中的[播放器],点击[添加]

基本设置

状态:启用,
编码:aliplayer,
名称:阿里播放器,
备注:aliplayer,
目标窗口,当前,
析状态:禁用,
解析接口:空,
排序:例如100,
提示:无需安装任何插件

播放器代码

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(); 

最后保存

第二步:

进入网站根目录下/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>Aliplay记忆播放器(点播)</title>
  <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.9.3/skins/default/aliplayer-min.css" />
  <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.9.3/aliplayer-min.js"></script>
  <script type="text/javascript" charset="utf-8" src="https://player.alicdn.com/aliplayer/presentation/js/aliplayercomponents.min.js"></script>
  <style type="text/css">
    body,html{background-color:#000;padding: 0;margin: 0;width:100%;height:100%;}
    #playerCnt{width:100%;height:100%;padding:0;margin:0;display:block;}
  </style>
</head>
<body>
<div id="playerCnt" class="prism-player"></div>
<script type="text/javascript">
var player = new Aliplayer({
         id: "playerCnt",
     "source": parent.MacPlayer.PlayUrl,
      width: "100%",
     height: "100%",
   autoplay: true,
    preload: true,
     rePlay: false,
playsinline: false,
 useH5Prism: false,
     isLive: false,
 components: [{
      name: 'MemoryPlayComponent',
        type: AliPlayerComponent.MemoryPlayComponent,
      args: [true]
    }], 
}, 
function (player) {
      console.log("The player is created");
  }
 );
try{ 
//document.getElementById('liryCN').style.height = parent.MacPlayer.Height + 'px';  
}
catch(e){}
</script>
</body>
</html>
  ~  ~  The   End  ~  ~  


 赏 
感谢您的支持,我会继续努力哒!
支付宝收款码
tips
(*) 4 + 5 =
快来做第一个评论的人吧~
歌曲封面
0:00