Commit 334270a97f8c8bfe3d8e29f22af443b4a69ab739
1 parent
dd108730
点播
Showing
6 changed files
with
189 additions
and
29 deletions
LiveVideoCloud.xcodeproj/project.pbxproj
| ... | ... | @@ -203,6 +203,7 @@ |
| 203 | 203 | D217A24B1E7B76C7003B44CB /* PresentViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A2491E7B76C7003B44CB /* PresentViewCell.m */; }; |
| 204 | 204 | D217A24E1E7B77C7003B44CB /* ComboCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D217A24D1E7B77C7003B44CB /* ComboCell.m */; }; |
| 205 | 205 | D219E86B1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */; }; |
| 206 | + D219E86E1F01002400650F38 /* LVCVodPlayerListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D219E86D1F01002400650F38 /* LVCVodPlayerListView.m */; }; | |
| 206 | 207 | D224B1971E826ED800CC61D0 /* ChatBarrageAnimAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */; }; |
| 207 | 208 | D22830F11E778C0F00627701 /* LiveBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830F01E778C0F00627701 /* LiveBaseView.m */; }; |
| 208 | 209 | D22830FC1E77C2D900627701 /* BottomToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = D22830FB1E77C2D900627701 /* BottomToolView.m */; }; |
| ... | ... | @@ -717,6 +718,8 @@ |
| 717 | 718 | D217A24D1E7B77C7003B44CB /* ComboCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ComboCell.m; path = Present/ComboCell.m; sourceTree = "<group>"; }; |
| 718 | 719 | D219E8691EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCBigHorizontalCollectionViewCell.h; sourceTree = "<group>"; }; |
| 719 | 720 | D219E86A1EFD04A700650F38 /* LVCBigHorizontalCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCBigHorizontalCollectionViewCell.m; sourceTree = "<group>"; }; |
| 721 | + D219E86C1F01002400650F38 /* LVCVodPlayerListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerListView.h; sourceTree = "<group>"; }; | |
| 722 | + D219E86D1F01002400650F38 /* LVCVodPlayerListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerListView.m; sourceTree = "<group>"; }; | |
| 720 | 723 | D224B1951E826ED800CC61D0 /* ChatBarrageAnimAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrageAnimAction.h; sourceTree = "<group>"; }; |
| 721 | 724 | D224B1961E826ED800CC61D0 /* ChatBarrageAnimAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageAnimAction.m; sourceTree = "<group>"; }; |
| 722 | 725 | D22830EF1E778C0F00627701 /* LiveBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LiveBaseView.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -2150,6 +2153,8 @@ |
| 2150 | 2153 | 81CE9E1A1E8CF567000F8F6B /* LVCRequestFailedView.m */, |
| 2151 | 2154 | D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */, |
| 2152 | 2155 | D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */, |
| 2156 | + D219E86C1F01002400650F38 /* LVCVodPlayerListView.h */, | |
| 2157 | + D219E86D1F01002400650F38 /* LVCVodPlayerListView.m */, | |
| 2153 | 2158 | D2A089E61E89FA720071412C /* LVCUGCLivePlayerCell.h */, |
| 2154 | 2159 | D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */, |
| 2155 | 2160 | D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */, |
| ... | ... | @@ -2502,6 +2507,7 @@ |
| 2502 | 2507 | D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */, |
| 2503 | 2508 | 4BD855FC1EBACD530082061D /* AFHTTPSessionManager.m in Sources */, |
| 2504 | 2509 | 4B45CE841EB86A590079AFB7 /* ModifyCommonView.m in Sources */, |
| 2510 | + D219E86E1F01002400650F38 /* LVCVodPlayerListView.m in Sources */, | |
| 2505 | 2511 | 4BD856081EBACD530082061D /* UIProgressView+AFNetworking.m in Sources */, |
| 2506 | 2512 | D24571581E8393EB00AA85D6 /* UIImageView+ZXExtension.m in Sources */, |
| 2507 | 2513 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */, | ... | ... |
LiveVideoCloud.xcodeproj/xcuserdata/cnlive.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
| ... | ... | @@ -6,32 +6,16 @@ |
| 6 | 6 | <BreakpointProxy |
| 7 | 7 | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| 8 | 8 | <BreakpointContent |
| 9 | - shouldBeEnabled = "No" | |
| 10 | - ignoreCount = "0" | |
| 11 | - continueAfterRunningActions = "No" | |
| 12 | - filePath = "LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.m" | |
| 13 | - timestampString = "520154004.406962" | |
| 14 | - startingColumnNumber = "9223372036854775807" | |
| 15 | - endingColumnNumber = "9223372036854775807" | |
| 16 | - startingLineNumber = "86" | |
| 17 | - endingLineNumber = "86" | |
| 18 | - landmarkName = "-requestAppindex" | |
| 19 | - landmarkType = "7"> | |
| 20 | - </BreakpointContent> | |
| 21 | - </BreakpointProxy> | |
| 22 | - <BreakpointProxy | |
| 23 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | |
| 24 | - <BreakpointContent | |
| 25 | 9 | shouldBeEnabled = "Yes" |
| 26 | 10 | ignoreCount = "0" |
| 27 | 11 | continueAfterRunningActions = "No" |
| 28 | - filePath = "LiveVideoCloud/Classes/Sections/HomePageSections/JBBannerView.m" | |
| 29 | - timestampString = "520155014.350986" | |
| 12 | + filePath = "LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.m" | |
| 13 | + timestampString = "520223178.690427" | |
| 30 | 14 | startingColumnNumber = "9223372036854775807" |
| 31 | 15 | endingColumnNumber = "9223372036854775807" |
| 32 | - startingLineNumber = "52" | |
| 33 | - endingLineNumber = "52" | |
| 34 | - landmarkName = "-setBannerArray:" | |
| 16 | + startingLineNumber = "50" | |
| 17 | + endingLineNumber = "50" | |
| 18 | + landmarkName = "-requestVodPlayerList" | |
| 35 | 19 | landmarkType = "7"> |
| 36 | 20 | </BreakpointContent> |
| 37 | 21 | </BreakpointProxy> |
| ... | ... | @@ -41,14 +25,46 @@ |
| 41 | 25 | shouldBeEnabled = "Yes" |
| 42 | 26 | ignoreCount = "0" |
| 43 | 27 | continueAfterRunningActions = "No" |
| 44 | - filePath = "LiveVideoCloud/Classes/Sections/HomePageSections/LVCChannelPagingView.m" | |
| 45 | - timestampString = "520155233.787947" | |
| 28 | + filePath = "LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.m" | |
| 29 | + timestampString = "520223340.023266" | |
| 46 | 30 | startingColumnNumber = "9223372036854775807" |
| 47 | 31 | endingColumnNumber = "9223372036854775807" |
| 48 | - startingLineNumber = "109" | |
| 49 | - endingLineNumber = "109" | |
| 50 | - landmarkName = "-requestAppindex" | |
| 32 | + startingLineNumber = "47" | |
| 33 | + endingLineNumber = "47" | |
| 34 | + landmarkName = "-requestVodPlayerList" | |
| 51 | 35 | landmarkType = "7"> |
| 36 | + <Locations> | |
| 37 | + <Location | |
| 38 | + shouldBeEnabled = "Yes" | |
| 39 | + ignoreCount = "0" | |
| 40 | + continueAfterRunningActions = "No" | |
| 41 | + symbolName = "-[LVCVodPlayerListView requestVodPlayerList]" | |
| 42 | + moduleName = "LiveVideoCloud" | |
| 43 | + usesParentBreakpointCondition = "Yes" | |
| 44 | + urlString = "file:///Users/cnlive/Desktop/Group/LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.m" | |
| 45 | + timestampString = "520223340.032314" | |
| 46 | + startingColumnNumber = "9223372036854775807" | |
| 47 | + endingColumnNumber = "9223372036854775807" | |
| 48 | + startingLineNumber = "47" | |
| 49 | + endingLineNumber = "47" | |
| 50 | + offsetFromSymbolStart = "648"> | |
| 51 | + </Location> | |
| 52 | + <Location | |
| 53 | + shouldBeEnabled = "Yes" | |
| 54 | + ignoreCount = "0" | |
| 55 | + continueAfterRunningActions = "No" | |
| 56 | + symbolName = "__44-[LVCVodPlayerListView requestVodPlayerList]_block_invoke" | |
| 57 | + moduleName = "LiveVideoCloud" | |
| 58 | + usesParentBreakpointCondition = "Yes" | |
| 59 | + urlString = "file:///Users/cnlive/Desktop/Group/LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.m" | |
| 60 | + timestampString = "520223340.034594" | |
| 61 | + startingColumnNumber = "9223372036854775807" | |
| 62 | + endingColumnNumber = "9223372036854775807" | |
| 63 | + startingLineNumber = "49" | |
| 64 | + endingLineNumber = "49" | |
| 65 | + offsetFromSymbolStart = "80"> | |
| 66 | + </Location> | |
| 67 | + </Locations> | |
| 52 | 68 | </BreakpointContent> |
| 53 | 69 | </BreakpointProxy> |
| 54 | 70 | </Breakpoints> | ... | ... |
LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | #import "LVCTVLiveViewController.h" |
| 14 | 14 | #import "LVCTelevisionView.h" |
| 15 | 15 | #import "LVCUGCLiveListView.h" |
| 16 | +#import "LVCVodPlayerListView.h" | |
| 16 | 17 | |
| 17 | 18 | @interface HomeViewController ()<V8HorizontalPickerViewDataSource, V8HorizontalPickerViewDelegate,MHPagingScrollViewDelegate,UIScrollViewDelegate> |
| 18 | 19 | { |
| ... | ... | @@ -33,7 +34,7 @@ |
| 33 | 34 | |
| 34 | 35 | self.navigationItem.title = @"直播"; |
| 35 | 36 | |
| 36 | - _titleArr = @[@"直播",@"频道"]; | |
| 37 | + _titleArr = @[@"直播",@"电视台",@"点播"]; | |
| 37 | 38 | CGFloat width = 0; |
| 38 | 39 | for (NSString *title in _titleArr) { |
| 39 | 40 | CGSize size = [title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}]; |
| ... | ... | @@ -112,7 +113,7 @@ |
| 112 | 113 | |
| 113 | 114 | - (UIView *)pagingScrollView:(MHPagingScrollView *)pagingScrollView pageForIndex:(NSUInteger)index |
| 114 | 115 | { |
| 115 | - if ([_titleArr[index] isEqualToString:@"频道"]) { | |
| 116 | + if ([_titleArr[index] isEqualToString:@"电视台"]) { | |
| 116 | 117 | |
| 117 | 118 | LVCTelevisionView *tvView = (LVCTelevisionView *)[pagingScrollView pageViewByIndex:index]; |
| 118 | 119 | if (!tvView) { |
| ... | ... | @@ -129,6 +130,16 @@ |
| 129 | 130 | } |
| 130 | 131 | liveListView.scrollToTop = YES; |
| 131 | 132 | return liveListView; |
| 133 | + }else if ([_titleArr[index] isEqualToString:@"点播"]) { | |
| 134 | + | |
| 135 | + LVCVodPlayerListView *vodListView = (LVCVodPlayerListView *)[pagingScrollView pageViewByIndex:index]; | |
| 136 | + if (!vodListView) { | |
| 137 | + vodListView = [[LVCVodPlayerListView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 114)]; | |
| 138 | + } else { | |
| 139 | +// [vodListView isNeedToRefresh]; | |
| 140 | + } | |
| 141 | +// vodListView.scrollToTop = YES; | |
| 142 | + return vodListView; | |
| 132 | 143 | } |
| 133 | 144 | return nil; |
| 134 | 145 | } | ... | ... |
LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.h
0 → 100644
LiveVideoCloud/Classes/Sections/homeSections/View/LVCVodPlayerListView.m
0 → 100644
| 1 | +// | |
| 2 | +// LVCVodPlayerListView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/6/26. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "LVCVodPlayerListView.h" | |
| 10 | + | |
| 11 | +@interface LVCVodPlayerListView()<UITableViewDelegate, UITableViewDataSource> { | |
| 12 | + | |
| 13 | + AFHTTPRequestOperation *_operation; | |
| 14 | +} | |
| 15 | + | |
| 16 | +@property (nonatomic, strong)UITableView *tableView; | |
| 17 | + | |
| 18 | +@end | |
| 19 | + | |
| 20 | +@implementation LVCVodPlayerListView | |
| 21 | + | |
| 22 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 23 | +{ | |
| 24 | + self = [super initWithFrame:frame]; | |
| 25 | + if (self) { | |
| 26 | + self.backgroundColor = [UIColor orangeColor]; | |
| 27 | + [self requestVodPlayerList]; | |
| 28 | + } | |
| 29 | + return self; | |
| 30 | +} | |
| 31 | + | |
| 32 | +- (void)requestVodPlayerList { | |
| 33 | + | |
| 34 | + NSString *uid; | |
| 35 | + if ([UserTools isLogin]) { | |
| 36 | + uid = [UserInformationModel manager].uid; | |
| 37 | + } else { | |
| 38 | + uid = [NSString stringWithFormat:@"%u", arc4random()%3]; | |
| 39 | + } | |
| 40 | + NSString *tm = [NSString stringWithFormat:@"%u_%@", arc4random()%10, uid]; | |
| 41 | + | |
| 42 | + NSDictionary *parameter = @{@"cid": @"news", | |
| 43 | + @"page": [NSString stringWithFormat:@"%d", 1], | |
| 44 | + @"pagesize": @"15", | |
| 45 | + @"tm": tm}; | |
| 46 | + | |
| 47 | + [[AFHTTPRequestOperationManager manager] GET:Newslist parameters:[self addParameters:parameter] success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
| 48 | + | |
| 49 | + responseObject = [responseObject validatedDictionary]; | |
| 50 | + NSLog(@"%@",responseObject); | |
| 51 | + | |
| 52 | + } failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
| 53 | + | |
| 54 | + | |
| 55 | + }]; | |
| 56 | +} | |
| 57 | + | |
| 58 | +//- (void)requestVideoInfoWithMediaId:(NSString *)mediaId { | |
| 59 | +// | |
| 60 | +// [_operation cancel]; | |
| 61 | +// _operation = nil; | |
| 62 | +// NSString *urlString = [NSString stringWithFormat:@"%@%@/%@/%@.json",@"http://data.cnlive.com/epg/",[mediaId substringToIndex:2],[mediaId substringFromIndex:mediaId.length - 2],mediaId]; | |
| 63 | +// _operation = [[AFHTTPRequestOperationManager manager] GET:urlString parameters:[NSDictionary CommonParameters] success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
| 64 | +// | |
| 65 | +// responseObject = [responseObject validatedDictionary]; | |
| 66 | +// | |
| 67 | +// | |
| 68 | +// | |
| 69 | +// } failure:^(AFHTTPRequestOperation *operation, NSError *error) { | |
| 70 | +// | |
| 71 | +// NSLog(@"%@",error); | |
| 72 | +// }]; | |
| 73 | +//} | |
| 74 | + | |
| 75 | +#pragma mark - UITableViewDelegate !!!!!!!!!!!!!!!!!!!!!!!! | |
| 76 | + | |
| 77 | +#pragma mark - UITableViewDataSource !!!!!!!!!!!!!!!!!!!!!!!! | |
| 78 | + | |
| 79 | +#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 80 | +- (UITableView *)tableView { | |
| 81 | + | |
| 82 | + if (!_tableView) { | |
| 83 | + _tableView = [[UITableView alloc] initWithFrame:self.bounds style:UITableViewStylePlain]; | |
| 84 | + _tableView.dataSource = self; | |
| 85 | + _tableView.delegate = self; | |
| 86 | + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; | |
| 87 | + | |
| 88 | + UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, -KScreenHeight, KScreenWidth, KScreenHeight)]; | |
| 89 | + view.backgroundColor = [UIColor backgroundColor]; | |
| 90 | + [_tableView addSubview:view]; | |
| 91 | + | |
| 92 | +// _tableView.header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(refresh)]; | |
| 93 | +// _tableView.footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMore)]; | |
| 94 | + } | |
| 95 | + return _tableView; | |
| 96 | +} | |
| 97 | + | |
| 98 | +#pragma mark ------------------------------ 分割线 ---------------------------------------------- | |
| 99 | +- (NSDictionary *)addParameters:(NSDictionary *)dict { | |
| 100 | + | |
| 101 | + if (![dict isKindOfClass:[NSDictionary class]]) { | |
| 102 | + return dict; | |
| 103 | + } | |
| 104 | + if (!dict) { | |
| 105 | + return @{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion}; | |
| 106 | + } else { | |
| 107 | + NSMutableDictionary *dic = [[NSMutableDictionary alloc] initWithDictionary:dict]; | |
| 108 | + [dic addEntriesFromDictionary:@{@"appid": JBAppId, @"plat": @"i", @"version": JBAppVersion}]; | |
| 109 | + return [[NSDictionary alloc] initWithDictionary:dic]; | |
| 110 | + } | |
| 111 | +} | |
| 112 | + | |
| 113 | +@end | ... | ... |
LiveVideoCloud/UtilKits/Common.h
| ... | ... | @@ -191,7 +191,8 @@ static NSString *const livingFocus = @"http://app.jczb.cnlive.com/ |
| 191 | 191 | static NSString *const createRoom = @"https://api.cnlive.com/open/api2/interacitve_chat/createRoom"; |
| 192 | 192 | |
| 193 | 193 | //新闻信息 |
| 194 | -static NSString *const Newslist = @"http://app.jczb.cnlive.com/api/newslist"; | |
| 194 | +//static NSString *const Newslist = @"http://app.jczb.cnlive.com/api/newslist"; | |
| 195 | +static NSString *const Newslist = @"http://intertv.cnlive.com/zgw_sp/api/newslist"; | |
| 195 | 196 | |
| 196 | 197 | //明星底页信息 |
| 197 | 198 | static NSString *const StarAtTheBottomOfPage = @"http://app.jczb.cnlive.com/api/star?"; | ... | ... |