text-media

博客音频视频问题

博客框架音频视频管理难题,使用插件 MoePlayer/hexo-tag-dplayerMoePlayer/hexo-tag-aplayer

MoePlayer/hexo-tag-dplayer

MoePlayer/hexo-tag-aplayer

具体步骤

  • 安装插件
1
2
npm install hexo-tag-dplayer --save
npm install hexo-tag-aplayer --save

音乐

1
{% aplayer "Caffeine" "Jeff Williams" "http://7xq131.com1.z0.glb.clouddn.com/Preparation.mp3" "autoplay" %}

如下:


        

网易云音乐

点击分享网易云音乐,生成链接

1
http://music.163.com/song/xxx?userid=xxx

可以获取歌曲号

1
2
3
4
5
6
7
8
9
<iframe
frameborder="no"
border="0"
marginwidth="0"
marginheight="0"
width=330
height=86
src="//music.163.com/outchain/player?type=2&id=xxx&auto=1&height=66"
></iframe>

更改id

如下:

视频

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{% dplayer "url=http://player.youku.com/player.php/sid/XMjc0MzExOTM2/v.swf"
"api=http://dplayer.daoapp.io"
"pic=http://vthumb.ykimg.com/05420408526754C26A0A487F140EE9DE"
"id=9E2E3368B56CDBB4"
"loop=yes"
"theme=#FADFA3"
"autoplay=false"
"token=tokendemo"
%}

{% dplayer
"url=some.mp4"
"id=someid"
"api=博客音频视频问题.png"
"addition=/some.json"
'code=player.on("loadstart",function(){console.log("loadstart")})'
"autoplay" %}

如下:

优酷

1
2
3
4
5
6
7
8
9
<embed src='http://player.youku.com/player.php/sid/XMjc0MzExOTM2/v.swf' 
allowFullScreen='true'
quality='high'
width='480'
height='400'
align='middle'
allowScriptAccess='always'
type='application/x-shockwave-flash'>
</embed>

如下:


文章作者: HibisciDai
文章链接: http://hibiscidai.com/2018/07/04/text-media/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 HibisciDai
支付宝打赏
微信打赏