苹果cms采集的资源,自带的解析不好用,用资源站的又经常被拦截报错。
今天写出aliplayer集成到苹果cms的详细步骤
1、在苹果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 Online Settings</title> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css" /> <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script> </head> <body> <div class="prism-player" id="player-con"></div> <script> var player = new Aliplayer({ "id": "player-con", "source": parent.MacPlayer.PlayUrl, "width": "100%", "height": "620px", "autoplay": true, "isLive": false, "rePlay": false, "playsinline": true, "preload": true, "controlBarVisibility": "hover", "useH5Prism": true }, function (player) { console.log("The player is created"); } ); </script> </body> 2、在苹果cms后台添加播放器,如下图
状态:启用,编码: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();

通过以下sql语句给每条视频增加一组阿里播放;
update mac_vod set vod_play_from = CONCAT('aliplayer$$$',vod_play_from),vod_play_server=CONCAT('no$$$',vod_play_from) ,vod_play_note='$$$' ,vod_play_url=concat(vod_play_url,'$$$',vod_play_url) 以下为直接更新为阿里播放器播放 update mac_vod set vod_play_from = 'aliplayer'
主题授权提示:请在后台主题设置-主题授权-激活主题的正版授权,授权购买:RiTheme官网
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。