Skip to content

readd button of btnDm. A bug found and repair.#5

Merged
jabbany merged 1 commit intojabbany:masterfrom
Catofes:master
Feb 24, 2014
Merged

readd button of btnDm. A bug found and repair.#5
jabbany merged 1 commit intojabbany:masterfrom
Catofes:master

Conversation

@Catofes
Copy link
Contributor

@Catofes Catofes commented Feb 24, 2014

重新在src里加入了播放器的显示和关闭按钮。
Parsers.js
里面没有考虑得到的弹幕信息本身有问题(没有数据),所以在加载
http://comment.bilibili.cn/1328045.xml
的312行会出错。添加一个判断在没有children节点时候退出。:D

重新在src里加入了播放器的显示和关闭按钮。
Parsers.js
里面没有考虑得到的弹幕信息本身有问题(没有数据),所以在加载
http://comment.bilibili.cn/1328045.xml
的312行会出错。添加一个判断在没有children节点时候退出。:D
@Catofes
Copy link
Contributor Author

Catofes commented Feb 24, 2014

<d p="167.16700744629,1,25,16777215,1391940947,0,89e7e075,395848801">ffffffff</d>
<d p="1062.0400390625,1,25,16777215,1391941062,0,3e0a22c5,395850437"/>
<d p="1240.1400146484,5,25,16711680,1391941273,0,34db3a56,395853550">咳咳.听说有人顶风作案,作为徐州分部部长。我买了2车火把。明天到货。请徐州团员联系我。</d>

就是上面这样 没有具体的数据 。B站真卖萌。

还有就是我还写了个和 video-js的插件,只把弹幕的核心功能给丢上去了 感觉还不错~

@jabbany
Copy link
Owner

jabbany commented Feb 24, 2014

卧槽竟然还有这种弹幕文件。。。之前的JSON不合规就已经很蛋疼了。。。。

还有就是我还写了个和 video-js的插件,只把弹幕的核心功能给丢上去了 感觉还不错~

之前其实也想过直接就找个现有的挂上去。。。Video-js搞了一阵搞不出来(加上当时本来Video-js界面也没那么好)于是考虑到避免库依赖就写了原生的。

jabbany added a commit that referenced this pull request Feb 24, 2014
Toggle for comments implemented. Better handling of bad/unexpected danmaku input xml.
@jabbany jabbany merged commit bc36337 into jabbany:master Feb 24, 2014
@Catofes
Copy link
Contributor Author

Catofes commented Feb 24, 2014

https://github.com/Catofes/videojsABdm

这里~~写了一个 你可以看看 ~

还有这里的移动时间我貌似改成8秒了。。1080P的屏幕如果用4s移动弹幕的话真心花眼啊

@jabbany
Copy link
Owner

jabbany commented Feb 24, 2014

效果还真是好啊!

@jabbany
Copy link
Owner

jabbany commented Feb 24, 2014

有关移动,可以打开自动 scaling,定义默认大小然后速度会自动等比放大。。。在 CommentManager对象里面有一个

cmManager.def.scrollScale = 1

在外面赋值成

cmManager.def.scrollScale = 2

就会变成8秒。改变这个数会等比的改变滚动弹幕的时间长度。如果想改变全局弹幕速度(包括定速弹幕,主要应用于视频的降速,这个ABP有实现)可以调 globalScale。ABPlayerHTML5有根据窗口大小调速的能力。。。虽然默认不开。

这个参数就是增加兼容性的这样大家就不必改库了。=w=

@Catofes
Copy link
Contributor Author

Catofes commented Feb 24, 2014

哦~ 赞~

@Catofes
Copy link
Contributor Author

Catofes commented Feb 26, 2014

http://comment.bilibili.cn/666197.xml

<d p="1050.7370605469,1,25,16777215,1393160973,0,b781b36c,407059009">卧槽</d>
<d p="1076.3690185547,1,25,16777215,1393299308,0,3ce7d9f1,407858697">这是要闹哪样</d>
<d p="1224.126953125,1,25,16777215,1393299808,0,3ce7d9f1,407861353">贫道想一个人静一静</d>
<d p="198.8450012207,8,25,16777215,1358430835,2,e64def10,169664533">a=$.createButton({motion:{alpha:{fromValue:1,toValue:0,lifeTime:3,startDelay:9000}},x:5,y:35,lifeTime:12,width:200,text:"空降的说&gt;.&lt;~喵~",onclick:function(){c=$.createComment("第一集不可以跳哦...",{x:5,y:85,lifeTime:8,motion:{alpha:{fromValue:1,toValue:0,lifeTime:3,startDelay:5000}},font:"微软雅黑",fontsize:22,color:"0x66CCFF"});}});</d>
</i

看看这个xml文档, 最后 没有> ......

@Catofes
Copy link
Contributor Author

Catofes commented Feb 26, 2014

哦 现在好了。。。奇葩无比的B站

@jabbany
Copy link
Owner

jabbany commented Feb 26, 2014

嗯。。。经常有传输数据不完整的问题。。。。

@cnbeining
Copy link

感谢这条pull request和后面的讨论,已经同步到https://github.com/superwbd/ABPlayerHTML5-Py--nix 。把弹幕时间弄长一倍,现在看起来好多了。。。

B站最近姨妈的让人想S,特别是坑爹的LA节点,三天两天挂。。。无语了。

@jabbany
Copy link
Owner

jabbany commented Mar 31, 2014

@superwbd 你应该用 scrollScale只影向滚动 (顺时和逆向)。。。globalScale也会影响定位弹幕的。。。神弹幕就不同步了。。。

@cnbeining
Copy link

恩。。。拿http://www.bilibili.tv/video/av297197/http://www.bilibili.tv/video/av316861/ 的弹幕分别进行测试, globalScale 并没有明显感觉不同步的问题。。。

但是为了避免问题还是换成修改 scrollScale 好了~

Beining

@cnbeining
Copy link

测试中发现,某些时候,仅仅修改scrollScale 改变滚动速度是无效的,需要同时修改globalScale才能达到减速效果。。。我再多做一些测试。。。

@jabbany
Copy link
Owner

jabbany commented May 2, 2014

@superwbd 嗯,找到有BUG的xml一定要告诉我一下。最近在好多人的提醒下修了N多BUG。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants