-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
展示弹幕时,push进入一个新的页面,返回弹幕会重新开始 #28
Comments
显示什么弹幕是根据弹幕时间戳以及- (float)playTimeWithDanmakuView:(HJDanmakuView *)danmakuView; 综合计算出来的 |
目前的测试场景是: |
CADisplayLink只是当时定时器做触发用的。你是视频模式还是直播模式?视频模式:弹幕什么时候显示是根据playTimeWithDanmakuView反馈的播放时间以及弹幕的时间决定的。直播模式:弹幕没有时间戳的概念,什么时候send什么时候显示 |
我是用的直播模式,本地模拟大量弹幕发送时出现的这个问题 |
后面再观察下正式数据有没有这个问题 |
那你看看返回时模拟数据是不是重置了 |
关键问题其实是你的定时器invalidate且设置为nil了导致的。不需要在viewDidDisappear关闭定时器,而是将弹幕pause,等到返回的时候,再play。不过这样也有一个问题,就是push界面的时候定时器依然在动,要想办法停掉即可。 |
在当前页面正常展示弹幕,点击按钮push进入一个新的页面,侧滑/点击返回发现弹幕是重新开始的
The text was updated successfully, but these errors were encountered: