Commit 5f6e63d2b4af9ccf140ddd24eb6563c8cc40ef52

Authored by 雷浩杰
1 parent e46f2f47

2.0.1

CNLivePlayerSDKTest/CNLivePlayerSDK.framework/CNLivePlayerSDK
No preview for this file type
CNLivePlayerSDKTest/CNLivePlayerSDK.framework/Headers/CNLiveGPUStreamerKit.h
@@ -39,13 +39,6 @@ @@ -39,13 +39,6 @@
39 isHorizontalScreen:(NSString *)isHorizontalScreen; 39 isHorizontalScreen:(NSString *)isHorizontalScreen;
40 40
41 /** 41 /**
42 - @abstract 获取推流地址  
43 - @warning 请传入所需参数后调用 (若返回失败请重新调用此方法获取推流地址)  
44 - */  
45 -- (void)getStreamerURLWithSuccess:(void (^)(void))success  
46 - failure :(void (^)(NSError *error))failure;  
47 -  
48 -/**  
49 @abstract 活动名称(非必传) 42 @abstract 活动名称(非必传)
50 */ 43 */
51 @property (nonatomic, strong) NSString *activityName; 44 @property (nonatomic, strong) NSString *activityName;
CNLivePlayerSDKTest/CNLivePlayerSDK.framework/Info.plist
No preview for this file type
CNLivePlayerSDKTest/CNLivePlayerSDKTest.xcodeproj/project.pbxproj
@@ -7,8 +7,6 @@ @@ -7,8 +7,6 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 3228BEAF1D9B969A002E600B /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3228BEAD1D9B9692002E600B /* CNLivePlayerSDK.framework */; };  
11 - 3228BEB01D9B969A002E600B /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3228BEAD1D9B9692002E600B /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };  
12 32B4C85A1D9B66A400925AF0 /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B4C8591D9B66A400925AF0 /* CNLiveViewController.m */; }; 10 32B4C85A1D9B66A400925AF0 /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B4C8591D9B66A400925AF0 /* CNLiveViewController.m */; };
13 32B4C85D1D9B66E500925AF0 /* StreamerDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B4C85C1D9B66E500925AF0 /* StreamerDetailViewController.m */; }; 11 32B4C85D1D9B66E500925AF0 /* StreamerDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B4C85C1D9B66E500925AF0 /* StreamerDetailViewController.m */; };
14 32E6CA2B1D5B0AF400B58EBC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA2A1D5B0AF400B58EBC /* main.m */; }; 12 32E6CA2B1D5B0AF400B58EBC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA2A1D5B0AF400B58EBC /* main.m */; };
@@ -21,16 +19,18 @@ @@ -21,16 +19,18 @@
21 32E6CA921D5B2AF700B58EBC /* NormalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA881D5B2AF700B58EBC /* NormalViewController.m */; }; 19 32E6CA921D5B2AF700B58EBC /* NormalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA881D5B2AF700B58EBC /* NormalViewController.m */; };
22 32E6CA931D5B2AF700B58EBC /* PlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA8A1D5B2AF700B58EBC /* PlayerViewController.m */; }; 20 32E6CA931D5B2AF700B58EBC /* PlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA8A1D5B2AF700B58EBC /* PlayerViewController.m */; };
23 32E6CA951D5B2AF700B58EBC /* StreamerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA8F1D5B2AF700B58EBC /* StreamerViewController.m */; }; 21 32E6CA951D5B2AF700B58EBC /* StreamerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA8F1D5B2AF700B58EBC /* StreamerViewController.m */; };
  22 + 32F437DF1DC9E03300A074BE /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32F437DE1DC9E03300A074BE /* CNLivePlayerSDK.framework */; };
  23 + 32F437E11DC9E04900A074BE /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 32F437DE1DC9E03300A074BE /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
