Aplayer演示


Aplayer播放器(使用时将符号“【 】”替换成"[ ]")
单曲播放:
【player autoplay="true" showlrc="true" url="http://m.oscaches.com/mp4/djmusic/my/20170101/5.mp4" title="歌名:Fade" artist="艺人歌手:AlanWalker"/】

【player autoplay="true" showlrc="true" url="http://m.oscaches.com/mp4/djmusic/my/20170101/5.mp4" title="歌名:Fade" artist="艺人歌手:AlanWalker" autoplay="true" showlrc="true"】
【lrc】【00:00.00】歌名:Fade(DJ)【/lrc】
【/player】

网易云音乐:
【player id="29947420" autoplay="true" showlrc="true" /】

多首歌曲:
【player autoplay="true" showlrc="true" 】
【mp3 url="http://m.oscaches.com/mp4/djmusic/my/20170101/5.mp4" title="歌名:Fade" artist="艺人歌手:AlanWalker"】
【lrc】【00:00.00】歌名:Fade(DJ)【/lrc】
【/mp3】
【mp3 url="http://m.oscaches.com/mp4/djmusic/ywclub/20161101/13.mp4" title="歌名:Fade(DJ)" artist="艺人歌手:AlanWalker"】
【lrc】【00:00.00】歌名:Fade【/lrc】
【/mp3】
【/player】

网易云音乐歌曲id直接解析:
【player autoplay="true" showlrc="true" 】
【mp3 id="29947420"】
【lrc】【00:00.00】Fade - Alan Walker【/lrc】
【/mp3】
【mp3 id="29947421"】
【lrc】【00:00.00】Promesses (feat. Kaleem Taylor) 【Calyx & TeeBee Remix】 - TCHAMI【/lrc】
【/mp3】
【/player】

网易云音乐解析示例:
自动播放、显示歌词,一次加入三首歌:
【player autoplay="true" showlrc="true" id='346069,346080,29947420'/】
自动播放、显示歌词,歌单:
【player autoplay="true" showlrc="true" id='11362719' type='collect'/】
自动播放、显示歌词,艺人热门五十首:
【player autoplay="true" showlrc="true" id='3684' type='artist'/】
自动播放、显示歌词,专辑:
【player autoplay="true" showlrc="true" id='3084335' type='album'/】

如果要阻止代码解析成为播放器的话,用【 】包裹【player】标签即:
【【player autoplay="true" showlrc="true" id='3084335' type='album'/】】

输出:
【player id='3084335' type='album'/】

用到的 shortcode 标签
【player】:整个播放器的标签,里面可用下面提到的所有属性
【mp3】 :可以用歌曲属性和网易云音乐属性,用于嵌套在【player】标签内部添加音乐
【lrc】:用以添加文本的歌词,可嵌套在【mp3】,【player】标签内部;只有当其父标签只定义一首歌的时候才起作用。

关于各个标签的属性
播放器配置(只能在【player】标签中使用):
如:【player theme="#e6d0b2" autoplay="true" showlrc="true"】
theme: 设置主题颜色(十六进制),默认为 '#e6d0b2'
autoplay: 是否自动播放,默认为不自动播放,"false"(自动:"true")注:由于移动端浏览器限制,此功能在移动端浏览器将不起作用。
showlrc: 是否显示歌词,默认为显示,当值为 0 或"false"(不显示:"true")不显示歌词,否则将按照歌曲有无歌词来判断是否输出歌词。

歌曲的属性(可在【mp3】或【player】中使用,不能用于修改整个歌单的属性):
如:【mp3 url="http://abc.com/a.mp3" title="歌名" artist="艺人歌手"】
url: mp3文件的链接,必需
title: 歌曲的标题,若值为空则显示 Unknown
artist: 歌曲的艺术家,若值为空则显示 Unknown
lrcoffset: 歌词整体提前时间(ms)若这个值为负数则为歌词整体延后的时间
lrc: 歌词的lrc链接,非必需
cover: 封面图片链接,非必需,若该值为图片链接则按照链接加载封面图,若没有此属性则会按照title和artist自动从豆瓣api中查找封面图,若值为 false 则不自动查找封面,显示默认封面图片。

网易云音乐(与歌曲属性用法一样)
id: 歌曲/歌单/专辑/艺人的id ,如果是歌曲的话可用 , 分隔歌曲id一次插入多首歌曲
type: 用以判断id的类型,分为4种:song:歌曲,album:专辑,artist:艺人,collect:歌单

清空歌词,播放列表、封面图片url的缓存
前往插件设置页面点击红色清空缓存按钮即可!

标签: 音乐, dj音乐

添加新评论