Commit 1faf8da6cdc9f4cc55b1cae4c0afc0a538dcff64

Authored by 王军波
1 parent 9f6a6533

修改直播退出按钮,并测试播放何时去掉加载图最佳

LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
... ... @@ -628,8 +628,8 @@
628 628 D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; };
629 629 D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; };
630 630 D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMyViewController.m; sourceTree = "<group>"; };
631   - D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListView.h; sourceTree = "<group>"; };
632   - D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListView.m; sourceTree = "<group>"; };
  631 + D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVCUGCLiveListView.h; path = ../Controller/LVCUGCLiveListView.h; sourceTree = "<group>"; };
  632 + D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LVCUGCLiveListView.m; path = ../Controller/LVCUGCLiveListView.m; sourceTree = "<group>"; };
633 633 D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; };
634 634 D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; };
635 635 D29E81EB1E88DC5B008C9906 /* PriChatCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PriChatCell.h; sourceTree = "<group>"; };
... ... @@ -1686,8 +1686,6 @@
1686 1686 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */,
1687 1687 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */,
1688 1688 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */,
1689   - D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */,
1690   - D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */,
1691 1689 D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */,
1692 1690 D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */,
1693 1691 81A483151E88BED00097A80A /* LVCTVLiveViewController.h */,
... ... @@ -1719,6 +1717,8 @@
1719 1717 81A483041E88B32C0097A80A /* LVCHeaderRollCollectionViewCell.m */,
1720 1718 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */,
1721 1719 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */,
  1720 + D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */,
  1721 + D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */,
1722 1722 D2A089E61E89FA720071412C /* LVCUGCLivePlayerCell.h */,
1723 1723 D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */,
1724 1724 D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */,
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.h
... ... @@ -22,6 +22,7 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型
22 22 };
23 23 @interface LiveBaseView : BaseView
24 24  
  25 +@property (nonatomic ,strong ) UIButton * _Nullable closeBtn;
25 26 @property (nonatomic) JumpControllerType jumpType;
26 27 @property (nonatomic ,strong) UIViewController * _Nullable viewController;
27 28 @property (nonatomic ,strong ,readonly) PresentView * _Nullable presentView;
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
... ... @@ -39,7 +39,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
39 39 @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView;
40 40 @property (nonatomic ,strong ,readwrite) AnimationBaseView * _Nullable animationBaseView;//展示层View
41 41 @property (nonatomic ,strong ) BottomToolView* _Nullable bottomToolView;
42   -@property (nonatomic ,strong ) UIButton * _Nullable closeBtn;
  42 +
43 43 @property (nonatomic ,strong ) GiftListView * _Nullable giftListView;
44 44 @property (nonatomic ,weak ) UIView * _Nullable giftPopView;
45 45 @property (nonatomic ,strong ,readwrite) PresentView * _Nullable presentView;//连击View
... ... @@ -720,7 +720,6 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
720 720 closeBtn.frame = CGRectMake(SCREEN_WIDTH - 43,SCREEN_HEIGHT - self.bottomToolView.height + (self.bottomToolView.height - 33)*0.5, 33, 33);
721 721 [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseNormal"] forState:UIControlStateNormal];
722 722 [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseTouch"] forState:UIControlStateHighlighted];
723   - [closeBtn addTarget:self action:@selector(closeAction) forControlEvents:UIControlEventTouchUpInside];
724 723 _closeBtn = closeBtn;
725 724 }
726 725 return _closeBtn;
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
... ... @@ -114,6 +114,7 @@
114 114 _liveBaseView.jumpType = JumpControllerTypePresent;
115 115 _liveBaseView.viewController = self;
116 116 _liveBaseView.backgroundColor = [UIColor clearColor];
  117 + [_liveBaseView.closeBtn addTarget:self action:@selector(quitBtnClick) forControlEvents:UIControlEventTouchUpInside];
117 118 }
118 119 return _liveBaseView;
119 120 }
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
... ... @@ -170,7 +170,7 @@
170 170  
171 171 LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index];
172 172 if (!liveListView) {
173   - liveListView = [[LVCUGCLiveListView alloc] initWithFrame:self.view.bounds];
  173 + liveListView = [[LVCUGCLiveListView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 114)];
174 174 }
175 175 return liveListView;
176 176 }
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListView.m
... ... @@ -11,6 +11,7 @@
11 11 #import "LVCUGCLivePlayerCell.h"
12 12 #import "LVCUGCLiveListModel.h"
13 13 #import "LVCUGCLivePlayerModel.h"
  14 +#import "LVCUGCLivePlayerController.h"
14 15  
15 16 static NSString *cellId = @"cellId";
16 17  
... ... @@ -85,7 +86,8 @@ static NSString *cellId = @&quot;cellId&quot;;
85 86  
86 87 - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
87 88  
88   -
  89 + LVCUGCLivePlayerController *player = [[LVCUGCLivePlayerController alloc] init];
  90 + [self.viewController.navigationController pushViewController:player animated:YES];
89 91 }
90 92  
91 93 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
... ...
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.m
... ... @@ -83,7 +83,7 @@
83 83  
84 84 }];
85 85  
86   - //[self.view addSubview:self.bgView];
  86 + [self.view addSubview:self.bgView];
87 87 }
88 88  
89 89 #pragma mark - UIPanGestureRecognizer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
... ... @@ -267,9 +267,11 @@
267 267 NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState);
268 268  
269 269 } else if ((loadState & MPMovieLoadStateStalled) != 0) {
  270 +
270 271 NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState);
271 272  
272 273 } else {
  274 +
273 275 NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState);
274 276 }
275 277 }
... ... @@ -370,7 +372,7 @@
370 372 if (_player.anchorStatus == 2) { // 已结束
371 373  
372 374 }
373   - // _bgView.anchorStatus = _player.anchorStatus;
  375 + _bgView.anchorStatus = _player.anchorStatus;
374 376 }
375 377  
376 378  
... ...