GithubHelp home page GithubHelp logo

hexo-tag-dplayer's Issues

能否取消弹幕显示

你好,请问使用hexo-tag-dplayer的时候,如果视频并非来自视频网站,本身是没有弹幕的,能否设置取消弹幕显示

插件js在首页中重复加载的解决方案(暂时)

在一部分主题中,主题会将所有文章内容放到首页中,但这样会导致了aplayer以及dplayer插件js的重复加载
(打开控制台 看看是不是多了好几行的dplayer的标识)
这对于用户访问来说是不好的
暂行解决方案
修改/hexo网站目录/node_modules/hexo-tag-(括号删除,这里填你要编辑的插件,aplayer写a,dplayer写d)player/index.js

将此段代码注释,并魔改主题

hexo.extend.filter.register('after_post_render', function(data) {
    data.content =
        util.htmlTag('script', {src: '/' + scriptDir + aplayerScript}, " ") +
        data.content;
    return data;
});

修改主题目录的head.js文件

/hexo网站目录/themes/主题名称/layout/_partial/head.js

</head>前一行添加
请根据需要添加对应行

  <script src="/assets/js/DPlayer.min.js"></script>
  <script src="/assets/js/APlayer.min.js"></script>

并执行一次

 hexo clean && hexo g

让其生效

Mistake in pjax

首页打开 《可能是目前最好用的两个 Hexo 播放器插件》,head内容不会更新,js 无法加载

使用时候遇到的bug

1,在电脑端使用的时候 ,首页面会出现 乱码的情况

image

2,在手机端首页和电脑端一样乱码,更大的问题是,在手机端Safari、Google、QQ浏览器 均不可以播放,Safari、Google,点击播放后无反应,QQ浏览器则提示:地址无效正在跳转……,

3,我用的是七牛云链接的MP4的视频:http://ozpj5yy3b.bkt.clouddn.com/01.mp4

视频加载失败

请教以下,我的hexo博客使用了该插件
第一次视频能加载出来
视频加载成功
但是一刷新页面就一直加载不出来了
视频加载失败

unknown block tag: aplayer

