Coder Social home page Coder Social logo

hexo-tag-aplayer's Introduction

hexo-tag-aplayer

npm npm

Embed APlayer(https://github.com/DIYgod/APlayer) in Hexo posts/pages.

中文文档

plugin screenshot

Installation

npm install --save hexo-tag-aplayer

Dependency

  • APlayer.js >= 1.10.0
  • Meting.js >= 1.2.0

Usage

{% aplayer title author url [picture_url, narrow, autoplay, width:xxx, lrc:xxx] %}

Option

  • title : music title
  • author: music author
  • url: music file url
  • picture_url: optional, music picture url
  • narrow: optional, narrow style
  • autoplay: optional, autoplay music, not supported by mobile browsers
  • width:xxx: optional, prefix width:, player's width (default: 100%)
  • lrc:xxx: optional, prefix lrc:, LRC file url

With post asset folders enabled, you can easily place your image, music and LRC file into asset folder, and reference them like:

{% aplayer "Caffeine" "Jeff Williams" "caffeine.mp3" "picture.jpg" "lrc:caffeine.txt" %}

With lyrics

Besides 'lrc' option, you can use aplayerlrc which has end tag to show lyrics.

{% aplayerlrc "title" "author" "url" "autoplay" %}
[00:00.00]lrc here
{% endaplayerlrc %}

With playlist

{% aplayerlist %}
{
    "narrow": false,                          // Optional, narrow style
    "autoplay": true,                         // Optional, autoplay song(s), not supported by mobile browsers
    "mode": "random",                         // Optional, play mode, can be `random` `single` `circulation`(loop) `order`(no loop), default: `circulation`
    "showlrc": 3,                             // Optional, show lrc, can be 1, 2, 3
    "mutex": true,                            // Optional, pause other players when this player playing
    "theme": "#e6d0b2",	                      // Optional, theme color, default: #b7daff
    "preload": "metadata",                    // Optional, the way to load music, can be 'none' 'metadata' 'auto', default: 'auto'
    "listmaxheight": "513px",                 // Optional, max height of play list
    "music": [
        {
            "title": "CoCo",
            "author": "Jeff Williams",
            "url": "caffeine.mp3",
            "pic": "caffeine.jpeg",
            "lrc": "caffeine.txt"
        },
        {
            "title": "アイロニ",
            "author": "鹿乃",
            "url": "irony.mp3",
            "pic": "irony.jpg"
        }
    ]
}
{% endaplayerlist %}

MeingJS support (new in 3.0)

When you use MetingJS, your blog can play musics from Tencent, Netease, Xiami, Kugou, Baidu and more.

See metowolf/MetingJS and metowolf/Meting in detail.

If you want to use MetingJS in hexo-tag-aplayer, you need enable it in _config.yml

aplayer:
  meting: true

Now you can use {% meting ...%} in your post:

<!-- Simple example (id, server, type)  -->
{% meting "60198" "netease" "playlist" %}

<!-- Advanced example -->
{% meting "60198" "netease" "playlist" "autoplay" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%}

The {% meting %} options are shown below:

Option Default Description
id required song id / playlist id / album id / search keyword
server required Music platform: netease, tencent, kugou, xiami, baidu
type required song, playlist, album, search, artist
fixed false Enable fixed mode
mini false Enable mini mode
loop all Player loop play, values: 'all', 'one', 'none'
order list Player play order, values: 'list', 'random'
volume 0.7 Default volume, notice that player will remember user setting, default volume will not work after user set volume themselves
lrctype 0 Lyric type
listfolded false Indicate whether list should folded at first
autoplay false Autoplay song(s), not supported by mobile browsers
mutex true Pause other players when this player playing
listmaxheight 340px Max height of play list
preload auto The way to load music, can be none, metadata, auto
storagename metingjs LocalStorage key that store player setting
theme #ad7a86 Theme color

Read section customization to learn how to configure self-host meting api server in hexo-tag-aplayer and other configuration.

PJAX compatible

You need destroy APlayer instances manually when you use PJAX.

$(document).on('pjax:start', function () {
    if (window.aplayers) {
        for (let i = 0; i < window.aplayers.length; i++) {
            window.aplayers[i].destroy();
        }
        window.aplayers = [];
    }
});

Customization (new in 3.0)

You can configure hexo-tag-aplayer in _config.yml:

aplayer:
  script_dir: some/place                        # Script asset path in public directory, default: 'assets/js'
  style_dir: some/place                         # Style asset path in public directory, default: 'assets/css'
  cdn: http://xxx/aplayer.min.js                # External APlayer.js url (CDN)
  style_cdn: http://xxx/aplayer.min.css         # External APlayer.css url (CDN)
  meting: true                                  # Meting support, default: false
  meting_api: http://xxx/api.php                # Meting api url
  meting_cdn: http://xxx/Meing.min.js           # External Meting.js url (CDN)
  asset_inject: true                            # Auto asset injection, default: true
  externalLink: http://xxx/aplayer.min.js       # Deprecated, use 'cdn' instead

Troubleshoot

Space within arguments

Hexo has an issue that cannot use space within tag arguments.

If you encounter this problem, install the latest (beta) version, and wrap the arguments within a string literal, for example:

{% aplayer "Caffeine" "Jeff Williams" "caffeine.mp3" "autoplay" "width:70%" "lrc:caffeine.txt" %}

Duplicate APlayer.JS loading

The plugin hooks filter after_render:html , and it would inject APlayer.js and Meting.js in <head>:

<html>
  <head>
    ...
    <script src="assets/js/aplayer.min.js"></script>
    <script src="assets/js/meting.min.js"></script>
  </head>
  ...
</html>

However, after_render:html is not fired in some cases :

  • Does not work with hexo-renderer-jade
  • after_render:html seems not to get emitted in default settings of hexo server module (hexo server), it means you have to use static serving mode( hexo server -s) instead.

In such cases, the plugin would hookafter_post_render as a fallback, which has a possibility to cause duplicate asset loadings.

If you want to solve this issue definitely, you can disable this auto-injection feature in _config.yml and insert the scripts by yourself:

aplayer:
  asset_inject: false

LICENSE

MIT

hexo-tag-aplayer's People

Contributors

diygod avatar grzhan avatar michaelhobbs avatar syhily avatar yrocq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

hexo-tag-aplayer's Issues

3.0.x roadmap

  • Object-oriented design
  • Support external Aplayer.js resource, see #24
  • Support external lyric resource, see #23
  • Support Meting API, see #21
  • Fix duplicate Aplayer.js loading, see #22
  • Configurable in _config.yml

关于引用后置资源文件夹的图片和lrc

我启用了后置资源文件夹,并且让它想作为图片和lrc储存。但是一直失败!望请赐教!
引用图片: / {%asset_img jpg.jpg %}
lrc如何引用?
以下是一部分报错文件
如何正确引用lrc? 可否举个例子?

FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Template render error: (unknown path)
  Error: Specified music file not found {%asset_img meet.jpg %}                                                  
    at Object.exports.prettifyError (/home/albert/blog/node_modules/nunjucks/src/lib.js:34:15)                     
    at /home/albert/blog/node_modules/nunjucks/src/environment.js:486:31                                           
    at new_cls.root [as rootRenderFunc] (eval at _compile (/home/albert/blog/node_modules/nunjucks/src/environment.js:565:24), <anonymous>:18:3)                                                                                      
    at new_cls.render (/home/albert/blog/node_modules/nunjucks/src/environment.js:479:15)                          
    at new_cls.renderString (/home/albert/blog/node_modules/nunjucks/src/environment.js:327:21)                    
    at /home/albert/blog/node_modules/hexo/lib/extend/tag.js:66:9                                                  
    at Promise._execute (/home/albert/blog/node_modules/bluebird/js/release/debuggability.js:303:9)                
    at Promise._resolveFromExecutor (/home/albert/blog/node_modules/bluebird/js/release/promise.js:483:18)         
    at new Promise (/home/albert/blog/node_modules/bluebird/js/release/promise.js:79:10)                           
    at Tag.render (/home/albert/blog/node_modules/hexo/lib/extend/tag.js:64:10)                                    
    at Object.tagFilter [as onRenderEnd] (/home/albert/blog/node_modules/hexo/lib/hexo/post.js:266:16)             
    at /home/albert/blog/node_modules/hexo/lib/hexo/render.js:65:19                                                
    at tryCatcher (/home/albert/blog/node_modules/bluebird/js/release/util.js:16:23)                               
    at Promise._settlePromiseFromHandler (/home/albert/blog/node_modules/bluebird/js/release/promise.js:512:31)    
    at Promise._settlePromise (/home/albert/blog/node_modules/bluebird/js/release/promise.js:569:18)               
    at Promise._settlePromise0 (/home/albert/blog/node_modules/bluebird/js/release/promise.js:614:10)              
    at Promise._settlePromises (/home/albert/blog/node_modules/bluebird/js/release/promise.js:693:18)              
    at Async._drainQueue (/home/albert/blog/node_modules/bluebird/js/release/async.js:133:16)                      
    at Async._drainQueues (/home/albert/blog/node_modules/bluebird/js/release/async.js:143:10)                     
    at Immediate.Async.drainQueues (/home/albert/blog/node_modules/bluebird/js/release/async.js:17:14)             
    at runCallback (timers.js:773:18)                                                                              
    at tryOnImmediate (timers.js:734:5)                                                                            
    at processImmediate [as _immediateCallback] (timers.js:711:5)                                                  

引入MeingJS之后播放无限制刷新(非页面刷新)

播放不成功,进度条走1s之后就又回到0
console.log报错内容如下:
APlayer v1.10.1 af84efb http://aplayer.js.org

Meting.min.js:1
MetingJS v1.2.0 https://github.com/metowolf/MetingJS

/2018/07/28/%E5%86%99%E5%9C%A8%E5%89%8D%E9%9D%A2%E7%9A%84%E8%AF%9D/#more:1 Mixed Content: The page at 'https://wencochen.github.io/2018/07/28/%E5%86%99%E5%9C%A8%E5%89%8D%E9%9D%A2%E7%9A%84%E8%AF%9D/#more' was loaded over HTTPS, but requested an insecure script 'http://v3.jiathis.com/code/jia.js'. This request has been blocked; the content must be served over HTTPS.

12121

蝦米音樂會經常失效

加載蝦米音樂會經常失效

無法加載蝦米

就算加載出來 顯示播放界面
但是歌曲播放不了

几个小问题 请教

  1. 列表怎么自动刷新?用了虾米的播放列表,我在虾米那里更新了播放列表,但是github page这里怎么刷新,hexo g -d 上去还是旧的列表清单,都没有更新。。

image
这种放在网页左下角的,在哪里改代码?能不能设定手机端不显示(只在电脑端显示)

tag player无法加载

一切配置好后,使用aplayer标签,在本地播放器没有出现。对文章内容(随便一处)进行了修改,重现hexo g,hexo s,就可以看到标签。

具体细节:

第一次hexo s的时候,发现对应的文章html页面是有如下标签的:

<link rel="stylesheet" type="text/css" href="/assets/css/APlayer.min.css"><script src="/assets/js/APlayer.min.js"> </script>
<div id="aplayer0" class="aplayer" style="margin-bottom: 20px;"></div>

对文章内容修改后,hexo g,hexo s得到的html比原来多出来的标签如下:

<script>var aplayer0 = new APlayer({element: document.getElementById("aplayer0"),narrow: false,autoplay: false,showlrc: false,music : {title: "Rain",author: "秦基博",url: "http://7xt3iw.com1.z0.glb.clouddn.com/music/Rain%E7%A7%A6%E5%9F%BA%E5%8D%9A.mp3",pic: "http://7xt3iw.com2.z0.glb.clouddn.com/music/RainLogo.png"}});aplayer0.init();</script>`

目前我的解决办法是,直接不适用aplayer标签,直接把以上标签都考进文本里面,可以解决问题,即:

<link rel="stylesheet" type="text/css" href="/assets/css/APlayer.min.css"><script src="/assets/js/APlayer.min.js"> </script>
<div id="aplayer0" class="aplayer" style="margin-bottom: 20px;"></div>
<script>var aplayer0 = new APlayer({element: document.getElementById("aplayer0"),narrow: false,autoplay: false,showlrc: false,music : {title: "Rain",author: "秦基博",url: "http://7xt3iw.com1.z0.glb.clouddn.com/music/Rain%E7%A7%A6%E5%9F%BA%E5%8D%9A.mp3",pic: "http://7xt3iw.com2.z0.glb.clouddn.com/music/RainLogo.png"}});aplayer0.init();</script>

但是不方便,请问原因是什么,谢谢。

无法控制播放进度,时间显示 NaN:NaN:NaN

我开启了hexo里面的 post_asset_folder 选项
新建了一篇post文件是 test.md
同时在 test 文件夹下放了文件 01.mp3
通过这样的方式插入播放
{% aplayer "01" "Authur" "01.mp3" %}
能够正常播放,但是就是无法控制进度,
进度条不走动,正常播放时时间显示:
-00:31(播放时间) / NaN:NaN:NaN
拖动进度条后时间显示变成:
- NaN:NaN:NaN / NaN:NaN:NaN

关于meting参数说明的建议

您在readme中是这样说明的:

<!-- Simple example (id, server, type)  -->
{% meting "60198" "netease" "playlist" %}

<!-- Advanced example -->
{% meting "60198" "netease" "playlist" "autoplay" "mutex:false" "listmaxheight:340px" "preload:none" "theme:#ad7a86"%}

在这个 Advanced example 中,并未包含 mode 参数,希望可以加上。

另外,阅读源码可以知道,前三个参数(id, server, type)是必须的且有序时才能生效,其他非必须的参数(除了 autoplay 外)都需要 参数名: 的格式才能生效,并且可以是无序的。

我的建议是,这些信息应该在您的readme中作出声明,方便普通使用者快速合理使用 XD

```hexo g``` error: value is not defined

INFO  Start processing
ReferenceError: value is not defined
    at /home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo-tag-aplayer/lib/tag/playerMeting.js:92:88
    at Array.forEach (<anonymous>)
    at MetingTag.parse (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo-tag-aplayer/lib/tag/playerMeting.js:47:20)
    at new MetingTag (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo-tag-aplayer/lib/tag/playerMeting.js:31:28)
    at Object.<anonymous> (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo-tag-aplayer/index.js:162:15)
    at NunjucksTag._run (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo/lib/extend/tag.js:120:18)
    at NunjucksTag.run (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo/lib/extend/tag.js:116:15)
    at Template.root [as rootRenderFunc] (eval at _compile (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/nunjucks/src/environment.js:615:18), <anonymous>:9:66)
    at Template.render (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/nunjucks/src/environment.js:538:10)
    at Environment.renderString (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/nunjucks/src/environment.js:362:17)
    at Promise (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo/lib/extend/tag.js:66:9)
    at Promise._execute (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/debuggability.js:303:9)
    at Promise._resolveFromExecutor (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/promise.js:79:10)
    at Tag.render (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo/lib/extend/tag.js:64:10)
    at Object.tagFilter [as onRenderEnd] (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo/lib/hexo/post.js:230:16)
    at Promise.then.then.result (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/hexo/lib/hexo/render.js:65:19)
    at tryCatcher (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/ubuntu/workspace/kmahyyg.github.io/blogrelease/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

hexo-tag-aplayer和gulp插件一起使用会报错

[13:09:53] Using gulpfile D:\Blog\gulpfile.js
[13:09:53] Starting 'minify-html'...
[13:09:53] Starting 'minify-css'...
[13:09:53] Starting 'minify-js'...

events.js:160
throw er; // Unhandled 'error' event
^
GulpUglifyError: unable to minify JavaScript
at createError (D:\Blog\node_modules\gulp-uglify\lib\create-error.js:6:14)
at apply (D:\Blog\node_modules\lodash_apply.js:16:25)
at wrapper (D:\Blog\node_modules\lodash_createCurry.js:41:12)
at D:\Blog\node_modules\gulp-uglify\lib\minify.js:54:15
at DestroyableTransform._transform (D:\Blog\node_modules\gulp-uglify\composer.js:10:23)
at DestroyableTransform.Transform._read (D:\Blog\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:182:10)
at DestroyableTransform.Transform._write (D:\Blog\node_modules\through2\node_modules\readable-stream\lib_stream_transform.js:170:83)
at doWrite (D:\Blog\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:406:64)
at writeOrBuffer (D:\Blog\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:395:5)
at DestroyableTransform.Writable.write (D:\Blog\node_modules\through2\node_modules\readable-stream\lib_stream_writable.js:322:11)

文字格式支持

法语歌有法语特殊符号的话播放会出错,希望能完善,谢谢。

FATAL Cannot find module

@grzhan @yrocq @Myer921

after I install hexo-tag-aplayer plugin,once I operate any hexo command at site dir, occur this error FATAL Cannot find module, I hava attempted to uninstall and reinstall hexo,but it is not work for me,so please help me to fix it.

the detail error info:

$ hexo
FATAL Cannot find module '/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/hexo-tag-aplayer'
Error: Cannot find module '/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/hexo-tag-aplayer'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.resolve (internal/module.js:27:19)
    at /Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/hexo/lib/hexo/load_plugins.js:52:24
    at tryCatcher (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/map.js:61:38)
    at MappingPromiseArray.PromiseArray._iterate (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise_array.js:113:31)
    at MappingPromiseArray.init (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise_array.js:77:10)
    at Promise._settlePromise (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:564:21)
    at Promise._settlePromise0 (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:636:18)
    at MappingPromiseArray.PromiseArray._resolve (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise_array.js:125:19)
    at MappingPromiseArray._filter (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/map.js:127:10)
    at MappingPromiseArray._promiseFulfilled (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/map.js:99:18)
    at Promise._settlePromise (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:572:26)
    at Promise._settlePromise0 (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:612:10)
    at Promise._settlePromises (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:691:18)
    at Promise._fulfill (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:636:18)
    at Promise._resolveCallback (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:431:57)
    at Promise._settlePromiseFromHandler (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:522:17)
    at Promise._settlePromise (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:567:18)
    at Promise._settlePromise0 (/Users/hechao/Documents/TechBlog/CniceToUpp/node_modules/bluebird/js/release/promise.js:612:10)

[建议] 设置默认播放模式

您好,我在使用hexo-tag-aplayer时,发现播放模式默认为循环播放,请问可以如何调整设置,使其“列表播放”呢?

开启 meting 后,用 {% aplayer %} 标签报错无法显示

比如这个页面原文),我用{% aplayer %}标签,F12 后能看到报错,不知为什么……

这个页面原文),我也是用{% aplayer %}标签,却能正确显示,不知为什么……

然后,按下 F12,对比上面两种情况,发现第一个页面加载了 MetingJS,而第二个页面没有加载(可能我还用{% aplayerlist %}标签吧)……

所以,我觉得解决方案应该是:在用{% aplayer %}标签的页面去除添加的 meting 链接(因为用{% aplayerlist %}标签的页面没有 meting,就能显示)。然代码小白,不知如何处理……

另外,这个页面原文)用{% meting %}标签,没问题……

meting和aplayer同时使用的时候,aplayer无法显示出播放器

开发者你们好,我发现了这样一个问题
一篇文章中,如果同时使用了meting和aplayer标签,那么meting对应的播放器可以显示,但是aplayer对应的播放器就无法显示了。
但是监控一下网络能看到,对于aplayer请求的本地音频,GET是成功获取到音频的。
感谢 @tianma8023 帮我测试,测试的时候也遇到了同样的问题。

beta.5版本应该怎么使用

我用npm命令安装了beta.5版本之后生成文章的时候报错,检查之后发现beta.5版本的包里没有index.js,再一看lib和common也没有,最后只能退回beta.4版本。这个是作者打包失误还是我使用的姿势有问题啊

歌单无法自动或手动更新

我在网易云音乐创建了一个歌单,在第一次引用的时候,可以加载歌单信息,但是将该歌单添加新的歌曲的时候,插件引用的歌单并不会更新对应的歌单,好像也无法手动更新,一直在第一次加载的歌单上。
歌单的ID号并没有改变,能否设置成自动更新歌单的方式。

关于歌词的一点问题

这个问题出现已经好久了,我也记不清是什么时候开始出现的了,以前的稳定版是这样,现在的beta版也是这样

我在文章里是这样写的

{% aplayer "朋友的酒" "李晓杰" "https://t1.aixinxi.net/o_1c3pt0b9v1i1eg03md8jt18kna.ogg" "lrc:https://t1.aixinxi.net/o_1c3pttc8b154g67r1bdtd0l1rvtc.txt" "autoplay" %}

生成的静态页面中是这样的

<div id="aplayer-tgimIrBv" class="aplayer aplayer-tag-marker" style="margin-bottom: 20px;">
            <pre class="aplayer-lrc-content"></pre>
        </div>
        <script>
          var ap = new APlayer({
            element: document.getElementById("aplayer-tgimIrBv"),
            narrow: false,
            autoplay: true,
            showlrc: true,
            music: {
              title: "朋友的酒",
              author: "李晓杰",
              url: "https://t1.aixinxi.net/o_1c3pt0b9v1i1eg03md8jt18kna.ogg",
              pic: "",
              lrc: "https://t1.aixinxi.net/o_1c3pttc8b154g67r1bdtd0l1rvtc.txt",
            }
          });
          window.aplayers || (window.aplayers = []);
          window.aplayers.push(ap);
        </script>

即使是把lrc那一句后面的逗号删掉依旧不能加载歌词,所以想请问一下,应该怎样操作才能加载歌词啊,还是我用的歌词的格式不对,以前是可以加载的。

hexo next 主题引入hexo-tag-aplayer后 播放器样式加载不出来

我用下面命令安装hexo-tag-aplayer

npm install [email protected] --save

然后在about文件夹的index,md 文件加上

{% aplayer "幸福了 然后呢" "A-Lin" "http://p8rape2j2.bkt.clouddn.com/A-Lin%20-%20%E5%B9%B8%E7%A6%8F%E4%BA%86%20%E7%84%B6%E5%90%8E%E5%91%A2.flac" "http://p8rape2j2.bkt.clouddn.com/%E5%B9%B8%E7%A6%8F%E4%BA%86%20%E7%84%B6%E5%90%8E%E5%91%A2-A-Lin.jpg" "autoplay" %}

发现音乐可以播放,但播放器css似乎没加载出来

访问地址: http://mingshan.me/about/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.