Commit 1faf8da6cdc9f4cc55b1cae4c0afc0a538dcff64
1 parent
9f6a6533
修改直播退出按钮,并测试播放何时去掉加载图最佳
Showing
7 changed files
with
15 additions
and
10 deletions
LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
| @@ -628,8 +628,8 @@ | @@ -628,8 +628,8 @@ | ||
| 628 | D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; | 628 | D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; |
| 629 | D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; }; | 629 | D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; }; |
| 630 | D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMyViewController.m; sourceTree = "<group>"; }; | 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 | D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; }; | 633 | D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; }; |
| 634 | D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; }; | 634 | D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; }; |
| 635 | D29E81EB1E88DC5B008C9906 /* PriChatCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PriChatCell.h; sourceTree = "<group>"; }; | 635 | D29E81EB1E88DC5B008C9906 /* PriChatCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PriChatCell.h; sourceTree = "<group>"; }; |
| @@ -1686,8 +1686,6 @@ | @@ -1686,8 +1686,6 @@ | ||
| 1686 | 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */, | 1686 | 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */, |
| 1687 | 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */, | 1687 | 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */, |
| 1688 | 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */, | 1688 | 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */, |
| 1689 | - D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */, | ||
| 1690 | - D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */, | ||
| 1691 | D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */, | 1689 | D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */, |
| 1692 | D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */, | 1690 | D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */, |
| 1693 | 81A483151E88BED00097A80A /* LVCTVLiveViewController.h */, | 1691 | 81A483151E88BED00097A80A /* LVCTVLiveViewController.h */, |
| @@ -1719,6 +1717,8 @@ | @@ -1719,6 +1717,8 @@ | ||
| 1719 | 81A483041E88B32C0097A80A /* LVCHeaderRollCollectionViewCell.m */, | 1717 | 81A483041E88B32C0097A80A /* LVCHeaderRollCollectionViewCell.m */, |
| 1720 | 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */, | 1718 | 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */, |
| 1721 | 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */, | 1719 | 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */, |
| 1720 | + D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */, | ||
| 1721 | + D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */, | ||
| 1722 | D2A089E61E89FA720071412C /* LVCUGCLivePlayerCell.h */, | 1722 | D2A089E61E89FA720071412C /* LVCUGCLivePlayerCell.h */, |
| 1723 | D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */, | 1723 | D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */, |
| 1724 | D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */, | 1724 | D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */, |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.h
| @@ -22,6 +22,7 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型 | @@ -22,6 +22,7 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型 | ||
| 22 | }; | 22 | }; |
| 23 | @interface LiveBaseView : BaseView | 23 | @interface LiveBaseView : BaseView |
| 24 | 24 | ||
| 25 | +@property (nonatomic ,strong ) UIButton * _Nullable closeBtn; | ||
| 25 | @property (nonatomic) JumpControllerType jumpType; | 26 | @property (nonatomic) JumpControllerType jumpType; |
| 26 | @property (nonatomic ,strong) UIViewController * _Nullable viewController; | 27 | @property (nonatomic ,strong) UIViewController * _Nullable viewController; |
| 27 | @property (nonatomic ,strong ,readonly) PresentView * _Nullable presentView; | 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,7 +39,7 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | ||
| 39 | @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView; | 39 | @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView; |
| 40 | @property (nonatomic ,strong ,readwrite) AnimationBaseView * _Nullable animationBaseView;//展示层View | 40 | @property (nonatomic ,strong ,readwrite) AnimationBaseView * _Nullable animationBaseView;//展示层View |
| 41 | @property (nonatomic ,strong ) BottomToolView* _Nullable bottomToolView; | 41 | @property (nonatomic ,strong ) BottomToolView* _Nullable bottomToolView; |
| 42 | -@property (nonatomic ,strong ) UIButton * _Nullable closeBtn; | 42 | + |
| 43 | @property (nonatomic ,strong ) GiftListView * _Nullable giftListView; | 43 | @property (nonatomic ,strong ) GiftListView * _Nullable giftListView; |
| 44 | @property (nonatomic ,weak ) UIView * _Nullable giftPopView; | 44 | @property (nonatomic ,weak ) UIView * _Nullable giftPopView; |
| 45 | @property (nonatomic ,strong ,readwrite) PresentView * _Nullable presentView;//连击View | 45 | @property (nonatomic ,strong ,readwrite) PresentView * _Nullable presentView;//连击View |
| @@ -720,7 +720,6 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | @@ -720,7 +720,6 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 | ||
| 720 | closeBtn.frame = CGRectMake(SCREEN_WIDTH - 43,SCREEN_HEIGHT - self.bottomToolView.height + (self.bottomToolView.height - 33)*0.5, 33, 33); | 720 | closeBtn.frame = CGRectMake(SCREEN_WIDTH - 43,SCREEN_HEIGHT - self.bottomToolView.height + (self.bottomToolView.height - 33)*0.5, 33, 33); |
| 721 | [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseNormal"] forState:UIControlStateNormal]; | 721 | [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseNormal"] forState:UIControlStateNormal]; |
| 722 | [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseTouch"] forState:UIControlStateHighlighted]; | 722 | [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseTouch"] forState:UIControlStateHighlighted]; |
| 723 | - [closeBtn addTarget:self action:@selector(closeAction) forControlEvents:UIControlEventTouchUpInside]; | ||
| 724 | _closeBtn = closeBtn; | 723 | _closeBtn = closeBtn; |
| 725 | } | 724 | } |
| 726 | return _closeBtn; | 725 | return _closeBtn; |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
| @@ -114,6 +114,7 @@ | @@ -114,6 +114,7 @@ | ||
| 114 | _liveBaseView.jumpType = JumpControllerTypePresent; | 114 | _liveBaseView.jumpType = JumpControllerTypePresent; |
| 115 | _liveBaseView.viewController = self; | 115 | _liveBaseView.viewController = self; |
| 116 | _liveBaseView.backgroundColor = [UIColor clearColor]; | 116 | _liveBaseView.backgroundColor = [UIColor clearColor]; |
| 117 | + [_liveBaseView.closeBtn addTarget:self action:@selector(quitBtnClick) forControlEvents:UIControlEventTouchUpInside]; | ||
| 117 | } | 118 | } |
| 118 | return _liveBaseView; | 119 | return _liveBaseView; |
| 119 | } | 120 | } |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
| @@ -170,7 +170,7 @@ | @@ -170,7 +170,7 @@ | ||
| 170 | 170 | ||
| 171 | LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index]; | 171 | LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index]; |
| 172 | if (!liveListView) { | 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 | return liveListView; | 175 | return liveListView; |
| 176 | } | 176 | } |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListView.m
| @@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
| 11 | #import "LVCUGCLivePlayerCell.h" | 11 | #import "LVCUGCLivePlayerCell.h" |
| 12 | #import "LVCUGCLiveListModel.h" | 12 | #import "LVCUGCLiveListModel.h" |
| 13 | #import "LVCUGCLivePlayerModel.h" | 13 | #import "LVCUGCLivePlayerModel.h" |
| 14 | +#import "LVCUGCLivePlayerController.h" | ||
| 14 | 15 | ||
| 15 | static NSString *cellId = @"cellId"; | 16 | static NSString *cellId = @"cellId"; |
| 16 | 17 | ||
| @@ -85,7 +86,8 @@ static NSString *cellId = @"cellId"; | @@ -85,7 +86,8 @@ static NSString *cellId = @"cellId"; | ||
| 85 | 86 | ||
| 86 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { | 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 | #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 93 | #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.m
| @@ -83,7 +83,7 @@ | @@ -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 | #pragma mark - UIPanGestureRecognizer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 89 | #pragma mark - UIPanGestureRecognizer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| @@ -267,9 +267,11 @@ | @@ -267,9 +267,11 @@ | ||
| 267 | NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState); | 267 | NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState); |
| 268 | 268 | ||
| 269 | } else if ((loadState & MPMovieLoadStateStalled) != 0) { | 269 | } else if ((loadState & MPMovieLoadStateStalled) != 0) { |
| 270 | + | ||
| 270 | NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState); | 271 | NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState); |
| 271 | 272 | ||
| 272 | } else { | 273 | } else { |
| 274 | + | ||
| 273 | NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState); | 275 | NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState); |
| 274 | } | 276 | } |
| 275 | } | 277 | } |
| @@ -370,7 +372,7 @@ | @@ -370,7 +372,7 @@ | ||
| 370 | if (_player.anchorStatus == 2) { // 已结束 | 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 |