Template render error: (unknown path) [Line 12, Column 6]
unknown block tag: aplayer
at Object.exports.prettifyError (E:\Blog\node_modules\nunjucks\src\lib.js:34:15)
at new_cls.render (E:\Blog\node_modules\nunjucks\src\environment.js:469:27)
at new_cls.renderString (E:\Blog\node_modules\nunjucks\src\environment.js:327:21)
at E:\Blog\node_modules\hexo\lib\extend\tag.js:66:9
at Promise._execute (E:\Blog\node_modules\bluebird\js\release\debuggability.js:300:9)
at Promise._resolveFromExecutor (E:\Blog\node_modules\bluebird\js\release\promise.js:481:18)
at new Promise (E:\Blog\node_modules\bluebird\js\release\promise.js:77:14)
at Tag.render (E:\Blog\node_modules\hexo\lib\extend\tag.js:64:10)
at Object.tagFilter [as onRenderEnd] (E:\Blog\node_modules\hexo\lib\hexo\post.js:253:16)
at E:\Blog\node_modules\hexo\lib\hexo\render.js:65:19
at tryCatcher (E:\Blog\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\Blog\node_modules\bluebird\js\release\promise.js:510:31)
at Promise._settlePromise (E:\Blog\node_modules\bluebird\js\release\promise.js:567:18)
at Promise._settlePromise0 (E:\Blog\node_modules\bluebird\js\release\promise.js:612:10)
at Promise._settlePromises (E:\Blog\node_modules\bluebird\js\release\promise.js:691:18)
at Async._drainQueue (E:\Blog\node_modules\bluebird\js\release\async.js:133:16)
at Async._drainQueues (E:\Blog\node_modules\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (E:\Blog\node_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)

not compatiable with hexo-all-minify (or other plugin will remove/change html comment)

after_render filter is called, but failed to append script tags due to html_minifier filtered “dplayer used” mark

to fix: in code:

//for hexo-all-minify:
if (hexo.config.html_minifier)
  hexo.config.html_minifier.ignoreCustomComments.push(/^\s*dplayer used1/);

so bad... mark-replace mode to append dplayer script may be not a good idea, but only this can be used in hexo to avoid multiple appending (#1)

css and js can not be loaded when blog is in a subdir

TL;DR : you use the same logic to generate the DPlayer.min.js and find the DPlayer.min.js in stylesheet.

Details:
I put my blog in a subdirectory, i.e. in `_config.yml

url: https://xxx.me
root: /blog/

And I set styleDir = '/blog/assets/css/', now it puts the DPlayer.min.js in 'https:xxx.me/blog/blog/assests/css/ and the stylesheet tries to find it https:xxx.me/blog/assests/css/. WRONG!

THX

css/js filepath error: hexo generate with plug-in hexo-tag-dplayer

查看了html发现hexo 生成的引用css/js路径是在./assets/..下面,然而文件目录里边并没有对应的assets folder,所以hexo generate以后webpage调用不了dplayer module。

这个问题应该是反馈在这里还是去hexo的板块呢?

求帮助

本人小白,不太明吧,我是在一个自定义的ejs文件里怎么用呀,我把定制下面那些代码拷贝进去怎么什么都不显示呀?

cdn是不是没有续费啊

Failed to load resource: net::ERR_CONNECTION_CLOSED
shownmmp.top/:2045 Uncaught ReferenceError: AV is not defined
at (index):2045
(anonymous) @ (index):2045
(index):2139 Uncaught ReferenceError: AV is not defined
at HTMLDocument. ((index):2139)
at j (jquery.js:3094)
at Object.fireWith [as resolveWith] (jquery.js:3206)
at Function.ready (jquery.js:3412)
at HTMLDocument.I (jquery.js:3428)

DPlayer is not defined

将此插件集成到 hexo主题为butterfly 上, 第一次不加载
出现错误为:DPlayer is not defined
刷新页面就正常了
麻烦看一下
image

在线视频

想问一下这个怎么添加在线视频链接,把视频存到本地的话太大了

希望引入相对地址播放

开启 文章资源文件夹 后,在参数URL处填视频的相对地址。虽然视频可以在文章内正常播放,但是无法在首页正常播放。

开启Hexo的“文章资源文件夹(post_asset_folder: true)”功能
现有Markdown源文件和视频资源文件
source/articleName.md
source/articleName/videoName.mp4
在articleName.md中通过{% dplayer "url=videoName.mp4"%}引用视频,在文章中可以正常播放,在首页无法正常加载。通过控制台可以发现,播放器在文章中会请求http://HostName/2017/01/01/articleName/videoName.mp4,在首页会请求http://HostName/videoName.mp4

解决方案

不让视频出现在首页、/page/N/等一切非本文章的页面。在引用视频的语句前加入<!--more-->

将链接换成绝对路径,既填入{% dplayer "url=/2017/01/01/articleName/videoName.mp4"%}

作者大人更改代码,使DPlayer具有asset_path、asset_img和asset_link标签的功能

解决方案三的好处

  1. 更高效的整理资源
  2. 链接书写更简洁

而且~我发现APlayer也有相同的问题,直接艾特一下吧@grzhan
希望作者采纳这个建议,祝MoePlayer越办越好。

DPlayer.min.js:1 Uncaught RangeError: Maximum call stack size exceeded

我的页面不显示视频,打开网页console显示报错

DPlayer.min.js:1 Uncaught RangeError: Maximum call stack size exceeded
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)
    at _typeof (DPlayer.min.js:1)

我在markdown里写的也很简单
{% dplayer 'url=WLED.mp4' %}

请问如何实现清晰度切换功能

我用{% dplayer 。。。。。。 %}实现不了该功能

复制了下面这段代码进hexo,渲染出来的网页却不显示播放器
{% raw %}
。。。。。。。
{% endraw %}

怎样在md中设置视频控件的宽和高

使用起来整体很棒,可就是在md中加入相关tag后,由于视频高度很高,导致在网页上面看不全,而右键只有关于作者那些的,没有载新窗口中播放的选项,能讲一下设置高度和宽度吗?

设置宽高后,手机端显示有问题

没有设置宽高,手机端正常

{% dplayer "url=https://oss.yansheng.xyz/video/Let%20Her%20Go-J.Fla.mp4" 
"loop=yes" "theme=#FADFA3" "autoplay=false"%}

image

设置宽高后,超屏,即仍然按照电脑端进行显示

{% dplayer "url=https://oss.yansheng.xyz/video/Let%20Her%20Go-J.Fla.mp4" 
"loop=yes" "theme=#FADFA3" "autoplay=false" "width=854px" "height=480px" %}

image

注:

  1. 使用主题:https://github.com/litten/hexo-theme-yilia
  2. 该问题好像在issues中有提及,see #3

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.