Commit 22f71b71dbaf0559de44c422566371df89097c88
1 parent
924c5a6a
0.0.8修改云测bug
Showing
3 changed files
with
14 additions
and
7 deletions
CNLiveWitnessVideoModule.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveWitnessVideoModule' | 10 | s.name = 'CNLiveWitnessVideoModule' |
| 11 | - s.version = '0.0.7' | 11 | + s.version = '0.0.8' |
| 12 | s.summary = '目击者视频播放功能' | 12 | s.summary = '目击者视频播放功能' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 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,7 +136,11 @@ NSString * const kIdentifier = @"CNBWitnessListCell"; | ||
| 136 | } | 136 | } |
| 137 | [_tableView reloadData]; | 137 | [_tableView reloadData]; |
| 138 | [_tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:self.currentPlayIndex inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO]; | 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 | }else { | 144 | }else { |
| 141 | if ([self.type isEqualToString:@"0"]) { | 145 | if ([self.type isEqualToString:@"0"]) { |
| 142 | self.pageIndex = 1; | 146 | self.pageIndex = 1; |
| @@ -483,7 +487,7 @@ NSString * const kIdentifier = @"CNBWitnessListCell"; | @@ -483,7 +487,7 @@ NSString * const kIdentifier = @"CNBWitnessListCell"; | ||
| 483 | } | 487 | } |
| 484 | - (CNEmptyView *)emptyView { | 488 | - (CNEmptyView *)emptyView { |
| 485 | if (!_emptyView) { | 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 | return _emptyView; | 492 | return _emptyView; |
| 489 | } | 493 | } |
CNLiveWitnessVideoModule/Classes/View/CNBWitnessPlayerManager.m
| @@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
| 9 | #import <AVFoundation/AVFoundation.h> | 9 | #import <AVFoundation/AVFoundation.h> |
| 10 | #import "CNBWitnessPlayerView.h" | 10 | #import "CNBWitnessPlayerView.h" |
| 11 | #import "CNBWitnessPlayerControlView.h" | 11 | #import "CNBWitnessPlayerControlView.h" |
| 12 | - | 12 | +#import "CNLiveNetworking.h" |
| 13 | @interface CNBWitnessPlayerManager ()<CNWitnessPlayerDelegate> | 13 | @interface CNBWitnessPlayerManager ()<CNWitnessPlayerDelegate> |
| 14 | @property (nonatomic, strong) CNBWitnessPlayerView *playerView; | 14 | @property (nonatomic, strong) CNBWitnessPlayerView *playerView; |
| 15 | @property (nonatomic, strong) CNBWitnessPlayerModel *playerModel; | 15 | @property (nonatomic, strong) CNBWitnessPlayerModel *playerModel; |
| @@ -71,9 +71,12 @@ | @@ -71,9 +71,12 @@ | ||
| 71 | - (void)witnessPlayerStatusChange:(CNWitnessPlayerState)status { | 71 | - (void)witnessPlayerStatusChange:(CNWitnessPlayerState)status { |
| 72 | //如果是本地且播放失败 | 72 | //如果是本地且播放失败 |
| 73 | if(status == CNWitnessPlayerStateFailed ) { | 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 | #pragma marl - Lazy | 82 | #pragma marl - Lazy |