Commit 95e8023cae8b66f236f9e284402dfffa17162f17

Authored by 王军波
1 parent 08a7de95

控件

LiveVideoCloud.xcodeproj/project.pbxproj
... ... @@ -77,8 +77,6 @@
77 77 810B65061E779B1F00133E15 /* View+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64FA1E779B1F00133E15 /* View+MASAdditions.m */; };
78 78 810B65071E779B1F00133E15 /* ViewController+MASAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B64FD1E779B1F00133E15 /* ViewController+MASAdditions.m */; };
79 79 811BB68E1E8116C8005C6291 /* NSString+StringSize.m in Sources */ = {isa = PBXBuildFile; fileRef = 811BB68D1E8116C8005C6291 /* NSString+StringSize.m */; };
80   - 8178D4171F01FA2900AA78A4 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8178D4161F01FA2900AA78A4 /* CNLivePlayerSDK.framework */; };
81   - 8178D4191F01FA3600AA78A4 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8178D4161F01FA2900AA78A4 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
82 80 8178D4241F02043500AA78A4 /* LVCFullScreenPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D41F1F02043500AA78A4 /* LVCFullScreenPlayerController.m */; };
83 81 8178D4251F02043500AA78A4 /* LVCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D4211F02043500AA78A4 /* LVCLivePlayerController.m */; };
84 82 8178D4311F02044300AA78A4 /* LVCChatRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8178D42C1F02044300AA78A4 /* LVCChatRoomModel.m */; };
... ... @@ -264,6 +262,10 @@
264 262 D2EBC89B1F03421C00F198FB /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2EBC89A1F03421C00F198FB /* CNLiveChatManager.framework */; };
265 263 D2EBC89C1F03428700F198FB /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2EBC89A1F03421C00F198FB /* CNLiveChatManager.framework */; };
266 264 D2EBC89D1F03428700F198FB /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2EBC89A1F03421C00F198FB /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  265 + D2EBC8A01F034C5500F198FB /* LVCCommentView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2EBC89F1F034C5500F198FB /* LVCCommentView.m */; };
  266 + D2EBC8A21F034F3C00F198FB /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2EBC8A11F034F3C00F198FB /* CNLivePlayerSDK.framework */; };
  267 + D2EBC8A31F034F4000F198FB /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2EBC8A11F034F3C00F198FB /* CNLivePlayerSDK.framework */; };
  268 + D2EBC8A41F034F4000F198FB /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D2EBC8A11F034F3C00F198FB /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
