这里的本地:不建设 web 软件的情况,意味着没有 localhost , 127.0.0.1 ,就是 file://
DIYGOD 的 Dplayer 的弹幕文件一放到本地就不能用了。
其他的我找到的播放器效果都没 Dplayer 好。。
|  |      1tadtung      2017-01-04 19:09:48 +08:00 via Android 你将播放器 js , css 这些都放在本地不就行了,,本地视频是可以播放的。。。 当然我主要用 ckplayer | 
|  |      2yexm0      2017-01-04 19:22:44 +08:00 via Android BiliLocal 不知道行不行 | 
|  |      3syahd      2017-01-04 19:23:57 +08:00 via Android 弹弹 play ,不过 windows 下才能用 | 
|  |      4ivmm OP | 
|  |      6ivmm OP @tadtung  貌似不行啊。 danmaku: { // Optional, showing danmaku, ignore this option to hide danmaku id: '9E2E3368B56CDB58', // Required, danmaku id, NOTICE: it must be unique, can not use these in your new player: `https://api.prprpr.me/dplayer/list` api: 'https://api.prprpr.me/dplayer/', // Required, danmaku api token: 'tokendemo', // Optional, danmaku token for api maximum: 1000, // Optional, maximum quantity of danmaku addition: ['https://api.prprpr.me/dplayer/bilibili?aid=6911423'] // Optional, additional danmaku, see: `Bilibili 弹幕支持` } 只要 api: 'https://api.prprpr.me/dplayer/', 无法连通,就不能加载弹幕,也就是说必须部署 web 软件才可以。 | 
|  |      7tadtung      2017-01-04 20:36:23 +08:00 via Android @ivmm 对的,你想离线就得本地部署。 当然你只是用作答辩,非生产环境,不存在负载问题,可以自己写个简单的弹幕插件。 | 
|  |      8ivmm OP @tadtung  突然想到我部署本地只是为了加载速度快和内容全而已,一个弹幕数据加载应该是很快的,不一定非要本地了(抑制我的强迫症)。 | 
|  |      9weizhenye      2017-01-04 21:29:00 +08:00 https://github.com/weizhenye/Danmaku 打个广告,一个弹幕引擎库,可能不符合你的要求,不过 demo ( https://danmaku.js.org ) 实现了把 B 站弹幕存到 localStorage 里,支持离线,可以参考一下。 | 
|  |      11ivmm OP @weizhenye  https://github.com/weizhenye/Danmaku/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3 文档里,我硬是没找到 “// 弹幕数据数组,在 emit API 中会说明其格式 comments: [],” 的用法说明 | 
|  |      12weizhenye      2017-01-04 23:22:47 +08:00 @ivmm 弹幕格式就是「发射弹幕」部分 danmaku.emit() 里的对象, comments 就是这个对象的数组。 B 站的弹幕需要转换后才行, demo 写了一个 https://github.com/weizhenye/Danmaku/blob/gh-pages/parser/bilibili.js | 
|  |      13cnbeining      2017-01-05 05:46:11 +08:00 |