fav songs
<!DOCTYPE html>
<html lang="zh">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<link href="https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.css" rel="stylesheet">
<!-- 为博客底部添加音乐组件 -->
<div id="player" class="aplayer" style="max-width:1000px;"></div>
<!-- <script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/aplayer/1.10.1/APlayer.min.js"></script>
<script type="text/javascript">
var ap = new APlayer({
element: document.getElementById('player'),
narrow: false,
loop: 'all',<!-- 全部循环 -->
order: 'random',<!-- 随机循环 -->
volume: 0.2,<!-- 播放音量 -->
autoplay: false, <!-- 是否自动播放 -->
showlrc: true, <!--是否开启歌词功能 ,默认false(为true时musics集合中需要传入lrc字段。)-->
//fixed:1,<!-- 是否固定在左下角不动, 1即为true -->
//mini: true,
theme: '#F5F5F5', <!-- 插件背景颜色,建议和你的公告栏背景色一样,这样融为一体的感觉 -->
listFolded: false, <!-- 列表默认折叠, 这里不折叠 -->
listMaxHeight: 1000,
//lrcType: 2,
music: [{
title: 'Wake',
author: 'Hillsong Young & Free',
url: 'http://music.163.com/song/media/outer/url?id=1873321491.mp3',
pic: 'http://p2.music.126.net/Uo7OXdK3g4LQdc2hzJ14qQ==/109951166328143737.jpg?param=130y130',
lrc: ''
},
{
title: 'The Morning After',
author: 'Maureen McGovern',
url: 'http://music.163.com/song/media/outer/url?id=26771788.mp3',
pic: 'http://p2.music.126.net/9YmeUOqxw2TpFLYmbvVk6A==/5972547162661634.jpg?param=130y130',
lrc: ''
},
{
title: 'Mandy',
author: 'Barry Manilow',
url: 'http://music.163.com/song/media/outer/url?id=22067516.mp3',
pic: 'http://p2.music.126.net/WLRl3D7JGkG5usjnEYnspw==/699289395277350.jpg?param=130y130',
lrc: ''
},
{
title: 'Turning',
author: 'Suzanne Ciani',
url: 'http://music.163.com/song/media/outer/url?id=3421509.mp3',
pic: 'http://p2.music.126.net/jJ371qjoAt9zpXi4McefTw==/109951164335801235.jpg?param=130y130',
lrc: ''
},
]
});
ap.init();
</script>
</body>
</html>
https://pages-1312476901.cos.ap-chongqing.myqcloud.com/
参考 https://www.cnblogs.com/Owen-ET/p/16518266.html