3.11插件hexo-tag-aplayer
插件hexo-tag-aplayer
安装
1 | npm install hexo-tag-aplayer --save |
使用
1.aplayer使用
1 | {% aplayer "她的睫毛" "周杰伦" "http://home.ustc.edu.cn/~mmmwhy/%d6%dc%bd%dc%c2%d7%20-%20%cb%fd%b5%c4%bd%de%c3%ab.mp3" "http://home.ustc.edu.cn/~mmmwhy/jay.jpg" %} |
2.MetingJS ,网易云歌单
1 | <!-- 简单示例 (id, server, type) --> |
3.网易云插件:只能单首歌曲,分享的外链
另一种播放器方式:require APlayer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"></script>
<div class="aplayer"
data-id="6870752010"
data-server="netease"
data-type="playlist"
data-fixed="false"
data-autoplay="true"
data-list-folded="true"
data-mutex="true"
data-order="random"
data-loop="all"
data-volume="0.4"
data-theme="#FADFA3"
date-preload="auto" >
</div>QQ音乐列表
1 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css"> |
一些设置的参数
| 选项 | 默认值 | 描述 |
|---|---|---|
| id | 必须值 | 歌曲 id / 播放列表 id / 相册 id / 搜索关键字 |
| server | 必须值 | 音乐平台: netease, tencent, kugou, xiami, baidu |
| type | 必须值 | song, playlist, album, search, artist |
| fixed | false |
开启固定模式 |
| mini | false |
开启迷你模式 |
| loop | all |
列表循环模式:all, one,none |
| order | list |
列表播放模式: list, random |
| volume | 0.7 | 播放器音量 |
| lrctype | 0 | 歌词格式类型 |
| listfolded | false |
指定音乐播放列表是否折叠 |
| storagename | metingjs |
LocalStorage 中存储播放器设定的键名 |
| autoplay | true |
自动播放,移动端浏览器暂时不支持此功能 |
| mutex | true |
该选项开启时,如果同页面有其他 aplayer 播放,该播放器会暂停 |
| listmaxheight | 340px |
播放列表的最大长度 |
| preload | auto |
音乐文件预载入模式,可选项: none, metadata, auto |
| theme | #ad7a86 |
播放器风格色彩设置 |
相关文章推荐
-
2021-07-24
-
2021-07-29
-
2021-07-29
-
2021-07-29
-
2021-07-30
摘要