moeplayer / hexo-tag-dplayer Goto Github PK
View Code? Open in Web Editor NEWEmbed dplayer in Hexo posts/pages
License: MIT License
Embed dplayer in Hexo posts/pages
License: MIT License
如何才能在用户”看到“的时候执行加载呢?
一个页面同时有3,4个视频跑加载,很卡的样子
@dixyes 不知道你有什么可以探讨的方案
冰喵表示不会填这坑
会填的填一下吧(
当我点击进度条任意位置时都会跳回第一秒
我的页面不显示视频,打开网页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' %}
本人小白,不太明吧,我是在一个自定义的ejs文件里怎么用呀,我把定制下面那些代码拷贝进去怎么什么都不显示呀?
Safari下无法调节视频进度;
Dplayer首页视频可以正常播放
unknown block tag: dplayer. how to fix it?
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)
有空网站重开的时候会更新掉这个问题,当然关注的小伙伴也可以提个pr让 @dixyes 审核先
这个问题请参照这个lssues解决问题
暂时无法解决 如果有人解决 欢迎提交pr
issues
在一部分主题中,主题会将所有文章内容放到首页中,但这样会导致了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
让其生效
@leizh81顺便提供下环境 吃完饭回去看看
你好,请问使用hexo-tag-dplayer的时候,如果视频并非来自视频网站,本身是没有弹幕的,能否设置取消弹幕显示
折腾了四个多小时……除了MP4不支持别的吗?还有一个问题:url的取值只能是http://img.ksbbs.com/asset/Mon_1703/d30e02a5626c066.mp4这样吗
开启 文章资源文件夹 后,在参数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标签的功能
而且~我发现APlayer也有相同的问题,直接艾特一下吧@grzhan
希望作者采纳这个建议,祝MoePlayer越办越好。
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)
使用起来整体很棒,可就是在md中加入相关tag后,由于视频高度很高,导致在网页上面看不全,而右键只有关于作者那些的,没有载新窗口中播放的选项,能讲一下设置高度和宽度吗?
想问一下这个怎么添加在线视频链接,把视频存到本地的话太大了
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
INFO DPlayer.min.css is not found in this version of dplayer, skip it.
如何解决?
没有设置宽高,手机端正常
{% dplayer "url=https://oss.yansheng.xyz/video/Let%20Her%20Go-J.Fla.mp4"
"loop=yes" "theme=#FADFA3" "autoplay=false"%}
设置宽高后,超屏,即仍然按照电脑端进行显示
{% dplayer "url=https://oss.yansheng.xyz/video/Let%20Her%20Go-J.Fla.mp4"
"loop=yes" "theme=#FADFA3" "autoplay=false" "width=854px" "height=480px" %}
注:
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)
1,在电脑端使用的时候 ,首页面会出现 乱码的情况
2,在手机端首页和电脑端一样乱码,更大的问题是,在手机端Safari、Google、QQ浏览器 均不可以播放,Safari、Google,点击播放后无反应,QQ浏览器则提示:地址无效正在跳转……,
3,我用的是七牛云链接的MP4的视频:http://ozpj5yy3b.bkt.clouddn.com/01.mp4
我用{% dplayer 。。。。。。 %}实现不了该功能
复制了下面这段代码进hexo,渲染出来的网页却不显示播放器
{% raw %}
。。。。。。。
{% endraw %}
$ hexo g
INFO Validating config
INFO DPlayer.min.css is not found in this version of dplayer, skip it.
INFO Yun version 1.6.1. Guide: https://yun.yunyoujun.cn
INFO Start processing
INFO Files loaded in 479 ms
查看了html发现hexo 生成的引用css/js路径是在./assets/..下面,然而文件目录里边并没有对应的assets folder,所以hexo generate以后webpage调用不了dplayer module。
这个问题应该是反馈在这里还是去hexo的板块呢?
从首页打开 《可能是目前最好用的两个 Hexo 播放器插件》,head内容不会更新,js 无法加载
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.