We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.视频连续切换码流后,弹幕非常卡(视频播放正常) 2.弹幕在暂停的时候,暂停了5分钟,就丢失了5分钟弹幕,5分钟后弹幕又出现,而且时间跟播放时间可以对应的上,具体如下: 首先,获取后台给到的弹幕数据barrageArray,这是一个数组形式给到我们客户端,for循环里面用receive方法把弹幕一个一个加进去;但是,当暂停播放同时暂停弹幕,然后继续播放的时候,我们暂停时间的弹幕全部丢失。 [barrages enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL * _Nonnull stop) {
[self.barrageModel setValuesForKeysWithDictionary:obj];//字典转化为barrage对象 if (CMTimeGetSeconds(self.videoPlayer.currentTime) < [self.barrageModel.time integerValue]) { SendBarrageType location = [self.barrageModel.location integerValue] ;// 接收到的弹幕位置 NSInteger delay = [self.barrageModel.time integerValue] - CMTimeGetSeconds(self.videoPlayer.currentTime);//delay时间 if (location == SendBarrageTypeDefault) { [self.barrageRenderer receive: [self walkTextSpriteDescriptorWithDelay:delay barrageModelBool:YES]];//加载滚动弹幕 }else{ BarrageFloatDirection direction = location == SendBarrageTypeTop ? BarrageFloatDirectionT2B : BarrageFloatDirectionB2T; [self.barrageRenderer receive: [self FloatBarrage:direction delay:delay barrageModelBool:YES]];//加载浮动弹幕 } } }];
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
1.cpu占用22-30%左右。 2.问题已经解决,是我乱调用您- (NSTimeInterval)timeForBarrageRenderer:(BarrageRenderer *)renderer方法引起的。
卡顿的仍然在,不过问题2弹幕在暂停的时候的问题已解决。
No branches or pull requests
1.视频连续切换码流后,弹幕非常卡(视频播放正常)
2.弹幕在暂停的时候,暂停了5分钟,就丢失了5分钟弹幕,5分钟后弹幕又出现,而且时间跟播放时间可以对应的上,具体如下:
首先,获取后台给到的弹幕数据barrageArray,这是一个数组形式给到我们客户端,for循环里面用receive方法把弹幕一个一个加进去;但是,当暂停播放同时暂停弹幕,然后继续播放的时候,我们暂停时间的弹幕全部丢失。
[barrages enumerateObjectsUsingBlock:^(NSDictionary *obj, NSUInteger idx, BOOL * _Nonnull stop) {
The text was updated successfully, but these errors were encountered: