Commit 5fefe22dbb418add069f06a53d505ee5f31b84d5
1 parent
197ebef1
2.0.6 活动状态监听逻辑修改
Showing
7 changed files
with
41 additions
and
38 deletions
CNLivePlayerSDKTest/CNLivePlayerSDK.framework/CNLivePlayerSDK
No preview for this file type
CNLivePlayerSDKTest/CNLivePlayerSDK.framework/Info.plist
No preview for this file type
CNLivePlayerSDKTest/CNLivePlayerSDKTest.xcodeproj/project.pbxproj
| ... | ... | @@ -7,8 +7,8 @@ |
| 7 | 7 | objects = { |
| 8 | 8 | |
| 9 | 9 | /* Begin PBXBuildFile section */ |
| 10 | - 3238FD4F1DFABEEE00377CA4 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3238FD4E1DFABEEE00377CA4 /* CNLivePlayerSDK.framework */; }; | |
| 11 | - 3238FD511DFABEF100377CA4 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3238FD4E1DFABEEE00377CA4 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 10 | + 326B73A61E0397F800F21637 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 326B73A41E0397F000F21637 /* CNLivePlayerSDK.framework */; }; | |
| 11 | + 326B73A71E0397F800F21637 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 326B73A41E0397F000F21637 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 12 | 12 | 32B4C85A1D9B66A400925AF0 /* CNLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B4C8591D9B66A400925AF0 /* CNLiveViewController.m */; }; |
| 13 | 13 | 32B4C85D1D9B66E500925AF0 /* StreamerDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B4C85C1D9B66E500925AF0 /* StreamerDetailViewController.m */; }; |
| 14 | 14 | 32E6CA2B1D5B0AF400B58EBC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 32E6CA2A1D5B0AF400B58EBC /* main.m */; }; |
| ... | ... | @@ -30,7 +30,7 @@ |
| 30 | 30 | dstPath = ""; |
| 31 | 31 | dstSubfolderSpec = 10; |
| 32 | 32 | files = ( |
| 33 | - 3238FD511DFABEF100377CA4 /* CNLivePlayerSDK.framework in Embed Frameworks */, | |
| 33 | + 326B73A71E0397F800F21637 /* CNLivePlayerSDK.framework in Embed Frameworks */, | |
| 34 | 34 | ); |
| 35 | 35 | name = "Embed Frameworks"; |
| 36 | 36 | runOnlyForDeploymentPostprocessing = 0; |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | /* End PBXCopyFilesBuildPhase section */ |
| 39 | 39 | |
| 40 | 40 | /* Begin PBXFileReference section */ |
| 41 | - 3238FD4E1DFABEEE00377CA4 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; }; | |
| 41 | + 326B73A41E0397F000F21637 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; }; | |
| 42 | 42 | 32B4C8581D9B66A400925AF0 /* CNLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveViewController.h; sourceTree = "<group>"; }; |
| 43 | 43 | 32B4C8591D9B66A400925AF0 /* CNLiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveViewController.m; sourceTree = "<group>"; }; |
| 44 | 44 | 32B4C85B1D9B66E500925AF0 /* StreamerDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StreamerDetailViewController.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | isa = PBXFrameworksBuildPhase; |
| 69 | 69 | buildActionMask = 2147483647; |
| 70 | 70 | files = ( |
| 71 | - 3238FD4F1DFABEEE00377CA4 /* CNLivePlayerSDK.framework in Frameworks */, | |
| 71 | + 326B73A61E0397F800F21637 /* CNLivePlayerSDK.framework in Frameworks */, | |
| 72 | 72 | ); |
| 73 | 73 | runOnlyForDeploymentPostprocessing = 0; |
| 74 | 74 | }; |
| ... | ... | @@ -78,7 +78,7 @@ |
| 78 | 78 | 32E6CA1D1D5B0AF400B58EBC = { |
| 79 | 79 | isa = PBXGroup; |
| 80 | 80 | children = ( |
| 81 | - 3238FD4E1DFABEEE00377CA4 /* CNLivePlayerSDK.framework */, | |
| 81 | + 326B73A41E0397F000F21637 /* CNLivePlayerSDK.framework */, | |
| 82 | 82 | 32E6CA281D5B0AF400B58EBC /* CNLivePlayerSDKTest */, |
| 83 | 83 | 32E6CA271D5B0AF400B58EBC /* Products */, |
| 84 | 84 | ); |
| ... | ... | @@ -354,7 +354,7 @@ |
| 354 | 354 | INFOPLIST_FILE = CNLivePlayerSDKTest/Info.plist; |
| 355 | 355 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| 356 | 356 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
| 357 | - PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.libs; | |
| 357 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.video; | |
| 358 | 358 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 359 | 359 | }; |
| 360 | 360 | name = Debug; |
| ... | ... | @@ -373,7 +373,7 @@ |
| 373 | 373 | INFOPLIST_FILE = CNLivePlayerSDKTest/Info.plist; |
| 374 | 374 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; |
| 375 | 375 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; |
| 376 | - PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.libs; | |
| 376 | + PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.video; | |
| 377 | 377 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 378 | 378 | }; |
| 379 | 379 | name = Release; | ... | ... |
CNLivePlayerSDKTest/CNLivePlayerSDKTest/Player/CNLiveViewController.m
| ... | ... | @@ -9,6 +9,9 @@ |
| 9 | 9 | #import "CNLiveViewController.h" |
| 10 | 10 | #import <CNLivePlayerSDK/CNLiveMoviePlayerController.h> |
| 11 | 11 | |
| 12 | +#define kAPPID @"60_irn9edco29" | |
| 13 | +#define kAPPKEY @"69fe70bda67e059286ad509d9f5377f815955645b52f94" | |
| 14 | + | |
| 12 | 15 | @interface CNLiveViewController () |
| 13 | 16 | { |
| 14 | 17 | CNLiveMoviePlayerController *_player; |
| ... | ... | @@ -42,36 +45,36 @@ |
| 42 | 45 | //a9c5f9a2d6114bf98f2aff89a55d4f98 |
| 43 | 46 | //0e12b70817c440509d88f67d4e975fe0 |
| 44 | 47 | //点播播放 |
| 45 | - _player = [[CNLiveMoviePlayerController alloc] initVodPlayWithAppId:@"60_irg1rhs308" | |
| 46 | - appKey:@"4e7a37b27a717a9e9b0a7aea4620ee55ea61fbf923bf46" | |
| 47 | - vId:@"20161126" | |
| 48 | - authSuccess:^{ | |
| 49 | - | |
| 50 | - _player.shouldUseHWCodec = YES; | |
| 51 | - _player.view.frame = CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.width*9/16); | |
| 52 | - _player.shouldAutoplay = YES; | |
| 53 | - [_player prepareToPlay]; | |
| 54 | - [self.view addSubview:_player.view]; | |
| 55 | - | |
| 56 | - } authFailed:^(NSDictionary *errorInfo) { | |
| 57 | - NSLog(@"初始化点播播放器失败%@", errorInfo); | |
| 58 | - }]; | |
| 48 | +// _player = [[CNLiveMoviePlayerController alloc] initVodPlayWithAppId:kAPPID | |
| 49 | +// appKey:kAPPKEY | |
| 50 | +// vId:@"0e12b70817c440509d88f67d4e975fe0" | |
| 51 | +// authSuccess:^{ | |
| 52 | +// | |
| 53 | +// _player.shouldUseHWCodec = YES; | |
| 54 | +// _player.view.frame = CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.width*9/16); | |
| 55 | +// _player.shouldAutoplay = YES; | |
| 56 | +// [_player prepareToPlay]; | |
| 57 | +// [self.view addSubview:_player.view]; | |
| 58 | +// | |
| 59 | +// } authFailed:^(NSDictionary *errorInfo) { | |
| 60 | +// NSLog(@"初始化点播播放器失败%@", errorInfo); | |
| 61 | +// }]; | |
| 59 | 62 | |
| 60 | 63 | //直播播放 |
| 61 | -// _player = [[CNLiveMoviePlayerController alloc] initLivePlayWithAppId:@"60_irg1rhs308" | |
| 62 | -// appKey:@"4e7a37b27a717a9e9b0a7aea4620ee55ea61fbf923bf46" | |
| 63 | -// channelId:@"news" | |
| 64 | -// authSuccess:^{ | |
| 65 | -// | |
| 66 | -// _player.shouldUseHWCodec = YES; | |
| 67 | -// _player.view.frame = CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.width*9/16); | |
| 68 | -// _player.shouldAutoplay = YES; | |
| 69 | -// [_player prepareToPlay]; | |
| 70 | -// [self.view addSubview:_player.view]; | |
| 71 | -// | |
| 72 | -// } authFailed:^(NSDictionary *errorInfo) { | |
| 73 | -// NSLog(@"初始化直播播放器失败:%@", errorInfo); | |
| 74 | -// }]; | |
| 64 | + _player = [[CNLiveMoviePlayerController alloc] initLivePlayWithAppId:kAPPID | |
| 65 | + appKey:kAPPKEY | |
| 66 | + channelId:@"news" | |
| 67 | + authSuccess:^{ | |
| 68 | + | |
| 69 | + _player.shouldUseHWCodec = YES; | |
| 70 | + _player.view.frame = CGRectMake(0, 20, self.view.frame.size.width, self.view.frame.size.width*9/16); | |
| 71 | + _player.shouldAutoplay = YES; | |
| 72 | + [_player prepareToPlay]; | |
| 73 | + [self.view addSubview:_player.view]; | |
| 74 | + | |
| 75 | + } authFailed:^(NSDictionary *errorInfo) { | |
| 76 | + NSLog(@"初始化直播播放器失败:%@", errorInfo); | |
| 77 | + }]; | |
| 75 | 78 | |
| 76 | 79 | _playOrPauseBtn = [UIButton buttonWithType:UIButtonTypeSystem]; |
| 77 | 80 | _playOrPauseBtn.frame = CGRectMake(10, self.view.frame.size.width*9/16+20+50, 50, 50); | ... | ... |
CNLivePlayerSDKTest/CNLivePlayerSDKTest/Streamer/StreamerDetailViewController.m
| ... | ... | @@ -13,8 +13,8 @@ |
| 13 | 13 | #define Width [UIScreen mainScreen].bounds.size.width |
| 14 | 14 | #define Height [UIScreen mainScreen].bounds.size.height |
| 15 | 15 | |
| 16 | -#define kAPPID @"60_irg1rhs308" | |
| 17 | -#define kAPPKEY @"4e7a37b27a717a9e9b0a7aea4620ee55ea61fbf923bf46" | |
| 16 | +#define kAPPID @"60_irn9edco29" | |
| 17 | +#define kAPPKEY @"69fe70bda67e059286ad509d9f5377f815955645b52f94" | |
| 18 | 18 | |
| 19 | 19 | |
| 20 | 20 | @interface StreamerDetailViewController ()<UIGestureRecognizerDelegate> | ... | ... |
推流SDK文档.pdf
No preview for this file type
播放SDK文档.pdf
No preview for this file type