24 /* End PBXBuildFile section */ 24 /* End PBXBuildFile section */
25 25
26 /* Begin PBXCopyFilesBuildPhase section */ 26 /* Begin PBXCopyFilesBuildPhase section */
27 - 32E6CA7A1D5B280B00B58EBC /* Embed Frameworks */ = { 27 + 32F437E21DC9E04900A074BE /* Embed Frameworks */ = {
28 isa = PBXCopyFilesBuildPhase; 28 isa = PBXCopyFilesBuildPhase;
29 buildActionMask = 2147483647; 29 buildActionMask = 2147483647;
30 dstPath = ""; 30 dstPath = "";
31 dstSubfolderSpec = 10; 31 dstSubfolderSpec = 10;
32 files = ( 32 files = (
33 - 3228BEB01D9B969A002E600B /* CNLivePlayerSDK.framework in Embed Frameworks */, 33 + 32F437E11DC9E04900A074BE /* CNLivePlayerSDK.framework in Embed Frameworks */,
34 ); 34 );
35 name = "Embed Frameworks"; 35 name = "Embed Frameworks";
36 runOnlyForDeploymentPostprocessing = 0; 36 runOnlyForDeploymentPostprocessing = 0;
@@ -38,7 +38,6 @@ @@ -38,7 +38,6 @@
38 /* End PBXCopyFilesBuildPhase section */ 38 /* End PBXCopyFilesBuildPhase section */
39 39
40 /* Begin PBXFileReference section */ 40 /* Begin PBXFileReference section */
41 - 3228BEAD1D9B9692002E600B /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };  
42 32B4C8581D9B66A400925AF0 /* CNLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveViewController.h; sourceTree = "<group>"; }; 41 32B4C8581D9B66A400925AF0 /* CNLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveViewController.h; sourceTree = "<group>"; };
43 32B4C8591D9B66A400925AF0 /* CNLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; }; 42 32B4C8591D9B66A400925AF0 /* CNLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; };
44 32B4C85B1D9B66E500925AF0 /* StreamerDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamerDetailViewController.h; sourceTree = "<group>"; }; 43 32B4C85B1D9B66E500925AF0 /* StreamerDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamerDetailViewController.h; sourceTree = "<group>"; };
@@ -61,6 +60,7 @@ @@ -61,6 +60,7 @@
61 32E6CA8A1D5B2AF700B58EBC /* PlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlayerViewController.m; sourceTree = "<group>"; }; 60 32E6CA8A1D5B2AF700B58EBC /* PlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlayerViewController.m; sourceTree = "<group>"; };
62 32E6CA8E1D5B2AF700B58EBC /* StreamerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamerViewController.h; sourceTree = "<group>"; }; 61 32E6CA8E1D5B2AF700B58EBC /* StreamerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamerViewController.h; sourceTree = "<group>"; };
63 32E6CA8F1D5B2AF700B58EBC /* StreamerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamerViewController.m; sourceTree = "<group>"; }; 62 32E6CA8F1D5B2AF700B58EBC /* StreamerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StreamerViewController.m; sourceTree = "<group>"; };
  63 + 32F437DE1DC9E03300A074BE /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };
64 /* End PBXFileReference section */ 64 /* End PBXFileReference section */
65 65
66 /* Begin PBXFrameworksBuildPhase section */ 66 /* Begin PBXFrameworksBuildPhase section */
@@ -68,7 +68,7 @@ @@ -68,7 +68,7 @@
68 isa = PBXFrameworksBuildPhase; 68 isa = PBXFrameworksBuildPhase;
69 buildActionMask = 2147483647; 69 buildActionMask = 2147483647;
70 files = ( 70 files = (
71 - 3228BEAF1D9B969A002E600B /* CNLivePlayerSDK.framework in Frameworks */, 71 + 32F437DF1DC9E03300A074BE /* CNLivePlayerSDK.framework in Frameworks */,
72 ); 72 );
73 runOnlyForDeploymentPostprocessing = 0; 73 runOnlyForDeploymentPostprocessing = 0;
74 }; 74 };
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 32E6CA1D1D5B0AF400B58EBC = { 78 32E6CA1D1D5B0AF400B58EBC = {
79 isa = PBXGroup; 79 isa = PBXGroup;
80 children = ( 80 children = (
81 - 3228BEAD1D9B9692002E600B /* CNLivePlayerSDK.framework */, 81 + 32F437DE1DC9E03300A074BE /* CNLivePlayerSDK.framework */,
82 32E6CA281D5B0AF400B58EBC /* CNLivePlayerSDKTest */, 82 32E6CA281D5B0AF400B58EBC /* CNLivePlayerSDKTest */,
83 32E6CA271D5B0AF400B58EBC /* Products */, 83 32E6CA271D5B0AF400B58EBC /* Products */,
84 ); 84 );
@@ -162,7 +162,7 @@ @@ -162,7 +162,7 @@
162 32E6CA221D5B0AF400B58EBC /* Sources */, 162 32E6CA221D5B0AF400B58EBC /* Sources */,
163 32E6CA231D5B0AF400B58EBC /* Frameworks */, 163 32E6CA231D5B0AF400B58EBC /* Frameworks */,
164 32E6CA241D5B0AF400B58EBC /* Resources */, 164 32E6CA241D5B0AF400B58EBC /* Resources */,
165 - 32E6CA7A1D5B280B00B58EBC /* Embed Frameworks */, 165 + 32F437E21DC9E04900A074BE /* Embed Frameworks */,
166 ); 166 );
167 buildRules = ( 167 buildRules = (
168 ); 168 );
CNLivePlayerSDKTest/CNLivePlayerSDKTest/Streamer/StreamerDetailViewController.m
@@ -40,21 +40,12 @@ @@ -40,21 +40,12 @@
40 NSString *activityId = [NSString stringWithFormat:@"%ld", (long)time]; 40 NSString *activityId = [NSString stringWithFormat:@"%ld", (long)time];
41 41
42 _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithAppId:@"60_irg1rhs308" appKey:@"4e7a37b27a717a9e9b0a7aea4620ee55ea61fbf923bf46" activityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"]; 42 _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithAppId:@"60_irg1rhs308" appKey:@"4e7a37b27a717a9e9b0a7aea4620ee55ea61fbf923bf46" activityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"];
43 -// _kitCN.activityName = @"iOS test";  
44 43
45 -// _kitCN.coverImgUrl = @"djfiwooa";  
46 -  
47 -  
48 - [_kitCN getStreamerURLWithSuccess:^{  
49 -  
50 - [self setStreamerCfg];  
51 - [self addObservers];  
52 -  
53 - } failure:^(NSError *error) {  
54 -  
55 - [self toast:[NSString stringWithFormat:@"初始化失败:%@",error.localizedDescription]];  
56 -  
57 - }]; 44 + //推流配置
  45 + [self setStreamerCfg];
  46 + [_kitCN startPreview:self.captureView];
  47 + //推流状态通知
  48 + [self addObservers];
58 49
59 }else{ 50 }else{
60 51
@@ -145,6 +136,9 @@ @@ -145,6 +136,9 @@
145 [button setTitle:@"停止直播" forState:UIControlStateNormal]; 136 [button setTitle:@"停止直播" forState:UIControlStateNormal];
146 if (_isAuthLive) { 137 if (_isAuthLive) {
147 138
  139 +#warning 活动附加信息必须在开始推流前设置
  140 + _kitCN.activityName = @"iOStest";
  141 +
148 [_kitCN startStream:^{ 142 [_kitCN startStream:^{
149 NSLog(@"success"); 143 NSLog(@"success");
150 } failure:^(NSError *error) { 144 } failure:^(NSError *error) {
推流SDK文档.pdf
No preview for this file type
播放SDK文档.pdf
No preview for this file type