267 269 /* End PBXBuildFile section */
268 270  
269 271 /* Begin PBXContainerItemProxy section */
... ... @@ -290,7 +292,7 @@
290 292 dstPath = "";
291 293 dstSubfolderSpec = 10;
292 294 files = (
293   - 8178D4191F01FA3600AA78A4 /* CNLivePlayerSDK.framework in Embed Frameworks */,
  295 + D2EBC8A41F034F4000F198FB /* CNLivePlayerSDK.framework in Embed Frameworks */,
294 296 D2EBC8961F0241BC00F198FB /* CNLiveMsgTools.framework in Embed Frameworks */,
295 297 D2EBC89D1F03428700F198FB /* CNLiveChatManager.framework in Embed Frameworks */,
296 298 );
... ... @@ -449,7 +451,6 @@
449 451 810B64FD1E779B1F00133E15 /* ViewController+MASAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ViewController+MASAdditions.m"; sourceTree = "<group>"; };
450 452 811BB68C1E8116C8005C6291 /* NSString+StringSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+StringSize.h"; sourceTree = "<group>"; };
451 453 811BB68D1E8116C8005C6291 /* NSString+StringSize.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+StringSize.m"; sourceTree = "<group>"; };
452   - 8178D4161F01FA2900AA78A4 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };
453 454 8178D41E1F02043500AA78A4 /* LVCFullScreenPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCFullScreenPlayerController.h; sourceTree = "<group>"; };
454 455 8178D41F1F02043500AA78A4 /* LVCFullScreenPlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCFullScreenPlayerController.m; sourceTree = "<group>"; };
455 456 8178D4201F02043500AA78A4 /* LVCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLivePlayerController.h; sourceTree = "<group>"; };
... ... @@ -820,6 +821,9 @@
820 821 D2EBC8971F025D4700F198FB /* LVCVodPlayerFullController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCVodPlayerFullController.h; sourceTree = "<group>"; };
821 822 D2EBC8981F025D4700F198FB /* LVCVodPlayerFullController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCVodPlayerFullController.m; sourceTree = "<group>"; };
822 823 D2EBC89A1F03421C00F198FB /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; };
  824 + D2EBC89E1F034C5500F198FB /* LVCCommentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCCommentView.h; sourceTree = "<group>"; };
  825 + D2EBC89F1F034C5500F198FB /* LVCCommentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCCommentView.m; sourceTree = "<group>"; };
  826 + D2EBC8A11F034F3C00F198FB /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };
823 827 /* End PBXFileReference section */
824 828  
825 829 /* Begin PBXFrameworksBuildPhase section */
... ... @@ -835,12 +839,13 @@
835 839 D2393D201F0256AA00D3EE17 /* libsqlite3.tbd in Frameworks */,
836 840 D2EBC89B1F03421C00F198FB /* CNLiveChatManager.framework in Frameworks */,
837 841 D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */,
838   - 8178D4171F01FA2900AA78A4 /* CNLivePlayerSDK.framework in Frameworks */,
839 842 D2EBC89C1F03428700F198FB /* CNLiveChatManager.framework in Frameworks */,
  843 + D2EBC8A31F034F4000F198FB /* CNLivePlayerSDK.framework in Frameworks */,
840 844 D2393D0E1F0250A100D3EE17 /* libWeChatSDK.a in Frameworks */,
841 845 D2393D1D1F0250A700D3EE17 /* libWeiboSDK.a in Frameworks */,
842 846 D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */,
843 847 D2393D071F02505400D3EE17 /* TencentOpenAPI.framework in Frameworks */,
  848 + D2EBC8A21F034F3C00F198FB /* CNLivePlayerSDK.framework in Frameworks */,
