介绍:
TP5开发的音乐解析API对接aplayer播放器
酷狗歌单说明酷狗音乐不能解析到平台里的自建歌单
现在需要在程序里注册并且在添加歌单音乐请求示例
http://你的域名/index/music/index?id=2205345458
<div id="player" class="aplayer"></div>
<link rel="stylesheet" href="https://cdn.bootcss.com/aplayer/1.10.1/APlayer.min.css" />
<script src="https://cdn.bootcss.com/jquery/3.5.0/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/aplayer/1.10.1/APlayer.min.js"></script>
<script>
$(function(){
$.ajax({
url:"http://www.dkewl.com/index/music/index?id=2205345458", //把这里的链接替换你的歌单解析api
success:function(e){
var a=new APlayer({
element:document.getElementById("aplayer"),
autoplay:true,
fixed:true,
loop:"all",
order:"random",
listFolded:true,
showlrc:3,
theme:"#FFC0CB",
listmaxheight:"200px",
music:eval(e)});
window.aplayers||(window.aplayers=[]),
window.aplayers.push(a)}})})
</script>
暂无评论内容