Commit 22f71b71dbaf0559de44c422566371df89097c88

Authored by yinqiaojuan
1 parent 924c5a6a

0.0.8修改云测bug

CNLiveWitnessVideoModule.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveWitnessVideoModule'
11   - s.version = '0.0.7'
  11 + s.version = '0.0.8'
12 12 s.summary = '目击者视频播放功能'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveWitnessVideoModule/Classes/Controller/CNBWitnessListController.m
... ... @@ -136,7 +136,11 @@ NSString * const kIdentifier = @"CNBWitnessListCell";
136 136 }
137 137 [_tableView reloadData];
138 138 [_tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:self.currentPlayIndex inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
139   - [self playIndex:self.currentPlayIndex isAutoPlay:YES];
  139 + if ([CNLiveNetworking isNetworking]) {
  140 + [self playIndex:self.currentPlayIndex isAutoPlay:YES];
  141 + }else {
  142 + [self playIndex:self.currentPlayIndex isAutoPlay:NO];
  143 + }
140 144 }else {
141 145 if ([self.type isEqualToString:@"0"]) {
142 146 self.pageIndex = 1;
... ... @@ -483,7 +487,7 @@ NSString * const kIdentifier = @"CNBWitnessListCell";
483 487 }
484 488 - (CNEmptyView *)emptyView {
485 489 if (!_emptyView) {
486   - _emptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight) type:0];
  490 + _emptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight - kNavigationBarHeight) type:0];
487 491 }
488 492 return _emptyView;
489 493 }
... ...
CNLiveWitnessVideoModule/Classes/View/CNBWitnessPlayerManager.m
... ... @@ -9,7 +9,7 @@
9 9 #import <AVFoundation/AVFoundation.h>
10 10 #import "CNBWitnessPlayerView.h"
11 11 #import "CNBWitnessPlayerControlView.h"
12   -
  12 +#import "CNLiveNetworking.h"
13 13 @interface CNBWitnessPlayerManager ()<CNWitnessPlayerDelegate>
14 14 @property (nonatomic, strong) CNBWitnessPlayerView *playerView;
15 15 @property (nonatomic, strong) CNBWitnessPlayerModel *playerModel;
... ... @@ -71,9 +71,12 @@
71 71 - (void)witnessPlayerStatusChange:(CNWitnessPlayerState)status {
72 72 //如果是本地且播放失败
73 73 if(status == CNWitnessPlayerStateFailed ) {
74   - //如果是播放的本地文件失败,那么删除掉本地文件然后播放网络资源
75   - self.playerModel.videoURL = self.originVideoURL;
76   - [self resetToPlayNewVideo];//WithplayNowRealType:NO];
  74 + //如果播放失败,重新失败
  75 + if ([CNLiveNetworking isNetworking]) {
  76 + self.playerModel.videoURL = self.originVideoURL;
  77 + [self resetToPlayNewVideo];//WithplayNowRealType:NO];
  78 + }
  79 +
77 80 }
78 81 }
79 82 #pragma marl - Lazy
... ...