844 849 );
845 850 runOnlyForDeploymentPostprocessing = 0;
846 851 };
... ... @@ -1102,10 +1107,10 @@
1102 1107 812E504E1E7699B9004F5FCD /* CNLiveSDK */ = {
1103 1108 isa = PBXGroup;
1104 1109 children = (
  1110 + D2EBC8A11F034F3C00F198FB /* CNLivePlayerSDK.framework */,
1105 1111 D2EBC89A1F03421C00F198FB /* CNLiveChatManager.framework */,
1106 1112 D2EBC88F1F0241AD00F198FB /* CNLiveMsgTools.framework */,
1107 1113 D2393D2B1F02682000D3EE17 /* CNLiveUserSystemSDK.framework */,
1108   - 8178D4161F01FA2900AA78A4 /* CNLivePlayerSDK.framework */,
1109 1114 D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */,
1110 1115 );
1111 1116 path = CNLiveSDK;
... ... @@ -2112,6 +2117,8 @@
2112 2117 D2888DAA1E6EC014003A77C8 /* View */ = {
2113 2118 isa = PBXGroup;
2114 2119 children = (
  2120 + D2EBC89E1F034C5500F198FB /* LVCCommentView.h */,
  2121 + D2EBC89F1F034C5500F198FB /* LVCCommentView.m */,
2115 2122 );
2116 2123 path = View;
2117 2124 sourceTree = "<group>";
... ... @@ -2542,6 +2549,7 @@
2542 2549 D2029CCF1E6EADE10027CD92 /* SearchHttp.m in Sources */,
2543 2550 810B65001E779B1F00133E15 /* MASConstraintMaker.m in Sources */,
2544 2551 8178D4711F0239AD00AA78A4 /* LVCPlayerLoadingView.m in Sources */,
  2552 + D2EBC8A01F034C5500F198FB /* LVCCommentView.m in Sources */,
2545 2553 D245715C1E83A62B00AA85D6 /* BounceView.m in Sources */,
2546 2554 D2029D021E6EAE2E0027CD92 /* UIImage+ScaleImageSize.m in Sources */,
2547 2555 D2029BCC1E6EADD70027CD92 /* BaseView.m in Sources */,
... ...
LiveVideoCloud/AppDelegate/AppDelegate.m
... ... @@ -26,7 +26,7 @@
26 26 [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:YES];
27 27  
28 28 //初始化聊天SDK并连接服务器
29   - [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId ];
  29 + [[CNLiveChatManager sharedCNLiveChatManager] initWithAppKey:UserAppKey appId:UserAppId isTestEnvironment:YES];
30 30  
31 31 //初始化用户SDK
32 32 [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:YES];
... ...
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/CNLivePlayerSDK
No preview for this file type
LiveVideoCloud/Classes/CNLiveSDK/CNLivePlayerSDK.framework/Info.plist
No preview for this file type
LiveVideoCloud/Classes/Sections/UGCSections/View/LVCUGCLiveListView.m
... ... @@ -68,6 +68,12 @@ static NSString *cellId = @&quot;cellId&quot;;
68 68 LVCUGCLiveListModel *model = [LVCUGCLiveListModel modelWithDic:data];
69 69 _arrayM = model.activityList.mutableCopy;
70 70  
  71 + if (_arrayM.count == 0) {
  72 + _failedView.hidden = NO;
  73 + [self.collectionView.header endRefreshing];
  74 + return ;
  75 + }
  76 +
71 77 _timestamp = [[self timestamp] longLongValue];
72 78  
73 79 [self.collectionView.header endRefreshing];
... ...
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerController.m
... ... @@ -9,6 +9,7 @@
9 9 #import "LVCVodPlayerController.h"
10 10 #import <CNLivePlayerSDK/CNLiveMoviePlayerController.h>
11 11 #import "LVCVodPlayerFullController.h"
  12 +#import "LVCCommentView.h"
12 13  
13 14 typedef enum {
14 15 SwipeDirectionNone,
... ... @@ -43,6 +44,7 @@ typedef enum {
43 44 @property (nonatomic, strong) UISlider *volumeSlide; //声音控制
44 45 @property (nonatomic, strong) UIButton *toFullBtn;
45 46 @property (nonatomic, strong) LVCVodPlayerFullController *fullVC;
  47 +@property (nonatomic, strong) LVCCommentView *commentView;
46 48  
47 49 @end
48 50  
... ... @@ -70,6 +72,7 @@ typedef enum {
70 72  
71 73 self.view.backgroundColor = [UIColor whiteColor];
72 74 [self.view addSubview:self.playerSuperView];
  75 + [self.view addSubview:self.commentView];
73 76 }
74 77  
75 78 - (void)setModel:(ProgramModel *)model {
... ... @@ -253,6 +256,14 @@ typedef enum {
253 256 return _fullVC;
254 257 }
255 258  
  259 +- (LVCCommentView *)commentView {
  260 +
  261 + if (!_commentView) {
  262 + _commentView = [[LVCCommentView alloc] initWithFrame:CGRectMake(0, KVideoHeight + 20, KScreenWidth, KScreenHeight - KVideoHeight - 20)];
  263 + }
  264 + return _commentView;
  265 +}
  266 +
256 267 #pragma mark - Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
257 268 - (void)addNotifications {
258 269  
... ...
LiveVideoCloud/Classes/Sections/homeSections/View/LVCCommentView.h 0 → 100644
  1 +//
  2 +// LVCCommentView.h
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/6/28.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface LVCCommentView : UIView
  12 +
  13 +@property (nonatomic, strong) ProgramModel *model;
  14 +
  15 +@end
... ...
LiveVideoCloud/Classes/Sections/homeSections/View/LVCCommentView.m 0 → 100644
  1 +//
  2 +// LVCCommentView.m
  3 +// LiveVideoCloud
  4 +//
  5 +// Created by cnliveJunBo on 17/6/28.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "LVCCommentView.h"
  10 +
  11 +@interface LVCCommentView() {
  12 +
  13 + CGSize _contentSize;
  14 +}
  15 +
  16 +@property (nonatomic, strong) UILabel *titleLabel;
  17 +
  18 +@property (nonatomic, strong) UILabel *contentLabel;
  19 +
  20 +@end
  21 +
  22 +@implementation LVCCommentView
  23 +
  24 +- (instancetype)initWithFrame:(CGRect)frame
  25 +{
  26 + self = [super initWithFrame:frame];
  27 + if (self) {
  28 + [self addSubview:self.titleLabel];
  29 + [self addSubview:self.contentLabel];
  30 + }
  31 + return self;
  32 +}
  33 +
  34 +- (void)setModel:(ProgramModel *)model {
  35 +
  36 + _titleLabel.text = model.title;
  37 +}
  38 +
  39 +#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!
  40 +- (UILabel *)titleLabel {
  41 +
  42 + if (!_titleLabel) {
  43 + _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, KScreenWidth-20, 40)];
  44 + [_contentLabel setFont:[UIFont systemFontOfSize:22]];
  45 + _titleLabel.text = @"将就开始疯狂涉及到法定分";
  46 + }
  47 + return _titleLabel;
  48 +}
  49 +
  50 +- (UILabel *)contentLabel {
  51 +
  52 + if (!_contentLabel) {
  53 + _contentLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 60, KScreenWidth-20, 100)];
  54 + [_contentLabel setFont:[UIFont systemFontOfSize:14]];
  55 + _contentLabel.textColor = [UIColor grayColor];
  56 + _contentLabel.text = @"就当是妇女节阿斯顿和播放控件安徽的播放控件和巴萨的海景房吧圣诞节还发什么你打副本氨基酸等回复看见爱上对方阿斯顿发布密集恐惧恨不得能否";
  57 + _contentLabel.numberOfLines = 0;
  58 + [_contentLabel sizeToFit];
  59 + _contentSize = _contentLabel.bounds.size;
  60 + }
  61 + return _contentLabel;
  62 +}
  63 +
  64 +
  65 +
  66 +@end
... ...
LiveVideoCloud/UtilKits/ServerUrl/ZXServerUrl.m
... ... @@ -9,7 +9,7 @@
9 9 #import "ZXServerUrl.h"
10 10  
11 11 #ifdef DEBUG
12   -static NSString *serverBaseURL = @"http://api.cnlive.com";//通用测试æœåŠ¡å™¨åŸŸå
  12 +static NSString *serverBaseURL = @"http://test.open.cnlive.com/openapi/api2/";//@"http://api.cnlive.com";//通用测试æœåŠ¡å™¨åŸŸå
13 13 static NSString *serverChatBaseURL = @"http://120.92.4.46:8081";//èŠå¤©æµ‹è¯•æœåŠ¡å™¨åŸŸå
14 14 #else
15 15 static NSString *serverBaseURL = @"https://perapi.svipmovie.com";//é€šç”¨æ­£å¼æœåŠ¡å™¨åŸŸå
... ... @@ -24,7 +24,7 @@ static NSString *serverChatBaseURL = @&quot;https://perapi.svipmovie1.com&quot;;//èŠå¤©æ­
24 24 static NSString *g_SearchContentURL = @"/from/huntKeyWordApi/huntKeyWords.do";//@"api/findMessage";//å‘现消æ¯
25 25  
26 26 /** 直播列表 */
27   -static NSString *g_LiveListURL = @"/open/api2/live_epg/sp/activityList4App";
  27 +static NSString *g_LiveListURL = @"live_epg/sp/activityList4App";///open/api2/
28 28  
29 29 /** 直播活动详情 */
30 30 static NSString *g_LiveActivityInfoURL = @"/open/api2/live_epg/getLiveActivityPlayInfo4App";
... ...