- 下载并将文件上传至CMS同级根目录
GitHub - Shadownc/yzmplayer: 弹幕播放器 - 登录 你的域名/dmku进行配置数据库,参照之前搭建影视站的配置,需要先创建数据库(比如我的是:mxxxx_dmData 注意:前缀不能少包括用户名的前缀)
- 编辑dmku/config.inc.php文件修改播放器后台密码
- 登录后台 你的域名/admin密码为第3步修改的密码
- 搭建完成后进入影视站后台配置播放器,将接口地址改成你的域名/player?url
配置播放器代码
// explame.com 替换成自己的域名
MacPlayer.Html = '<iframe border="0" src="https://explame.com/player?url='+MacPlayer.PlayUrl+'" width="100%" height="'+MacPlayer.Height+'" allowtransparency="true" allowfullscreen="true" marginWidth="0" frameSpacing="0" marginHeight="0" frameBorder="0" scrolling="no" vspale="0" noResize></iframe>';
MacPlayer.Show();
部署后你会发现播放完当前这一集以后会提示5s后播放下一集,但是呢 到这里还并没有完全可以,我们还需要修改部分源码
修改/static/player/iframe.js
MacPlayer.Html = '<iframe width="100%" height="100%" src="'+MacPlayer.PlayUrl+'" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" security="restricted" sandbox="allow-same-origin allow-forms allow-scripts allow-top-navigation"></iframe>';
MacPlayer.Show();
修改/static/player/parse.js
MacPlayer.Html = '<iframe width="100%" height="100%" src="'+MacPlayer.Parse + MacPlayer.PlayUrl+'" frameborder="0" border="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen="allowfullscreen" mozallowfullscreen="mozallowfullscreen" msallowfullscreen="msallowfullscreen" oallowfullscreen="oallowfullscreen" webkitallowfullscreen="webkitallowfullscreen" security="restricted" sandbox="allow-same-origin allow-forms allow-scripts allow-top-navigation"></iframe>';
MacPlayer.Show();
站点就不放了 感兴趣的可以自己尝试