Commit df99a8041d2f7bd8569be65d4240580d270738e8

Authored by 朱林
1 parent 56026e7c

no message

Showing 27 changed files with 1913 additions and 45 deletions
CNLivePlayerSDKTest/CNLivePlayerSDKTest.xcodeproj/project.pbxproj
... ... @@ -23,11 +23,10 @@
23 23 8139160B1E7006B800C55553 /* FilterFunctionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 813916081E7006B800C55553 /* FilterFunctionView.m */; };
24 24 8139160C1E7006B800C55553 /* SliderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8139160A1E7006B800C55553 /* SliderView.m */; };
25 25 813916191E70085A00C55553 /* KSYGPUResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 813916181E70085A00C55553 /* KSYGPUResource.bundle */; };
26   - 814283681E73F59B0035D5A6 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 814283671E73F59B0035D5A6 /* CNLiveMsgTools.framework */; };
27   - 8142836A1E73F5A30035D5A6 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 814283671E73F59B0035D5A6 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
28   - 8142836C1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8142836B1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework */; };
29   - 8142836D1E73F8E00035D5A6 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8142836B1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework */; };
30   - 8142836E1E73F8E00035D5A6 /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8142836B1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  26 + 814283761E7405CD0035D5A6 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 814283751E7405CD0035D5A6 /* CNLiveMsgTools.framework */; };
  27 + 814283781E7406000035D5A6 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 814283751E7405CD0035D5A6 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  28 + 8142837C1E7407E10035D5A6 /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8142837B1E7407E10035D5A6 /* CNLivePlayerSDK.framework */; };
  29 + 81A32D061E7407FA00B64EFA /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 8142837B1E7407E10035D5A6 /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
31 30 /* End PBXBuildFile section */
32 31  
33 32 /* Begin PBXCopyFilesBuildPhase section */
... ... @@ -37,8 +36,8 @@
37 36 dstPath = "";
38 37 dstSubfolderSpec = 10;
39 38 files = (
40   - 8142836A1E73F5A30035D5A6 /* CNLiveMsgTools.framework in Embed Frameworks */,
41   - 8142836E1E73F8E00035D5A6 /* CNLivePlayerSDK.framework in Embed Frameworks */,
  39 + 814283781E7406000035D5A6 /* CNLiveMsgTools.framework in Embed Frameworks */,
  40 + 81A32D061E7407FA00B64EFA /* CNLivePlayerSDK.framework in Embed Frameworks */,
42 41 );
43 42 name = "Embed Frameworks";
44 43 runOnlyForDeploymentPostprocessing = 0;
... ... @@ -75,8 +74,8 @@
75 74 813916091E7006B800C55553 /* SliderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderView.h; sourceTree = "<group>"; };
76 75 8139160A1E7006B800C55553 /* SliderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SliderView.m; sourceTree = "<group>"; };
77 76 813916181E70085A00C55553 /* KSYGPUResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = KSYGPUResource.bundle; sourceTree = "<group>"; };
78   - 814283671E73F59B0035D5A6 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
79   - 8142836B1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };
  77 + 814283751E7405CD0035D5A6 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
  78 + 8142837B1E7407E10035D5A6 /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; };
80 79 /* End PBXFileReference section */
81 80  
82 81 /* Begin PBXFrameworksBuildPhase section */
... ... @@ -84,9 +83,8 @@
84 83 isa = PBXFrameworksBuildPhase;
85 84 buildActionMask = 2147483647;
86 85 files = (
87   - 8142836D1E73F8E00035D5A6 /* CNLivePlayerSDK.framework in Frameworks */,
88   - 814283681E73F59B0035D5A6 /* CNLiveMsgTools.framework in Frameworks */,
89   - 8142836C1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework in Frameworks */,
  86 + 814283761E7405CD0035D5A6 /* CNLiveMsgTools.framework in Frameworks */,
  87 + 8142837C1E7407E10035D5A6 /* CNLivePlayerSDK.framework in Frameworks */,
90 88 );
91 89 runOnlyForDeploymentPostprocessing = 0;
92 90 };
... ... @@ -96,8 +94,8 @@
96 94 32E6CA1D1D5B0AF400B58EBC = {
97 95 isa = PBXGroup;
98 96 children = (
99   - 8142836B1E73F8DB0035D5A6 /* CNLivePlayerSDK.framework */,
100   - 814283671E73F59B0035D5A6 /* CNLiveMsgTools.framework */,
  97 + 8142837B1E7407E10035D5A6 /* CNLivePlayerSDK.framework */,
  98 + 814283751E7405CD0035D5A6 /* CNLiveMsgTools.framework */,
101 99 813916181E70085A00C55553 /* KSYGPUResource.bundle */,
102 100 32E6CA281D5B0AF400B58EBC /* CNLivePlayerSDKTest */,
103 101 32E6CA271D5B0AF400B58EBC /* Products */,
... ...
CNLivePlayerSDKTest/CNLivePlayerSDKTest.xcodeproj/project.xcworkspace/xcuserdata/iOS.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
CNLivePlayerSDKTest/CNLivePlayerSDKTest/Player/BackgroundView.m
... ... @@ -21,7 +21,7 @@
21 21 {
22 22 self = [super initWithFrame:frame];
23 23 if (self) {
24   - self.backgroundColor = [UIColor colorWithRed:54 green:54 blue:54 alpha:1];
  24 + self.backgroundColor = [UIColor blackColor];
25 25 [self addSubview:self.anchorLab];
26 26 }
27 27 return self;
... ...
CNLivePlayerSDKTest/CNLivePlayerSDKTest/Player/CNLiveViewController.m
... ... @@ -49,48 +49,48 @@
49 49 [[CNLiveWebcastManager manager] initWithAppId:KAppId appKey:KAppKey];
50 50  
51 51 if (_type == PlayerTypeLiving) {
  52 +
52 53 //直播播放
53 54 _player = [[CNLiveMoviePlayerController alloc] initLivePlayWithChannelId:@"iOStest"
54 55 authSuccess:^{
55 56  
56   - _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO;
57   - _player.view.frame = self.view.bounds;
58   - _player.shouldAutoplay = YES;
59   - [_player prepareToPlay];
60   - [self.view addSubview:_player.view];
61   - [self.view sendSubviewToBack:_player.view];
62   -
63   - } authFailed:^(NSDictionary *errorInfo) {
64   - NSLog(@"初始化直播播放器失败:%@", errorInfo);
65   - [_loadingView stopLoading];
66   -
67   - } getAnchorStatusResult:^(BOOL result) {
68   -
69   - NSLog(@"-------------获取主播状态%d", result ? YES : NO);
70   -
71   - }];
72   -
  57 + _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO;
  58 + _player.view.frame = self.view.bounds;
  59 + _player.shouldAutoplay = YES;
  60 + [_player prepareToPlay];
  61 + [self.view addSubview:_player.view];
  62 + [self.view sendSubviewToBack:_player.view];
  63 +
  64 + } authFailed:^(NSDictionary *errorInfo) {
  65 + NSLog(@"初始化直播播放器失败:%@", errorInfo);
  66 + [_loadingView stopLoading];
  67 +
  68 + } getAnchorStatusResult:^(BOOL result) {
  69 +
  70 + NSLog(@"-------------获取主播状态%d", result ? YES : NO);
  71 +
  72 + }];
73 73 } else if (_type == PlayerTypeVOD) {
74 74  
75 75 //点播播放
76 76 _player = [[CNLiveMoviePlayerController alloc] initVodPlayWithVId:@"aaa123"
77 77 authSuccess:^{
78 78  
79   - _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO;
80   - _player.view.frame = self.view.bounds;
81   - _player.shouldAutoplay = YES;
82   - [_player prepareToPlay];
83   - [self.view addSubview:_player.view];
84   - [self.view sendSubviewToBack:_player.view];
85   -
86   - } authFailed:^(NSDictionary *errorInfo) {
87   - NSLog(@"初始化点播播放器失败%@", errorInfo);
88   - }];
  79 + _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO;
  80 + _player.view.frame = self.view.bounds;
  81 + _player.shouldAutoplay = YES;
  82 + [_player prepareToPlay];
  83 + [self.view addSubview:_player.view];
  84 + [self.view sendSubviewToBack:_player.view];
  85 +
  86 + } authFailed:^(NSDictionary *errorInfo) {
  87 + NSLog(@"初始化点播播放器失败%@", errorInfo);
  88 + }];
89 89  
90 90 } else {
91 91  
92 92 //普通播放
93   - _player = [[CNLiveMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:_videoUrlString]];
  93 + _player = [[CNLiveMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@"http://wideo00.cnlive.com/video/data1/2016/0808/140935/800/e3554e4c5de34a8d9a03c534849cd2e4_140935_800.m3u8"]];
94 94 _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO;
95 95 _player.view.frame = self.view.bounds;
96 96 _player.shouldAutoplay = YES;
... ... @@ -358,7 +358,6 @@
358 358 [self.loadingView removeFromSuperview];
359 359 [self.loadingView stopLoading];
360 360 }
361   -
362 361 _bgView.anchorStatus = _player.anchorStatus;
363 362 }
364 363  
... ... @@ -397,6 +396,7 @@
397 396 _quitBtn = [UIButton buttonWithType:UIButtonTypeCustom];
398 397 _quitBtn.frame = CGRectMake(self.view.bounds.size.width-50, 25, 30, 30);
399 398 [_quitBtn setImage:[UIImage imageNamed:@"cancel"] forState:UIControlStateNormal];
  399 + [_quitBtn setTitle:@"退出" forState:UIControlStateNormal];
400 400 [_quitBtn addTarget:self action:@selector(exitBtnAction) forControlEvents:UIControlEventTouchUpInside];
401 401 }
402 402 return _quitBtn;
... ... @@ -468,7 +468,6 @@
468 468 return _toolBgView;
469 469 }
470 470  
471   -
472 471 - (void)didReceiveMemoryWarning {
473 472 [super didReceiveMemoryWarning];
474 473 // Dispose of any resources that can be recreated.
... ...
北京中投视讯推流SDK说明文档.pdf 0 → 100644
No preview for this file type
北京中投视讯播放SDK说明文档.pdf 0 → 100644
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/CNLiveMsgTools 0 → 100755
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/Emoji.plist 0 → 100644
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h 0 → 100644
  1 +//
  2 +// CNLiveMsgManager.h
  3 +// CNLiveMsgTools
  4 +//
  5 +// Created by cnliveJunBo on 17/2/23.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveMsgManager : NSObject
  12 +
  13 +
  14 ++ (NSString *)getVersion;
  15 +
  16 +
  17 ++ (instancetype)sharedCNLiveMsgManager;
  18 +
  19 +
  20 +- (void)setToolsInfoWithInfoId:(NSString *)infoId
  21 + infoName:(NSString *)infoName
  22 + infoUrl:(NSString *)infoUrl;
  23 +
  24 +
  25 +- (NSDictionary *)getToolsInfo;
  26 +
  27 +
  28 +- (void)initCNLiveMsgToolsWithAppKey:(NSString *)appKey appId:(NSString *)appId;
  29 +
  30 +
  31 +- (void)onLineWithMsgToolsInfoId:(NSString *)infoId
  32 + infoName:(NSString *)infoName
  33 + infoUrl:(NSString *)infoUrl
  34 + success:(void (^)(NSString *toolsId))successBlock
  35 + error:(void (^)(NSInteger errors))errorBlock;
  36 +
  37 +
  38 +- (void)justOnLineSuccess:(void (^)(NSString *toolsId))successBlock
  39 + error:(void (^)(NSInteger errors))errorBlock;
  40 +
  41 +
  42 +- (void)stealthCNLiveMsgTools;
  43 +
  44 +
  45 +- (void)offLineCNLiveMsgTools:(BOOL)isReceivePush;
  46 +
  47 +
  48 +- (void)gatherTogether:(NSString *)targetId
  49 + messageCount:(int)messageCount
  50 + success:(void (^)(NSString *targetId))successBlock
  51 + error:(void (^)(NSInteger errors, NSString *targetId))errorBlock;
  52 +
  53 +
  54 +- (void)gatherIfNullCreate:(NSString *)targetId
  55 + messageCount:(int)messageCount
  56 + success:(void (^)(NSString *targetId))successBlock
  57 + error:(void (^)(NSInteger errors, NSString *targetId))errorBlock;
  58 +
  59 +
  60 +- (void)gatherTogether:(NSString *)targetId
  61 + isCreate:(BOOL)isCreate
  62 + messageCount:(int)messageCount
  63 + success:(void (^)(NSString *targetId))successBlock
  64 + error:(void (^)(NSInteger errors, NSString *targetId))errorBlock;
  65 +
  66 +
  67 +- (void)disperse:(NSString *)targetId
  68 + success:(void (^)(NSString *targetId))successBlock
  69 + error:(void (^)(NSInteger errors, NSString *targetId))errorBlock;
  70 +
  71 +
  72 +- (void)sendCarrier:(NSString *)carrier
  73 + type:(NSInteger)type
  74 + targetId:(NSString *)targetId
  75 + success:(void (^)(NSString *carrier, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl))successBlock
  76 + error:(void (^)(NSInteger errors, NSString *targetId, NSInteger type))errorBlock;
  77 +
  78 +
  79 +- (NSInteger)getOnLineStatus;
  80 +
  81 +
  82 +- (BOOL)judgeLoginStatus;
  83 +
  84 +
  85 +- (NSArray *)getLatestCarriers:(NSInteger)type targetId:(NSString *)targetId count:(int)count;
  86 +
  87 +
  88 +
  89 +@end
... ...
发布版SDK/CNLiveMsgTools.framework/Info.plist 0 → 100644
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/RCConfig.plist 0 → 100644
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/en.lproj/RongCloudKit.strings 0 → 100644
No preview for this file type
发布版SDK/CNLiveMsgTools.framework/release_notes_ios.txt 0 → 100755
  1 +Platform: iOS
  2 +Version: 2.8.6 Stable
  3 +Date:2017/02/15
  4 +
  5 +Changing log:
  6 +
  7 +2.8.6 Stable
  8 +-------------------------------
  9 +1、优化并修复了一些偶现的 BUG,增强了稳定性。
  10 +2、增加了聊天室连接状态的监听。
  11 +3、更新红包 SDK。
  12 +4、更新表情 SDK。
  13 +5、优化了 VoIP 部分逻辑。
  14 +
  15 +2.8.5 Dev
  16 +-------------------------------
  17 +1、增加了 VoIP 网络质量回调接口。
  18 +2、增加了小能客服。
  19 +3、优化了 imageCell 和 locationCell。
  20 +4、优化了相册加载速度。
  21 +5、修改了日志格式。
  22 +6、修改了聊天室心跳机制,加入聊天室后开启心跳。
  23 +7、修复了表情区域 ,下载、删除动态表情时,Tab 顺序错乱的问题。
  24 +8、删除了音视频录制接口。
  25 +9、更新了红包 SDK。
  26 +10、进行了多 cmp 连接优化。
  27 +
  28 +2.8.4 Stable
  29 +-------------------------------
  30 +1、客服增加超时提醒配置功能。
  31 +2、修复了发送图片和文件时没有返回 messageUId 的问题。
  32 +3、修复了一些偶现的 BUG,增强了稳定性。
  33 +
  34 +
  35 +2.8.3 Stable
  36 +-------------------------------
  37 +1、优化了群组通知的解析问题。
  38 +2、修复了一些UI细节。
  39 +
  40 +2.8.2 Dev
  41 +-------------------------------
  42 +1、针对苹果ATS的策略进行了适配。
  43 +如果您手动管理依赖,需要在 IMKit 的工程中增加 SafariServices.framework 引用;如果您使用 CocoaPods,请使用 RongCloudIM 新的 spec。
  44 +您可以根据您App的迭代情况,开启和设置https,具体可以参考官网文档。
  45 +2、优化了会话列表自定义 Cell 的 UI 细节。
  46 +
  47 +2.8.1 Stable
  48 +-------------------------------
  49 +1、修复了某些机型上阅读回执的显示问题。
  50 +2、优化了会话列表的刷新。
  51 +
  52 +2.8.0 Dev
  53 +-------------------------------
  54 +1、会话列表、会话界面的重构。
  55 +2、输入法表情、加号区域的重构。
  56 +3、增加了消息搜索功能,现在您可以进行消息搜索了。马上试用吧。
  57 +4、群消息回执增加了详情,现在您可以知道哪些人看过消息,也能知道哪些人没有看过消息了。
  58 +5、增加了文件消息发送过程中的取消功能。
  59 +6、我们将日志进行了标准化,并且支持您通过接口访问。
  60 +7、还修复了很多的小问题。
  61 +
  62 +2.7.3 Stable
  63 +-------------------------------
  64 +1、优化了消息的时间和状态显示
  65 +2、优化了文本超链接的显示效果
  66 +
  67 +2.7.2 Stable
  68 +-------------------------------
  69 +1、修复了几个微小的 BUG。
  70 +
  71 +2.7.1 Dev
  72 +-------------------------------
  73 +1、增加了群组、讨论组消息阅读状态功能,发送一条文本消息后,可查看该消息的阅读用户数。
  74 +2、优化多端群组、讨论组未读消息数同步功能。
  75 +3、历史消息云存储功能,更改为通过导航下发配置控制功能是否开启,去掉了 IMKit 中的开关。
  76 +
  77 +2.7.0 Dev
  78 +-------------------------------
  79 +1、新增了文件消息功能,消息标识为 RC:FileMsg ,消息类名 FileMessage ,需要在”+“号区添加功能后才能使用。
  80 +2、新增了群组、讨论组消息回执功能。
  81 +3、新增了 VoIP 录制功能,录制后文件会自动存储到服务器。
  82 +4、VoIP 支持视频分辨率设置功能。
  83 +5、针对历史消息云存储服务,在 IMKit 中实现了获取历史消息后本地自动存储功能,在 IMLib 中调用获取云端历史消息接口,也会自动存储到本地数据库中。
  84 +6、优化了会话列表及会话中时间显示规则。
  85 +7、对会话界面的 UI 显示样式进行了优化。
  86 +
  87 +2.6.11 Stable
  88 +-------------------------------
  89 +1、这个版本我们完整的适配了 iOS 10。苹果的各项策略总是在不断变更,我们会根据其变化第一时间对 SDK 进行升级。对于近期要发布 App 的客户,我们建议您升级到这个版本。
  90 +2、实时地理位置共享功能,从收费使用变为免费,默认功能打开,请您参考我们的源码来实现。未在源代码里实现该功能的用户不受此次升级影响。
  91 +
  92 +2.6.10 Stable
  93 +-------------------------------
  94 +1、从 8 月 9 日开始,因为苹果针对 iOS10 更新了私有接口审核的标准,导致我们一个内部函数因为重名而违规。会造成在最近几天内提交 App Store 的申请被拒,我们紧急更新了这个版本。已经上线的客户不受影响。您在升级的时候也不需要进行任何接口改动。
  95 +2、针对特别的海外客户和专有部署客户优化,增加一个针对导航的解析功能。普通客户不受影响。
  96 +
  97 +2.6.9 Stable
  98 +-------------------------------
  99 +1、优化了 @ 消息的细节,增加了国际化。
  100 +2、修复了在有 1 万条离线消息以上的情况下,收消息比较慢的问题。解决后 1 万条以上的离线消息可以在 1 分钟以内接收完毕。
  101 +
  102 +2.6.8 Dev
  103 +-------------------------------
  104 +1、群组、讨论组中增加了 @ 功能
  105 +2、增加了消息撤回功能
  106 +3、增加了客服技能组功能
  107 +
  108 +2.6.7 Stable
  109 +-------------------------------
  110 +1、为了美化,进行了一些细微的 UI 更新,包括聊天界面,消息气泡背景,边距等等。并不影响集成使用。
  111 +
  112 +2.6.6 Stable
  113 +-------------------------------
  114 +1、对超长或超宽的图片消息,进行了优化,显示更加美观清晰。
  115 +2、对发送地理位置、会话列表等界面的 UI 设计进行了细微的更新以确保美观。
  116 +
  117 +2.6.5 Stable
  118 +-------------------------------
  119 +1、这个版本主要对 UI 交互进行了一些优化,包括对地理位置消息的图片,图片选择器,输入区域等等。
  120 +
  121 +2.6.4 Stable
  122 +-------------------------------
  123 +1、配合融云的 IM 软件 SealTalk 的发布,对 IMKit 的 UI 进行了一些细节优化,增强了一些体验。不影响您的客户使用。
  124 +2、优化了草稿在会话列表中的显示。
  125 +3、优化了聊天室拉取大量消息时的响应速度。
  126 +4、增加了一个错误码 30015 (RC_CONN_OVERFREQUENCY),如果频繁的调用 connect,会返回此错误码。您只需要调用 connect 函数一次即可。
  127 +
  128 +2.6.3 Stable
  129 +-------------------------------
  130 +1、优化重连逻辑,增强网络连接的可靠性。
  131 +2、修改了一些小的的 UI 问题。
  132 +
  133 +2.6.2 Dev
  134 +-------------------------------
  135 +1、在 2.6.0 版本上出现了几例运营商网络劫持导致连接失败的报告,在这个版本上进行了修复。
  136 +
  137 +2.6.1 Dev
  138 +-------------------------------
  139 +1、提升了用户信息缓存的性能。
  140 +
  141 +
  142 +2.6.0 Dev
  143 +-------------------------------
  144 +1、增加了用户信息缓存,如果您的 App 没有本地用户信息的缓存,将很大的节省您的开发量,同时支持离线缓存,性能更好。使用的方法没有改变。
  145 +2、优化了图片选择器的 UI 功能。
  146 +3、全面增加了对 HTTPS 的支持。
  147 +4、针对消息量非常大的情况下,性能进行了优化。
  148 +5、对客服的业务进行了一些优化。
  149 +
  150 +
  151 +2.5.2 Stable
  152 +-------------------------------
  153 +1、针对 iOS9 以上,支持 IPv6。请注意苹果规定从6月1号起,提交到 App Store 的版本都必须支持 IPv6-only 网络,您需要升级到这个版本。
  154 +2、针对消息量非常大的聊天室进行优化,在网络出错情况下减少了等待时间更快速的自动重连。不影响聊天室以外的场景。
  155 +
  156 +
  157 +2.5.1 Stable
  158 +-------------------------------
  159 +1、优化了部分客服业务的功能。
  160 +2、修复了一个小概率问题,当数据库操作出现意外问题的时候,连接会主动断开。再次重连后可以继续使用。以确保不会因为数据库操作异常而丢失消息。
  161 +
  162 +2.5.0 Stable
  163 +-------------------------------
  164 +1、解决了一个与第三方库冲突问题。
  165 +2、优化了会话列表在 iOS7 及以下系统中 UI 界面的显示效果。
  166 +
  167 +2.4.11 Stable
  168 +-------------------------------
  169 +1、对客服业务进行了小幅度的优化。
  170 +
  171 +2.4.10 Dev
  172 +-------------------------------
  173 +1、发布了新版本的客服界面,请参考开源代码的 RCDCustomServiceViewController 来实现您的客服。新版本客服在性能功能上得到大幅优化,并且您可以自行配置您的界面。之前版本的客服界面仍然兼容。
  174 +2、RCReceivedStatus 增加一个属性 ReceivedStatus_RETRIEVED。表示该消息在当前端离线期间,已经被其他端收取过。您可以根据这个状态更新您的 UI 界面,比如已经被收取过就不再弹出提示。如果您开通了多端登录,请注意您的判断条件,对于没有开通多端同步的用户可以忽略。
  175 +3、再次提高了聊天室的性能。尤其优化了超大型聊天室的消息性能。
  176 +4、同时修复了功能性能上的一些问题。
  177 +
  178 +2.4.9 Dev
  179 +-------------------------------
  180 +1、修复 VoIP 有时显示用户信息错误的问题,修复有时连续拨打 VoIP 不能很好接通的问题。
  181 +2、优化了一下会话界面消息体显示。
  182 +3、增加接口,getMessageByUId,从消息的唯一 ID 获得消息类。
  183 +
  184 +
  185 +2.4.8 Stable
  186 +-------------------------------
  187 +1、富文本消息修复了一个问题,使修改颜色正常起作用。
  188 +2、修复了一个短时间内连续多次点击发送消息,有的消息会不显示的问题。
  189 +3、优化了后台自动重连时的性能。
  190 +
  191 +
  192 +2.4.7 Stable
  193 +-------------------------------
  194 +1、消息阅读状态和对方正在输入状态等功能提交到稳定版。
  195 +2、修复了一些多端同步和发件箱功能引起的问题。
  196 +
  197 +
  198 +2.4.6 Dev
  199 +-------------------------------
  200 +1、新增消息阅读状态功能。发送端可以看到接收端是否阅读了该消息,当前只支持单聊。
  201 +2、新增对方正在输入状态功能。动态显示对方的输入状态,当前只支持单聊。
  202 +3、消息多端同步增加发件箱功能,发送端发出的消息也会被其他端拉取下来。
  203 +4、语音消息的最大长度可以设置,比如您可以设置为您的客户最多只能录制并发送 30 秒的语音,默认是 60 秒。
  204 +
  205 +2.4.5 Stable
  206 +-------------------------------
  207 +1、略微增强了聊天室的性能。修复了一个问题,当客户端同一个 id 加入两个不同的聊天室时,增加了逻辑避免出现显示错误。
  208 +2、当发送消息失败时,如果原因是网络连接已经断开,会自动做一次重连。开发者不需要对此修改做额外处理。
  209 +
  210 +2.4.4 Stable
  211 +-------------------------------
  212 +1、增加读取消息接口getMessage:,可以根据messageId来读取消息。
  213 +2、优化了聊天室逻辑,确保在网络较差情况下不会聊天室掉线。
  214 +3、增加查询聊天室信息接口getChatRoomInfo,您可以查询聊天室成员数目和部分成员ID。
  215 +
  216 +2.4.3 Stable
  217 +-------------------------------
  218 +
  219 +1、增加 messageUId(Universal Id),您可以通过该 UId 匹配一条具体的消息。
  220 +
  221 +2、增加聊天室接口 JoinExistChatroom,加入一个存在的聊天室,如果聊天室不存在则加入不成功。
  222 +
  223 +
  224 +2.4.2 Stable
  225 +-------------------------------
  226 +
  227 +1、增加了聊天室(Chatroom)禁言、封禁两个功能。请通过 Server API 使用。当前用户被禁言或者被封禁后客户端会显示提示。
  228 +
  229 +
  230 +
  231 +2.4.1 Stable
  232 +-------------------------------
  233 +
  234 +1、文本消息和富文本消息,可以通过 RCAttributedLable 的 attributedStrings 属性,给一些文字添加自定义的事件。请参考代码注释中的示例代码。
  235 +2、修复了一个遗留问题,如果您通过 enableMessageAttachUserInfo 在每条消息里携带用户信息,在 IMKit 里会强制显示该用户信息,请打开了这个开关的用户注意。
  236 +
  237 +
  238 +2.4.0 Stable
  239 +-------------------------------
  240 +
  241 +1、修复了一个因为在 IMKit 里直接调用 SendMessage ,极特殊状态下因为网络速度导致返回太快,发送状态没有更新的问题。
  242 +
  243 +2、增加了一种不保存、不计数的 RCCommandMessage(ObjectName 为 RC:CmdMsg),您需要这种类型的消息时可以直接使用,不需要再自定义。
  244 +
  245 +
  246 +
  247 +
  248 +2.3.9 Stable
  249 +-------------------------------
  250 +1、增加功能:未读的语音消息点击后默认连续播放。
  251 +2、增加功能:会话列表界面每条会话的头像右上角的未读数显示可以配置,可以改成红点而不显示未读数。
  252 +3、提高了 UI 显示性能。
  253 +
  254 +2.3.8 Stable
  255 +-------------------------------
  256 +
  257 +1、在 IMKit 中,重新封装了 sendMessage 方法,实现了您在使用这个方法发送消息后自动更新 UI 界面。
  258 +
  259 +2、增加未注册的消息自定义显示功能,通过设置 showUnkownMessage 为 YES,实现在 App 中提示“当前版本不支持查看此消息”。默认值为 NO,没有该需求的用户不用做任何更改。
  260 +
  261 +3、美化了公众服务相关菜单和界面的 UI 展示。
  262 +
  263 +
  264 +2.3.7 Stable
  265 +-------------------------------
  266 +1、新功能语音消息点击后自动播放,增加一个配置可以关闭和打开该功能。
  267 +2、优化了输入框区域点击表情和键盘图片后的交互过程。
  268 +3、美化了公众服务图文消息的显示效果。
  269 +
  270 +
  271 +2.3.6 Stable
  272 +-------------------------------
  273 +1、增加功能:未读的语音消息点击后默认连续播放。
  274 +2、增加功能:会话列表界面每条会话的头像右上角的未读数显示可以配置,可以改成红点而不显示未读数。
  275 +3、提高了 UI 显示性能。
  276 +
  277 +2.3.5 Stable
  278 +-------------------------------
  279 +1、略微调整了网络状态栏、选择图片按钮的布局设计,以更加美观。
  280 +
  281 +
  282 +
  283 +
  284 +2.3.4 Stable
  285 +-------------------------------
  286 +1、增加了语音消息和图片消息质量的配置文件,支持用户在融云平台支持的范围内配置。
  287 +
  288 +2、优化了输入界面的显示效果。
  289 +
  290 +3、增加了稳定性。
  291 +
  292 +
  293 +
  294 +
  295 +2.3.3 Stable
  296 +-------------------------------
  297 +
  298 +1、优化了会话界面下 UI 显示效率。
  299 +2、增加了对 iOS6.0 系统上的一些问题的修改。
  300 +3、修改了iOS7.0 下,当未读消息非常多的时候,反复下拉消息有一定概率崩溃的问题。
  301 +4、增加了对 XCode7 上的 Archive 支持。
  302 +
  303 +
  304 +
  305 +
  306 +2.3.2 Stable
  307 +-------------------------------
  308 +
  309 +1、增加了一个 ImageMessage 的构造方法,从这个版本起可以支持通过参数发送原图。
  310 +
  311 +2、增加群组禁言功能,请配合 Server API 使用。
  312 +
  313 +3、修复了当取消关注公众服务号同时默认删除公众号会话时的一个显示错误。
  314 +
  315 +4、修复了扩展区域功能多于 8 个时,左右滑动时的问题。少于 8 个并不会有问题。
  316 +
  317 +5、略微修改了气泡和名称的布局使其对齐。
  318 +
  319 +6、修复了 VoIP 的问题,目前在 iOS 各版本上使用正常。
  320 +
  321 +2.3.1 Dev
  322 +-------------------------------
  323 +
  324 +1、增加了对 BitCode 编译选项,更好的支持XCode7和iOS9。
  325 +2、将第三方开源语音库 libopencore-armnb.a 独立出来,以方便您同时集成其他第三方组件时避免冲突,请注意把这个库单独包含到您的工程里。
  326 +3、增加了远程通知数据统计,使用 recordLaunchOptionsEvent,recordRemoteNotificationEvent,recordLocalNotificationEvent,您可以将用户点击系统推送的数据记录到融云的后台。
  327 +
  328 +2.3.0 Stable
  329 +-------------------------------
  330 +1、当您需要使用公众服务会话时,您需要在集成会话列表时,主动在 onSelectedTableRow 中添加 RC_CONVERSATION_MODEL_TYPE_PUBLIC_SERVICE,这是为了实现一些用户的自定义需求,请参考 Demo App 源码。
  331 +2、开放了公众号的图文消息点击事件,覆写 didTapImageTxtMsgCell 方法。可以实现自定义跳转。
  332 +3、替换了一个有可能跟其他 SDK 产生冲突的库。
  333 +4、实现了一些新客户的需求。
  334 +
  335 +2.2.11 Dev
  336 +-------------------------------
  337 +
  338 +1、修复了客户反馈的一些问题,增强了稳定性。
  339 +
  340 +
  341 +
  342 +
  343 +2.2.10 Stable
  344 +-------------------------------
  345 +
  346 +1、增加了对系统会话未读消息的计数功能。
  347 +2、优化了公众服务号,单图文、多图文界面的显示。
  348 +3、增加了接口 sendImageMessage:pushContent:appUpload: ,可实现发送图片消息时将图片上传到自已的服务器发送。
  349 +4、会话中阅读新消息时,现实新消息与历史消息分界线提示功能。
  350 +5、增加了 Web 端和手机端用户同时在线状态下,Web 端发送信息手机端能同步发送的功能。
  351 +6、修改 IMKit 和 IMLib 支持最低版本号为 iOS 6.0。
  352 +
  353 +
  354 +2.2.9 Dev
  355 +-------------------------------
  356 +1、修复了轻微的界面问题。
  357 +
  358 +2.2.8 Stable
  359 +-------------------------------
  360 +1、实时地理位置共享功能发布,您可以在融云的 Demo App 上体验该功能。来试试通过 RCRealTimeLocationManager 实现您 App 自己的实时位置共享吧。
  361 +2、修复了一些界面显示相关的小问题。
  362 +
  363 +2.2.7 Stable
  364 +-------------------------------
  365 +1、在会话界面上下滚动时,如果收到新消息,不会自动显示新消息而会停留在当前位置。
  366 +
  367 +2、增加了录音时来电切到后台的处理。
  368 +
  369 +3、解决了一个在 iOS6.0 上的兼容问题。
  370 +
  371 +
  372 +
  373 +2.2.6 Stable
  374 +-------------------------------
  375 +1、开放 appendAndDisplayMessage,用户可以自己加入消息并刷新会话界面。
  376 +
  377 +2、为头像增加长按点击事件。
  378 +
  379 +3、修复了一个文本消息不响应点击事件的 BUG。
  380 +
  381 +4、修复了一个图片库界面显示不美观的问题。
  382 +
  383 +5、修复了一个公众服务的内置浏览器问题。
  384 +
  385 +
  386 +2.2.5 Stable
  387 +-------------------------------
  388 +1、增加了正在连接中的状态。
  389 +2、增强了保护,对于通过 Server API 发送消息传入错误参数导致的问题全面保护。
  390 +3、位置消息增加长按删除。
  391 +4、设置消息免打扰由于网络原因失败时会弹出提示。
  392 +5、增加了界面上的一些定制化功能。
  393 +6、保护了一个发送系统广播时,由于没有针对发送广播的 id 设置用户信息,会导致本地通知不提示的问题。
  394 +7、共享服务平台自定义菜单的发送消息功能已经上线。
  395 +
  396 +2.2.4 Stable
  397 +-------------------------------
  398 +1、删除 reconnect 方法。使用融云 SDK 时,connect 只需要执行一次。对于有场景需要重连时,比如 Token 过期,请使用 connect 方法。其他异常请不要或尽量避免调用重连。
  399 +2、修改了一些界面布局的问题,进行了界面优化。
  400 +3、修改了一个发送图片不显示进度条的问题。
  401 +
  402 +2.2.3 Dev
  403 +-------------------------------
  404 +
  405 +1、删除 reconnect 方法,请不要使用它进行重连。connect 只需要执行一次。对于有特殊业务场景强烈需要重连的用户,请使用 connect 方法。
  406 +2、修改了 joinChatRoom 接口,当加入聊天室时,传入 messageConunt 为 -1 表示不拉取历史消息。
  407 +3、为一些客户的定制化需求优化了显示相关的功能。
  408 +
  409 +2.2.2 Stable
  410 +-------------------------------
  411 +
  412 +1、initWithAppKey 去掉参数 DeviceToken,因为初始化阶段很难获得 DeviceToeken。
  413 +
  414 +2、优化了 setDeviceToken 方法,增加了缓存。
  415 +
  416 +3、增强了重连机制,增加了一些特殊的网络错误的自动重连。
  417 +
  418 +4、修复了一些 iOS 6 系统下的异常。
  419 +
  420 +5、修复了客户反馈的一些异常并增强了稳定性。
  421 +
  422 +
  423 +2.2.1 Dev
  424 +-------------------------------
  425 +
  426 +1、initWithAppKey 去掉参数 DeviceToken,因为初始化阶段很难获得 DeviceToeken,同时优化了 setDeviceToken,做了内部缓存,以帮用户存储正确的值。
  427 +
  428 +2、增强了重连机制。
  429 +
  430 +
  431 +
  432 +2.2.0 Stable
  433 +-------------------------------
  434 +
  435 +1、增加了公众服务自定义菜单。
  436 +
  437 +2、为 sendMessage 增加一个 pushExtra 字段,可以附加消息到 APNS 推送里。
  438 +
  439 +3、增加了 insertMessage 接口。
  440 +
  441 +4、继续优化了连接稳定性和重连机制。
  442 +
  443 +5、为了一些客户定制化需求优化了功能。
  444 +
  445 +6、修复了各种渠道反馈的一些小概率异常和崩溃问题。
  446 +
  447 +
  448 +2.1.4 Stable
  449 +-------------------------------
  450 +
  451 +1.增加了富文本消息的长按事件。
  452 +2.修改了图文消息的布局问题。
  453 +3.会话列表头像设置,放开大小限制。
  454 +4.解决了收到推送后跳转到聊天界面以后,如果有其他人或者群发来消息,导航栏的返回按钮就失效的问题。
  455 +5.修复了 2.1.3 版本上因为修改图片缓存导致发送图片消息会导致无法取到本地图片的问题。
  456 +6.修改了 tokenIncorrect 逻辑,增加了一次场景更准确的反馈该错误信息给客户。
  457 +7.增加了信令用于同步 WebSDK 的会话列表信息。
  458 +8.修复了一个可能导致无法拉取离线消息的小概率问题。
  459 +
  460 +2.1.3 Stable
  461 +-------------------------------
  462 +
  463 +1、Emoji 作为资源文件,可以自定义 Emoji 表情。
  464 +2、修改了 RCContactNotificationMessage 消息解析的一个问题
  465 +3、修改了会话列表最后一条消息显示的一个问题。
  466 +4、修改讨论组用户名显示的一个问题
  467 +5、修改了因为回调指针为空可能导致崩溃的一个底层问题。
  468 +
  469 +
  470 +
  471 +2.1.2 Stable
  472 +-------------------------------
  473 +
  474 +1、增加了一些网络错误状态发生后重连的次数,更容易重连。
  475 +
  476 +2、修改了缓存文件存储的系统路径。
  477 +
  478 +3、增加了公众服务的草稿。
  479 +
  480 +4、Emoji库可以通过资源包替换。
  481 +
  482 +5、修改了上一个版本出现的可能会导致消息发送时一直发不出去的问题。
  483 +
  484 +6、修改了发送语音过程中的一些界面问题。
  485 +
  486 +
  487 +
  488 +
  489 +2.1.1 Stable
  490 +-------------------------------
  491 +
  492 +1、增加了对 Apple WatchKit 的支持,现在您可以直接使用融云的 IMlib 实现 Apple Watch App,我们同时开源了 Demo App。
  493 +
  494 +2、增加了单个 App 内群组的上限,旧的版本不能超过 300 个群组。
  495 +
  496 +3、解决了一些界面在 iOS7.0 上不能使用并崩溃的问题。
  497 +
  498 +4、解决了连续收到多条消息,会话列表刷新错误的问题。
  499 +
  500 +5、解决了自定义消息透传的问题。
  501 +
  502 +6、修复了一些语音消息的功能和界面问题,增加了点击语音消息可以停止语音播放的功能。
  503 +
  504 +7、增加了一些消息的点击事件。
  505 +
  506 +8、当您不在群组/讨论组/聊天室内,而又能进入界面发起消息是,给出文字提示。
  507 +
  508 +9、解决了一个当自动重连时有可能会导致的不发起连接回调的问题。
  509 +
  510 +10、增加了接口 refreshUserInfoCache 和 refreshGroupInfoCache 用于刷新用户信息缓存。
  511 +
  512 +
  513 +
  514 +2.1.0 Stable
  515 +-------------------------------
  516 +1、增强了针对网络切换、网络不稳定时的连接稳定性问题。
  517 +
  518 +2、修改了当网络出现问题,由于消息时间错误导致消息排列错误的问题。
  519 +
  520 +3、修改了断网再连接导致小概率 crash 的问题。
  521 +
  522 +4、修改了会话界面消息时间显示不准确的问题。
  523 +
  524 +5、修改了发送接收表情,有时候显示为空的问题。
  525 +
  526 +6、修复了自定义消息透传的问题。
  527 +
  528 +7、修复了一些对低版本iOS的兼容问题。
  529 +
  530 +8、优化了网络连接缓存机制。
  531 +
  532 +2.0.5 Dev
  533 +-------------------------------
  534 +1、增加了消息置顶之后的显示效果。
  535 +2、增加了新消息提醒打开关闭的功能。
  536 +3、增加了“该账号已在另外一台设备上登录”提示。
  537 +4、修复了会话列表的一些时间顺序和显示问题。
  538 +5、优化了断网和弱网络下的重连机制,更快的从网络中恢复。
  539 +6、修复了小概率情况下收到消息后因为时间错误,导致消息被排列到错误的问题。
  540 +7、修复了一些测试过程中出现的小概率崩溃问题。
  541 +8、增加了连接缓存功能,增强了连接稳定性。
  542 +
  543 +2.0.4 Dev
  544 +-------------------------------
  545 +1、增加了连接稳定性,修复了从后台进入前台后显示网络连接不可用的问题。
  546 +2、修复了一些小概率 Crash 问题。
  547 +3、修复了时间显示错误的问题。
  548 +4、增强了内存优化。
  549 +5、修复了录音和播放录音会跟系统播放冲突的问题。
  550 +6、增加了 DNS 缓存功能,以增强网络连接稳定性。
  551 +
  552 +2.0.3 Dev
  553 +-------------------------------
  554 +1、增加了文本消息中连接高亮显示功能。
  555 +2、修复了会话界面输入法功能的显示问题。
  556 +3、解决了讨论组清空历史消息时会把此讨论组也删除的问题。
  557 +4、解决了系统播放音乐时,收到信息播放提示音之后音乐不继续播放的问题。
  558 +5、解决了发送图片,发送端点击不能放大缩小的问题。
  559 +6、修复了一些可能会显示网络连接不可用的问题。
  560 +
  561 +2.0.2 Dev
  562 +-------------------------------
  563 +1、美化了一些 UI 界面显示。
  564 +2、修复了输入框输入大量字符显示相关的问题。
  565 +3、修复了接收未注册自定义消息显示错误的问题。
  566 +4、解决了接收 API 发送的图文混排消息显示错误的问题。
  567 +5、当手机中无照片时,点击相册默认会提示“无视频和照片”。
  568 +6、修复了发送 60s 语音,有一定概率崩溃的问题。
  569 +7、修复了一些业务层稳定性问题。
  570 +8、修复了在其它页面来新消息没有铃声提示的问题。
  571 +9、修复了发送表情后,点击发送按钮会发送空消息的问题。
  572 +10、解决了图片预览页图片不能放大和缩小的问题。
  573 +
  574 +2.0.1 Dev
  575 +-------------------------------
  576 +1、增强了 UI 显示效果,修改了一些UI问题。
  577 +2、增加了自定义消息展示的接口,更方便的自定义自己消息类型展现。
  578 +3、修复了发送图像,发送端点击缩略图无法打开问题。
  579 +4、修改了一些内存泄露问题。
  580 +
  581 +2.0.0 Dev
  582 +-------------------------------
  583 +1、重构了会话列表界面和会话界面的架构,支持丰富的界面自定义。
  584 +2、支持会话列表的自定义,聚合非聚合显示,支持插入用户自定义数据和展现。
  585 +3、支持自定义会话界面,预置了九种输入框界面。
  586 +4、支持自定义消息的展现,采用自动布局,可以自定义消息界面的展现。
  587 +5、开放了更多的 API 接口和监听。
  588 +6、优化了协议栈的重连机制,现在 App 从断线状态恢复重连将更快。
  589 +7、优化了数据库性能,消息的读写速度将更快。
  590 +8、支持搜索关注公众账号,支持公众账号的详情展现。
  591 +9、支持公众服务多图文消息、单图文消息的展现。
  592 +10、增加了对 Apple Watch 的内置支持。
... ...
发布版SDK/CNLiveMsgTools.framework/zh-Hans.lproj/RongCloudKit.strings 0 → 100644
No preview for this file type
发布版SDK/CNLivePlayerSDK.framework/CNLivePlayerSDK 0 → 100755
No preview for this file type
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveAudioCapture.h 0 → 100644
  1 +//
  2 +// CNLiveAudioCapture.h
  3 +// CNLivePlayerSDKDemo
  4 +//
  5 +// Created by iOS on 17/2/27.
  6 +// Copyright © 2017年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveAudioCapture : NSObject
  12 +
  13 +/**
  14 + @abstract 是否有耳机麦克风可用
  15 + @return 是/否有耳机麦克风
  16 + */
  17 ++ (BOOL)isHeadsetPluggedIn;
  18 +
  19 +/**
  20 + @abstract 是否播放采集的声音 (又称"耳返")
  21 + @warning 如果在没有插入耳机的情况下启动, 容易出现很刺耳的声音
  22 + */
  23 +@property(nonatomic, assign) BOOL bPlayCapturedAudio;
  24 +
  25 +/**
  26 + @abstract 设置mic采集的声音音量
  27 + @discussion 调整范围 0.0~1.0
  28 + */
  29 +@property(nonatomic, assign) Float32 micVolume;
  30 +
  31 +/**
  32 + @abstract 混响类型
  33 + @discussion 目前提供了4种类型的混响场景, type和场景的对应关系如下
  34 +
  35 +- 0 关闭
  36 +- 1 录音棚
  37 +- 2 KTV
  38 +- 3 小舞台
  39 +- 4 演唱会
  40 +*/
  41 +@property(nonatomic, assign) int reverbType;
  42 +
  43 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveBarrageAnimationView.h 0 → 100644
  1 +//
  2 +// barrageAnimationView.h
  3 +//
  4 +// Created by CNLive on 16/8/3.
  5 +// Copyright © 2016年 CNLive. All rights reserved.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +
  10 +//承载弹幕动画的view
  11 +@interface CNLiveBarrageAnimationView : UIView
  12 +
  13 +/*
  14 + * 获取SDK版本号
  15 + */
  16 ++ (NSString *)getVersion;
  17 +
  18 +/* 初始化 barrageAnimationView
  19 + *
  20 + * frame中height此时设置是无效的
  21 + * height将根据提供的行数和用来做弹幕动画的label的height决定
  22 + *
  23 + */
  24 +- (instancetype)initWithFrame:(CGRect)frame;
  25 +
  26 +/* 设置弹幕的行数
  27 + *
  28 + * 弹幕启动后设置无效
  29 + * 默认1行
  30 + *
  31 + */
  32 +- (void)setLinage:(NSInteger)linage;
  33 +
  34 +/* 设置弹幕文字到弹幕载体边缘的间隔
  35 + *
  36 + * 弹幕启动后设置无效
  37 + * 默认为0
  38 + *
  39 + */
  40 +- (void)setHorizontalSpace:(CGFloat)hSpace;
  41 +
  42 +/* 设置弹幕与弹幕之间上下的间隔
  43 + *
  44 + * 弹幕启动后设置无效
  45 + * 默认为0
  46 + *
  47 + */
  48 +- (void)setVerticalSpace:(CGFloat)vSpace;
  49 +
  50 +/* 设置弹幕动画的持续时间
  51 + *
  52 + * 弹幕启动后设置无效
  53 + * 默认5秒
  54 + *
  55 + */
  56 +- (void)setAnimationDuration:(CGFloat)duration;
  57 +
  58 +/* 设置弹幕的样式
  59 + *
  60 + * 弹幕启动后设置无效
  61 + *
  62 + * 通过传入label的属性来设置弹幕的样式
  63 + *
  64 + * 目前支持设置的属性有如下
  65 + * frame中的height
  66 + * backgroundColor
  67 + * font
  68 + * textColor
  69 + * layer.cornerRadius
  70 + * layer.masksToBounds
  71 + * layer.borderColor
  72 + * layer.borderWidth
  73 + *
  74 + */
  75 +- (void)setBarrageLabelStyle:(UILabel *)styleLabel;
  76 +
  77 +/* 启动弹幕
  78 + *
  79 + * 未启动时也会保留传入的弹幕内容
  80 + *
  81 + */
  82 +- (void)startAnimation;
  83 +
  84 +/* 关闭弹幕
  85 + *
  86 + * 调用时正在做动画的弹幕将立即消失
  87 + * 等待做动画的弹幕继续保留
  88 + * 再次调用startAnimation将继续展示
  89 + *
  90 + */
  91 +- (void)stopAnimation;
  92 +
  93 +// 传入需要展示的弹幕内容
  94 +- (void)showBarrageContent:(NSString *)content;
  95 +
  96 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveBeautifyFaceFilter.h 0 → 100644
  1 +//
  2 +// CNLiveBeautifyFaceFilter.h
  3 +// CNLivePlayerSDKDemo
  4 +//
  5 +// Created by iOS on 17/3/2.
  6 +// Copyright © 2017年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLiveTypeDef.h"
  11 +#import <UIKit/UIKit.h>
  12 +
  13 +/**
  14 + * 美颜((默认旧美颜,磨皮参数为0.5))
  15 + */
  16 +
  17 +@interface CNLiveBeautifyFaceFilter : NSObject
  18 +
  19 +/**
  20 + @abstract CNLiveBeautyTypeSpecial 美颜特效类型,需先设置CNLiveBeautyType为CNLiveBeautyTypeSpecial
  21 + */
  22 +- (void)setCurEffectIdx:(CNLiveSpecialEffects)curEffectIdx; //美颜特效类型
  23 +
  24 +/**
  25 + @abstract 美颜类型
  26 + @param beautyType 类型
  27 + @warn 旧美颜仅grindRatio参数可调节,另两个参数设置无效
  28 + */
  29 +- (void)setBeautyType:(CNLiveBeautyType)beautyType;
  30 +
  31 +/**
  32 + @abstract 美颜参数调节
  33 + @param grindRatio 磨皮
  34 + @param whitenRatio 美白
  35 + @param intensity 特效
  36 + */
  37 +- (void)filterAdjustingParameterWithGrindRatio:(CGFloat)grindRatio
  38 + whitenRatio:(CGFloat)whitenRatio
  39 + intensity:(CGFloat)intensity;
  40 +
  41 +
  42 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveGPUStreamerKit.h 0 → 100644
  1 +//
  2 +// CNLiveGPUStreamerKit.h
  3 +// KSYLiveDemo
  4 +//
  5 +// Created by Android on 16/8/3.
  6 +// Copyright © 2016年 Android. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLiveWebcastManager.h"
  11 +
  12 +@interface CNLiveGPUStreamerKit : NSObject
  13 +
  14 +#pragma mark - 使用视讯云平台
  15 +
  16 +/**
  17 + @abstract 初始化
  18 + @warning 实例化的对象必须赋值给一个全局变量
  19 + @param activityId 活动ID,确保SP下的唯一性
  20 + @param channelId 主播ID
  21 + @param isHorizontalScreen 屏幕方向,0:垂直即竖屏 /1:水平即横屏 ,默认为1
  22 + @warning 必传参数
  23 + */
  24 +-(instancetype)initWithDefaultConfigWithActivityId:(NSString *)activityId
  25 + channelId:(NSString *)channelId
  26 + isHorizontalScreen:(NSString *)isHorizontalScreen;
  27 +
  28 +/**
  29 + @abstract 是否开启控制台输出日志
  30 + @discussion 默认为开启
  31 + */
  32 +@property (nonatomic, assign) BOOL logPrintEnable;
  33 +
  34 +/**
  35 + @abstract 活动名称(非必传)
  36 + */
  37 +@property (nonatomic, strong) NSString *activityName;
  38 +
  39 +/**
  40 + @abstract 活动状态,0:未开始 /1:已开始 /3:已结束 /4 已下线,默认为0(非必传)
  41 + */
  42 +@property (nonatomic, strong) NSString *activityStatus;
  43 +
  44 +/**
  45 + @abstract 开始时间,格式yyyyMMddHHmmss(非必传)
  46 + */
  47 +@property (nonatomic, strong) NSString *startTime;
  48 +
  49 +/**
  50 + @abstract 结束时间,格式yyyyMMddHHmmss(非必传)
  51 + */
  52 +@property (nonatomic, strong) NSString *endTime;
  53 +
  54 +/**
  55 + @abstract 活动封面(非必传)
  56 + */
  57 +@property (nonatomic, strong) NSString *coverImgUrl;
  58 +
  59 +/**
  60 + @abstract 活动分类ID(非必传)
  61 + */
  62 +@property (nonatomic, strong) NSString *activityCategory;
  63 +
  64 +/**
  65 + @abstract 扩展字段,参数格式为Map对象的Json字符串(主播昵称、头像、)(非必传)
  66 + */
  67 +@property (nonatomic, strong) NSString *extensions;
  68 +
  69 +/**
  70 + @abstract 回调通知活动状态(错误,结束、心跳异常等状态),post 参数activityid、activitystatus值...(非必传)
  71 + */
  72 +@property (nonatomic, strong) NSString *callbackAcitvityStatushttpPostUrl;
  73 +
  74 +/**
  75 + @abstract 启动推流
  76 + @warning 鉴权成功后开启推流
  77 + */
  78 +- (void) startStream:(void (^)(void))successBlock failure:(void (^)(NSDictionary *errorDic))failureBlock;
  79 +
  80 +#pragma mark - 普通推流
  81 +
  82 +/**
  83 + @abstract 初始化
  84 + @warning 实例化的对象必须赋值给一个全局变量
  85 + */
  86 +-(instancetype)initWithDefaultConfig;
  87 +
  88 +/**
  89 + @abstract 获取水印工具
  90 + @discussion 通过它来设置水印图片/文字
  91 + */
  92 +@property (nonatomic, readonly) CNLiveWatermark *watermark;
  93 +
  94 +/**
  95 + @abstract 获取底层推流工具
  96 + @discussion 通过它来设置推流参数
  97 + */
  98 +@property (nonatomic, readonly) CNLiveStreamerBase *streamerBase;
  99 +
  100 +/**
  101 + @abstract 获取音频采集工具
  102 + */
  103 +@property (nonatomic, readonly) CNLiveAudioCapture *audioCapture;
  104 +
  105 +/**
  106 + @abstract 获取美颜工具
  107 + */
  108 +@property (nonatomic, readonly) CNLiveBeautifyFaceFilter *beautifyFaceFilter;
  109 +
  110 +#pragma mark - capture & preview settings
  111 +
  112 +/**
  113 + @abstract 采集分辨率 (仅在开始采集前设置有效)
  114 + @discussion 参见iOS的 AVCaptureSessionPresetXXX的定义 默认值为AVCaptureSessionPreset640x480
  115 + @discussion 不同设备支持的预设分辨率可能不同, 请尽量与预览分辨率一致
  116 + */
  117 +@property (nonatomic, assign) NSString * capPreset;
  118 +
  119 +/**
  120 + @abstract 查询实际的采集分辨率
  121 + @discussion 参见iOS的 AVCaptureSessionPresetXXX的定义
  122 + */
  123 +- (CGSize) captureDimension;
  124 +
  125 +/**
  126 + @abstract 预览分辨率 (仅在开始采集前设置有效)
  127 + @discussion 内部始终将较大的值作为宽度 (若需要竖屏,请设置 videoOrientation)
  128 + @discussion 宽高都会向上取整为4的整数倍
  129 + @discussion 有效范围: 宽度[160, 1920] 高度[ 90, 1080], 超出范围会取边界有效值
  130 + @discussion 当预览分辨率与采集分辨率不一致时:
  131 + 若宽高比不同, 先进行裁剪, 再进行缩放
  132 + 若宽高比相同, 直接进行缩放
  133 + @discussion 默认值为(640, 360)
  134 + */
  135 +@property (nonatomic, assign) CGSize previewDimension;
  136 +
  137 +/**
  138 + @abstract 用户定义的视频 **推流** 分辨率
  139 + @discussion 有效范围: 宽度[160, 1280] 高度[ 90, 720], 超出范围会取边界有效值
  140 + @discussion 其他与previewDimension限定一致,
  141 + @discussion 当与previewDimension不一致时, 同样先裁剪到相同宽高比, 再进行缩放
  142 + @discussion 默认值为(640, 360)
  143 + @see previewDimension
  144 + */
  145 +@property (nonatomic, assign) CGSize streamDimension;
  146 +
  147 +/**
  148 + @abstract 采集及编码视频帧率 (开始采集前设置有效)
  149 + @discussion video frame per seconds 有效范围[1~30], 超出范围会取边界有效值
  150 + @discussion 默认值为15 */
  151 +@property (nonatomic, assign) int videoFPS;
  152 +
  153 +/**
  154 + @abstract 摄像头位置
  155 + @discussion 前后摄像头 默认为前摄像头
  156 + */
  157 +@property (nonatomic, assign) AVCaptureDevicePosition cameraPosition;
  158 +
  159 +
  160 +/**
  161 + @abstract 获取当前采集设备的指针
  162 + @return AVCaptureDevice* 预览开始前调用返回为nil,开始预览后,返回当前正在使用的摄像头
  163 + @warning 请勿修改摄像头的像素格式,帧率,分辨率等参数,修改后会导致推流工作异常或崩溃
  164 + */
  165 +- (AVCaptureDevice *) getCurrentCameraDevices;
  166 +
  167 +/**
  168 + @abstract 采集设备状态
  169 + */
  170 +@property (nonatomic, readonly) CNLiveCaptureState captureState;
  171 +
  172 +FOUNDATION_EXPORT NSString *const CNLiveCaptureStateDidChangeNotification NS_AVAILABLE_IOS(7_0);
  173 +
  174 +#pragma mark - stream settings
  175 +
  176 +
  177 +/**
  178 + @abstract 推流状态
  179 + */
  180 +@property (nonatomic, readonly) CNLiveStreamState streamState;
  181 +
  182 +FOUNDATION_EXPORT NSString *const CNLiveStreamStateDidChangeNotification NS_AVAILABLE_IOS(7_0);
  183 +
  184 +/**
  185 + * @abstract 推流错误码,用于指示推流失败的原因
  186 + */
  187 +@property (nonatomic, readonly) CNLiveStreamErrorCode streamErrorCode;
  188 +
  189 +/**
  190 + @abstract 切换摄像头
  191 + @return TRUE: 成功切换摄像头,开启预览后设置有效
  192 + */
  193 +- (BOOL) switchCamera;
  194 +
  195 +/**
  196 + @abstract 开关闪光灯
  197 + @discussion 切换闪光灯的开关状态 开 <--> 关
  198 + @warning 对后摄像头设置有效
  199 + */
  200 +- (void) toggleTorch;
  201 +- (void) setTorchMode:(AVCaptureTorchMode)mode;
  202 +
  203 +/**
  204 + @abstract 摄像头朝向
  205 + @discussion 参见UIInterfaceOrientation
  206 + @discussion 竖屏时: width < height
  207 + @discussion 横屏时: width > height
  208 + @discussion 需要与UI方向一致
  209 + */
  210 +- (void) setVideoOrientationBy:(UIInterfaceOrientation)uiOrien;
  211 +
  212 +/**
  213 + @abstract 启动预览
  214 + @param view 预览画面作为subview,插入到 view 的最底层
  215 + @discussion 设置完成采集参数之后,按照设置值启动预览,启动后对采集参数修改不会生效
  216 + @discussion 需要访问摄像头和麦克风的权限,若授权失败,其他API都会拒绝服务
  217 + @warning: 开始推流前必须先启动预览
  218 + */
  219 +- (void) startPreview:(UIView*) view;
  220 +
  221 +/**
  222 + @abstract 停止预览,停止采集设备,并清理会话
  223 + @warning 若推流未结束,则先停止推流
  224 + */
  225 +- (void) stopPreview;
  226 +
  227 +/**
  228 + @abstract 启动推流
  229 + @param hostURL rtmp 服务器地址 “rtmp://xxx.xxx.xxx.xxx/appname/streamKey"
  230 + */
  231 +- (void) startStream:(NSURL *)hostURL;
  232 +
  233 +/**
  234 + @abstract 停止推流
  235 + */
  236 +- (void) stopStream;
  237 +
  238 +/**
  239 + @abstract 进入后台: 暂停图像采集
  240 + @discussion 暂停图像采集和预览
  241 + */
  242 +- (void) appEnterBackground;
  243 +
  244 +/**
  245 + @abstract 回到前台: 恢复采集
  246 + @discussion 恢复图像采集和预览
  247 + */
  248 +- (void) appBecomeActive;
  249 +
  250 +#pragma mark - mirror & rotate
  251 +
  252 +/**
  253 + @abstract 预览设置成镜像模式,默认为NO
  254 + */
  255 +@property (nonatomic, assign) BOOL previewMirrored;
  256 +
  257 +/**
  258 + @abstract 推流设置成镜像模式,默认为NO
  259 + */
  260 +@property (nonatomic, assign) BOOL streamerMirrored;
  261 +
  262 +/**
  263 + @abstract 根据UI的朝向旋转预览视图, 保证预览视图全屏铺满窗口
  264 + @param orie 旋转到目标朝向, 需要从demo中获取UI的朝向传入
  265 + @discussion 采集到的图像的朝向还是和启动时的朝向一致
  266 + */
  267 +- (void) rotatePreviewTo: (UIInterfaceOrientation) orie;
  268 +
  269 +/**
  270 + @abstract 根据UI的朝向旋转推流画面
  271 + @param orie 旋转到目标朝向, 需要从demo中获取UI的朝向传入
  272 + */
  273 +- (void) rotateStreamTo: (UIInterfaceOrientation) orie;
  274 +
  275 +/**
  276 + @abstract 当前采集设备是否支持自动变焦
  277 + @param point相机对焦的位置
  278 + */
  279 +- (void)focusAtPoint:(CGPoint )point;
  280 +
  281 +/**
  282 + @abstract 当前采集设备是否支持自动曝光
  283 + @param point相机曝光的位置
  284 + */
  285 +- (void)exposureAtPoint:(CGPoint )point;
  286 +
  287 +/**
  288 + @abstract 触摸缩放因子
  289 + */
  290 +@property (nonatomic, assign) CGFloat pinchZoomFactor;
  291 +
  292 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveMoviePlayerController.h 0 → 100644
  1 +//
  2 +// CNLiveMoviePlayerController.h
  3 +//
  4 +// Created by CNLive on 16/8/5.
  5 +// Copyright © 2016年 CNLive. All rights reserved.
  6 +//
  7 +
  8 +#import <UIKit/UIKit.h>
  9 +#import <MediaPlayer/MediaPlayer.h>
  10 +#import "CNLiveTypeDef.h"
  11 +
  12 +@interface CNLiveMoviePlayerController : NSObject
  13 +
  14 +#pragma mark - 使用视讯云平台 直接通过节目id播放
  15 +/* 初始化点播播放器 初始化成功后才能对播放器进行设置(如:自动播放、是否开启硬件解码等)和调用准备播放视频方法(prepareToPlay)
  16 + *
  17 + * 当前版本只支持单实例的CNLiveMoviePlayerController对象,多实例将导致播放异常
  18 + *
  19 + * vId 点播视频Id
  20 + * authSuccess 初始化成功block
  21 + * authFailed 初始化失败block 回调一个errorInfo的字典
  22 + *
  23 + */
  24 +- (instancetype)initVodPlayWithVId:(NSString *)vId
  25 + authSuccess:(void(^)(void))authSuccessBlock
  26 + authFailed:(void(^)(NSDictionary *errorInfo))authFailedBlock;
  27 +
  28 +/* 初始化直播播放器 初始化成功后才能对播放器进行设置(如:自动播放、是否开启硬件解码等)和调用准备播放视频方法(prepareToPlay)
  29 + *
  30 + * 当前版本只支持单实例的CNLiveMoviePlayerController对象,多实例将导致播放异常
  31 + *
  32 + * channelId 直播视频Id
  33 + * authSuccess 初始化成功block
  34 + * authFailed 初始化失败block 回调一个errorInfo的字典
  35 + *
  36 + * result 获取主播状态 YES:获取状态成功
  37 + * NO:获取失败,不影响视频播放,但是获取不到主播离开、回来、直播结束等通知。可通过
  38 + * - (void)retryToGetAnchorStatusResult:(void(^)(BOOL result))result;方法重新获取
  39 + */
  40 +- (instancetype)initLivePlayWithChannelId:(NSString *)channelId
  41 + authSuccess:(void(^)(void))authSuccessBlock
  42 + authFailed:(void(^)(NSDictionary *errorInfo))authFailedBlock
  43 + getAnchorStatusResult:(void(^)(BOOL result))result;
  44 +
  45 +/*
  46 + * 是否开启控制台输出日志(默认YES)
  47 + */
  48 +@property (nonatomic, assign) BOOL logPrintEnable;
  49 +
  50 +/* 切换视角和码率
  51 + *
  52 + * 调用此方法会获取视频的不同视角或码率,并重新加载视频(获取视频的不同视角或码率需要一定的时间,在这段时间内,播放器不会停止播放,建议将播放器设为暂停状态(pause),并展示加载视频时的UI)
  53 + *
  54 + * channelId 直播视频Id(同一视角可不传)
  55 + * rate 清晰度(1:流畅、2:标清(默认)、3:高清、4:超清)
  56 + *
  57 + */
  58 +- (void)changeViewWithChannelId:(NSString *)channelId rate:(NSString *)rate;
  59 +
  60 +/* 切换视频源
  61 + *
  62 + * 当视频不够流畅时可调用此方法
  63 + * 调用此方法会获取不同的视频源,并重新加载视频(获取其他视频源需要一定的时间,在这段时间内,播放器不会停止播放,建议将播放器设为暂停状态(pause),并展示加载视频时的UI)
  64 + *
  65 + */
  66 +- (void)retry;
  67 +
  68 +/* 重新获取主播直播状态
  69 + *
  70 + * result 重新获取主播直播状态,YES:成功 NO:失败
  71 + *
  72 + */
  73 +- (void)retryToGetAnchorStatusResult:(void(^)(BOOL result))result;
  74 +
  75 +/* 主播直播状态(只读)
  76 + *
  77 + */
  78 +@property (nonatomic, assign, readonly) CNLiveAnchorStatus anchorStatus;
  79 +
  80 +/*
  81 + * 主播直播状态改变通知
  82 + */
  83 +FOUNDATION_EXPORT NSString *const CNLiveAnchorStatusChangedNotification NS_AVAILABLE_IOS(7_0);
  84 +
  85 +#pragma mark - 普通播放器方法
  86 +/*
  87 + * 初始化播放器并设置播放地址
  88 + */
  89 +- (instancetype)initWithContentURL:(NSURL *)url;
  90 +
  91 +/* 解码方式(硬解/软解/自动)
  92 + *
  93 + * 建议系统版本高于8.0 选择硬解,或者自动选择解码方式,8.0以上的系统优先选择硬解
  94 + * 只在[prepareToPlay]调用前设置生效
  95 + *
  96 + */
  97 +@property(nonatomic) CNLiveMovieVideoDecoderMode videoDecoderMode;
  98 +
  99 +/* 重新启动拉流
  100 + *
  101 + * url 视频播放地址,该地址可以是本地地址或者服务器地址.如果为nil,则使用前一次播放地址
  102 + *
  103 + */
  104 +- (void)reload:(NSURL *)aUrl;
  105 +
  106 +/**
  107 + * timeout指定拉流超时时间,单位是秒
  108 + * prepareTimeout 建立链接超时时间,默认值是10秒
  109 + * readTimeout 拉流超时时间,默认值是30秒
  110 + */
  111 +- (void)setTimeout:(int)prepareTimeout readTimeout:(int)readTimeout;
  112 +
  113 +/*
  114 + * 播放视频时是否需要自动播放,默认值为YES
  115 + */
  116 +@property (nonatomic) BOOL shouldAutoplay;
  117 +
  118 +/* 准备视频播放
  119 + *
  120 + * MPMediaPlaybackIsPreparedToPlayDidChangeNotification, 播放器完成对视频文件的初始化时发送通知
  121 + *
  122 + */
  123 +- (void)prepareToPlay;
  124 +
  125 +/*
  126 + * 查询视频准备是否完成(只读)
  127 + */
  128 +@property(nonatomic, readonly) BOOL isPreparedToPlay;
  129 +
  130 +// Posted when the prepared state changes of an object conforming to the MPMediaPlayback protocol changes.
  131 +// This supersedes MPMoviePlayerContentPreloadDidFinishNotification.
  132 +MP_EXTERN NSString *const MPMediaPlaybackIsPreparedToPlayDidChangeNotification NS_DEPRECATED_IOS(3_2, 9_0);
  133 +
  134 +/*
  135 + * 播放当前视频
  136 + */
  137 +- (void)play;
  138 +
  139 +/* 暂停播放当前视频
  140 + *
  141 + * 播放器内部监听了UIApplicationWillEnterForegroundNotification通知,该通知发生时如果视频仍然在播放,将自动调用pause暂停当前视频播放
  142 + *
  143 + * 需要APP有后台执行权限,在工程Info.plist中添加后台运行模式,设置为audio。具体是添加UIBackgroundModes项,值为audio
  144 + * 当用户点击home按钮后,播放器进入后台继续读取数据并播放音频
  145 + * 当APP回到前台后,音频继续播放。图像渲染内容保持和音频同步
  146 + * 如果在开启后台运行模式后,需要切换后台暂停,需要监听相关事件并主动调用pause操作
  147 + *
  148 + */
  149 +- (void)pause;
  150 +
  151 +/* 结束当前视频的播放
  152 + *
  153 + * 重复多次调用将会导致崩溃
  154 + * 调用stop结束当前播放,如果需要重新播放该视频,需要调用[prepareToPlay]([KSYMediaPlayback prepareToPlay])方法
  155 + * 调用stop方法后,播放器开始进入关闭当前播放的操作,操作完成将发送MPMoviePlayerPlaybackDidFinishNotification通知
  156 + *
  157 + * MPMoviePlayerPlaybackDidFinishNotification, 当播放完成将发送该通知
  158 + *
  159 + */
  160 +- (void)stop;
  161 +
  162 +/*
  163 + * 当前播放器是否在播放
  164 + */
  165 +- (BOOL)isPlaying;
  166 +
  167 +/*
  168 + * 指定播放器输出音量
  169 + * leftVolume left volume scalar [0~2.0f]
  170 + * rightVolume right volume scalar [0~2.0f]
  171 + * 输入参数超出范围将失效
  172 +*/
  173 +-(void)setVolume:(float)leftVolume rigthVolume:(float)rightVolume;
  174 +
  175 +/* 播放视频的当前时刻,单位为秒
  176 + *
  177 + * 视频正常播放时,如果改变currentPlaybackTime的值,将导致播放行为跳转到新的currentPlaybackTime位置播放
  178 + * 如果在视频未播放前设置currentPlaybackTime的值,将导致播放时刻从currentPlaybackTime位置播放
  179 + *
  180 + */
  181 +@property(nonatomic) NSTimeInterval currentPlaybackTime;
  182 +
  183 +/*
  184 + * 当前视频总时长(只读)
  185 + */
  186 +@property (nonatomic, readonly) NSTimeInterval duration;
  187 +
  188 +/* 当前视频可播放长度(只读)
  189 + *
  190 + * currentPlaybackTime 标记的是播放器当前已播放的时长。
  191 + * playableDuration 标记的是播放器缓冲的时间,会稍大于currentPlaybackTime,与currentPlaybackTime的差值则是缓冲长度。
  192 + *
  193 + */
  194 +@property (nonatomic, readonly) NSTimeInterval playableDuration;
  195 +
  196 +/* 包含视频播放内容的VIEW(只读)
  197 + *
  198 + * 可以通过frame设置view大大小
  199 + * 使用[scalingMode]可以更改视频内容在VIEW中的显示情况
  200 + *
  201 + */
  202 +@property (nonatomic, readonly) UIView *view;
  203 +
  204 +/* 当前播放器的播放状态(只读)
  205 + *
  206 + * MPMoviePlaybackStateStopped, // 播放停止
  207 + * MPMoviePlaybackStatePlaying, // 正在播放
  208 + * MPMoviePlaybackStatePaused, // 播放暂停
  209 + * MPMoviePlaybackStateInterrupted, // 播放被打断
  210 + * MPMoviePlaybackStateSeekingForward, // 向前seeking中
  211 + * MPMoviePlaybackStateSeekingBackward // 向后seeking中
  212 + *
  213 + * MPMoviePlayerPlaybackDidFinishNotification,当播放完成时提供通知
  214 + * MPMoviePlayerPlaybackStateDidChangeNotification,当播放状态变化时提供通知
  215 + *
  216 + */
  217 +@property (nonatomic, readonly) MPMoviePlaybackState playbackState;
  218 +
  219 +/* 当前网络加载情况(只读)
  220 + *
  221 + * MPMovieLoadStateUnknown = 0, // 加载情况未知
  222 + * MPMovieLoadStatePlayable = 1 << 0, // 加载完成,可以播放
  223 + * MPMovieLoadStatePlaythroughOK = 1 << 1, // 加载完成,如果shouldAutoplay为YES,将自动开始播放
  224 + * MPMovieLoadStateStalled = 1 << 2, // 如果视频正在加载中
  225 + *
  226 + * MPMoviePlayerLoadStateDidChangeNotification,当加载状态变化时提供通知
  227 + *
  228 + */
  229 +@property (nonatomic, readonly) MPMovieLoadState loadState;
  230 +
  231 +/* 当前缩放显示模式
  232 + *
  233 + * MPMovieScalingModeNone, // 无缩放
  234 + * MPMovieScalingModeAspectFit, // 同比适配,某个方向会有黑边
  235 + * MPMovieScalingModeAspectFill, // 同比填充,某个方向的显示内容可能被裁剪
  236 + * MPMovieScalingModeFill // 满屏填充,与原始视频比例不一致
  237 + *
  238 + */
  239 +@property (nonatomic) MPMovieScalingMode scalingMode;
  240 +
  241 +/* 当前视频宽高(只读)
  242 + *
  243 + * 监听MPMovieNaturalSizeAvailableNotification
  244 + * 播放过程中,宽高信息可能会产生更改
  245 + *
  246 + */
  247 +@property (nonatomic, readonly) CGSize naturalSize;
  248 +
  249 +// Posted when the playback state changes, either programatically or by the user.
  250 +MP_EXTERN NSString * const MPMoviePlayerPlaybackStateDidChangeNotification;
  251 +
  252 +// Posted when movie playback ends or a user exits playback.
  253 +MP_EXTERN NSString * const MPMoviePlayerPlaybackDidFinishNotification;
  254 +
  255 +MP_EXTERN NSString * const MPMoviePlayerPlaybackDidFinishReasonUserInfoKey; // NSNumber (MPMovieFinishReason)
  256 +
  257 +// Posted when the network load state changes.
  258 +MP_EXTERN NSString * const MPMoviePlayerLoadStateDidChangeNotification;
  259 +
  260 +MP_EXTERN NSString * const MPMovieNaturalSizeAvailableNotification;
  261 +
  262 +MP_EXTERN NSString * const MPMoviePlayerFirstVideoFrameRenderedNotification;
  263 +
  264 +MP_EXTERN NSString * const MPMoviePlayerFirstAudioFrameRenderedNotification;
  265 +
  266 +/* bufferTimeMax指定直播流播放时的最大缓冲时长,单位为秒
  267 + *
  268 + * 当buffer为负数时,关闭直播追赶
  269 + * 该属性仅对直播流有效
  270 + * 默认值为2秒
  271 + *
  272 + */
  273 +@property NSTimeInterval bufferTimeMax;
  274 +
  275 +/* 已经加载的数据大小(只读)
  276 + *
  277 + * 已经加载的数据大小,单位是兆
  278 + * 已经加载的全部数据大小,包括音频和视频
  279 + * 数据包括已经播放的,和当前的cache数据
  280 + *
  281 + */
  282 +@property (nonatomic, readonly) double readSize;
  283 +
  284 +/* buffer为空时,拉取数据所耗的时长(只读)
  285 + *
  286 + * 当buffer为空时,开始统计。单位为秒
  287 + *
  288 + * 当MPMoviePlayerLoadStateDidChangeNotification 通知发起
  289 + * MPMovieLoadState状态为MPMovieLoadStateStalled 开始计时
  290 + * MPMovieLoadState状态为MPMovieLoadStatePlayable 或者 MPMovieLoadStatePlaythroughOK时,结束计时
  291 + *
  292 + */
  293 +@property (nonatomic, readonly) NSTimeInterval bufferEmptyDuration;
  294 +
  295 +/* 发起cache的次数(只读)
  296 + *
  297 + * 当buffer为空时,统计一次,统计的条件为
  298 + *
  299 + * 当MPMoviePlayerLoadStateDidChangeNotification 通知发起
  300 + * MPMovieLoadState 状态为MPMovieLoadStateStalled
  301 + *
  302 + */
  303 +@property (nonatomic, readonly) NSInteger bufferEmptyCount;
  304 +
  305 +/* 截图
  306 + *
  307 + * 当前时刻的视频UIImage 图像
  308 + *
  309 + */
  310 +- (UIImage *)thumbnailImageAtCurrentTime;
  311 +
  312 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveStreamerBase.h 0 → 100644
  1 +//
  2 +// CNLiveStreamerBase.h
  3 +// CNLivePlayerSDKDemo
  4 +//
  5 +// Created by iOS on 17/2/27.
  6 +// Copyright © 2017年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLiveTypeDef.h"
  11 +#import <UIKit/UIKit.h>
  12 +
  13 +@interface CNLiveStreamerBase : NSObject
  14 +
  15 +/**
  16 + @abstract 视频帧率 默认:15
  17 + @discussion 当实际送入的视频帧率过高时会主动丢帧,有效范围[1~30]
  18 + */
  19 +@property (nonatomic, assign) int videoFPS;
  20 +
  21 +/**
  22 + @abstract 视频帧率最小值,默认与videoFPS相同
  23 + @discussion video frame per seconds 有效范围[1~30], 超出会提示参数错误
  24 + @discussion 不设置该值时表示网络自适应不使用动态帧率
  25 + */
  26 +@property (nonatomic, assign) int videoMinFPS;
  27 +
  28 +/**
  29 + @abstract 视频帧率最大值,默认与videoFPS相同
  30 + @discussion video frame per seconds 有效范围[1~30], 超出会提示参数错误
  31 + @discussion 不设置该值时表示网络自适应不使用动态帧率
  32 + */
  33 +@property (nonatomic, assign) int videoMaxFPS;
  34 +
  35 +/**
  36 + @abstract 视频编码器
  37 + @discussion video codec used for encode
  38 + */
  39 +@property (nonatomic, assign) CNLiveVideoCodec videoCodec;
  40 +
  41 +/**
  42 + @abstract 视频编码起始码率(单位:kbps)
  43 + @discussion 开始推流时的视频码率,开始推流后,根据网络情况在 [Min, Max]范围内调节
  44 + @discussion 视频码率上调则画面更清晰,下调则画面更模糊
  45 + */
  46 +@property (nonatomic, assign) int videoInitBitrate; // kbit/s of video
  47 +
  48 +/**
  49 + @abstract 视频编码最高码率(单位:kbps)
  50 + @discussion 视频码率自适应调整的上限, 为目标码率
  51 + */
  52 +@property (nonatomic, assign) int videoMaxBitrate; // kbit/s of video
  53 +
  54 +/**
  55 + @abstract 视频编码最低码率(单位:kbps)
  56 + @discussion 视频码率自适应调整的下限
  57 + */
  58 +@property (nonatomic, assign) int videoMinBitrate; // kbit/s of video
  59 +
  60 +/**
  61 + @abstract 最大关键帧间隔(单位:秒, 默认:3)
  62 + @discussion 即GOP长度 画面静止时,隔n秒插入一个关键帧
  63 + */
  64 +@property (nonatomic, assign) float maxKeyInterval; // seconds
  65 +
  66 +/**
  67 + @abstract 音频编码码率(单位:kbps)
  68 + @discussion 音频目标编码码率 (比如48,96,128等)
  69 + */
  70 +@property (nonatomic, assign) int audiokBPS; // kbit/s of audio
  71 +
  72 +/**
  73 + @abstract 查询当前是否处于推流状态 (建立连接中, 或连接中)
  74 + */
  75 +- (BOOL) isStreaming;
  76 +
  77 +/**
  78 + @abstract 静音推流 (仍然有音频输出发送, 只是音量为0)
  79 + @param bMute YES / ON
  80 + */
  81 +- (void)muteStream:(BOOL)bMute;
  82 +
  83 +/**
  84 + @abstract 截图功能,目前只支持jpg格式
  85 + @param jpegCompressionQuality 设置图像的压缩比例
  86 + @param filename 图片的文件名
  87 + */
  88 +- (void)takePhotoWithQuality:(CGFloat)jpegCompressionQuality
  89 + fileName:(NSString *)filename;
  90 +
  91 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveTypeDef.h 0 → 100644
  1 +//
  2 +// CNLiveTypeDef.h
  3 +// CNLiveLiveDemo
  4 +//
  5 +// Created by Android on 16/8/3.
  6 +// Copyright © 2016年 Android. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CNLiveTypeDef_h
  10 +#define CNLiveTypeDef_h
  11 +
  12 +#pragma mark - Video Dimension
  13 +
  14 +/// 采集分辨率
  15 +typedef NS_ENUM(NSUInteger, CNLiveVideoDimension) {
  16 + /// 16 : 9 宽高比,1280 x 720 分辨率
  17 + CNLiveVideoDimension_16_9__1280x720 = 0,
  18 + /// 16 : 9 宽高比,960 x 540 分辨率
  19 + CNLiveVideoDimension_16_9__960x540,
  20 + /// 4 : 3 宽高比,640 x 480 分辨率
  21 + CNLiveVideoDimension_4_3__640x480,
  22 + /// 16 : 9 宽高比,640 x 360 分辨率
  23 + CNLiveVideoDimension_16_9__640x360,
  24 + /// 4 : 3 宽高比,320 x 240 分辨率
  25 + CNLiveVideoDimension_5_4__352x288,
  26 +
  27 + /// 缩放自定义分辨率 从设备支持的最近分辨率缩放获得, 若设备没有对应宽高比的分辨率,则裁剪后进行缩放
  28 + CNLiveVideoDimension_UserDefine_Scale,
  29 + /// 裁剪自定义分辨率 从设备支持的最近分辨率裁剪获得
  30 + CNLiveVideoDimension_UserDefine_Crop,
  31 + /// 注意: 选择缩放自定义分辨率时可能会有额外CPU代价
  32 +
  33 + /// 默认分辨率,默认为 4 : 3 宽高比,640 x 480 分辨率
  34 + CNLiveVideoDimension_Default = CNLiveVideoDimension_4_3__640x480,
  35 +};
  36 +
  37 +
  38 +#pragma mark - Video Codec ID
  39 +/*!
  40 + * @abstract 视频编码器类型
  41 + */
  42 +typedef NS_ENUM(NSUInteger, CNLiveVideoCodec) {
  43 + /// 视频编码器 - h264 软件编码器
  44 + CNLiveVideoCodec_X264 = 0,
  45 + /// 视频编码器 - 仟壹265 软件编码器
  46 + CNLiveVideoCodec_QY265,
  47 + /// 视频编码器 - iOS VT264硬件编码器 (iOS 8.0以上支持)
  48 + CNLiveVideoCodec_VT264,
  49 + /// 视频编码器 - 由SDK自动选择( VT264 > X264)
  50 + CNLiveVideoCodec_AUTO = 100,
  51 +};
  52 +
  53 +#pragma mark - QYPublisher State
  54 +
  55 +/*!
  56 + * @abstract 采集设备状态
  57 + */
  58 +typedef NS_ENUM(NSUInteger, CNLiveCaptureState) {
  59 + /// 设备空闲中
  60 + CNLiveCaptureStateIdle,
  61 + /// 设备工作中
  62 + CNLiveCaptureStateCapturing,
  63 + /// 设备授权被拒绝
  64 + CNLiveCaptureStateDevAuthDenied,
  65 + /// 关闭采集设备中
  66 + CNLiveCaptureStateClosingCapture,
  67 + /// 参数错误,无法打开(比如设置的分辨率,码率当前设备不支持)
  68 + CNLiveCaptureStateParameterError,
  69 + /// 设备正忙,请稍后尝试 ( 该状态在发出通知0.5秒后被清除 )
  70 + CNLiveCaptureStateDevBusy,
  71 +};
  72 +
  73 +/*!
  74 + * @abstract 推流状态
  75 + */
  76 +typedef NS_ENUM(NSUInteger, CNLiveStreamState) {
  77 + /// 初始化时状态为空闲
  78 + CNLiveStreamStateIdle = 0,
  79 + /// 连接中
  80 + CNLiveStreamStateConnecting,
  81 + /// 已连接
  82 + CNLiveStreamStateConnected,
  83 + /// 断开连接中
  84 + CNLiveStreamStateDisconnecting,
  85 + /// 推流出错
  86 + CNLiveStreamStateError,
  87 + /// 结束推流成功
  88 + CNLiveStopStreamSuccess,
  89 + /// 结束推流失败
  90 + CNLiveStopStreamFailure,
  91 +};
  92 +
  93 +/*!
  94 + * @abstract 推流错误码,用于指示推流失败的原因
  95 + */
  96 +typedef NS_ENUM(NSUInteger, CNLiveStreamErrorCode) {
  97 + /// 正常无错误
  98 + CNLiveStreamErrorCode_NONE = 0,
  99 + /// (obsolete)
  100 + CNLiveStreamErrorCode_CNLiveAUTHFAILED,
  101 + /// 当前帧编码失败
  102 + CNLiveStreamErrorCode_ENCODE_FRAMES_FAILED,
  103 + /// 无法打开配置指示的CODEC
  104 + CNLiveStreamErrorCode_CODEC_OPEN_FAILED,
  105 + /// 连接出错,检查地址
  106 + CNLiveStreamErrorCode_CONNECT_FAILED,
  107 + /// 网络连接中断
  108 + CNLiveStreamErrorCode_CONNECT_BREAK,
  109 + /// rtmp 推流域名不存在 (CNLive 自定义)
  110 + CNLiveStreamErrorCode_RTMP_NonExistDomain,
  111 + /// rtmp 应用名不存在(CNLive 自定义)
  112 + CNLiveStreamErrorCode_RTMP_NonExistApplication,
  113 + /// rtmp 流名已存在(CNLive 自定义)
  114 + CNLiveStreamErrorCode_RTMP_AlreadyExistStreamName,
  115 + /// rtmp 被黑名单拒绝(CNLive 自定义)
  116 + CNLiveStreamErrorCode_RTMP_ForbiddenByBlacklist,
  117 + /// rtmp 内部错误(CNLive 自定义)
  118 + CNLiveStreamErrorCode_RTMP_InternalError,
  119 + /// rtmp URL 地址已过期(CNLive 自定义)
  120 + CNLiveStreamErrorCode_RTMP_URLExpired,
  121 + /// rtmp URL 地址签名错误(CNLive 自定义)
  122 + CNLiveStreamErrorCode_RTMP_SignatureDoesNotMatch,
  123 + /// rtmp URL 中AccessKeyId非法(CNLive 自定义)
  124 + CNLiveStreamErrorCode_RTMP_InvalidAccessKeyId,
  125 + /// rtmp URL 中参数错误(CNLive 自定义)
  126 + CNLiveStreamErrorCode_RTMP_BadParams,
  127 + /// rtmp URL 中的推流不在发布点内(CNLive 自定义)
  128 + CNLiveStreamErrorCode_RTMP_ForbiddenByRegion,
  129 + /// (obsolete)
  130 + CNLiveStreamErrorCode_FRAMES_THRESHOLD,
  131 + /// (obsolete)
  132 + CNLiveStreamErrorCode_NO_INPUT_SAMPLE,
  133 + /// 对于URL中的域名解析失败
  134 + CNLiveStreamErrorCode_DNS_Parse_failed,
  135 + /// 对于URL对应的服务器连接失败(无法建立TCP连接)
  136 + CNLiveStreamErrorCode_Connect_Server_failed,
  137 + /// 跟RTMP服务器完成握手后,向{appname}/{streamname} 推流失败
  138 + CNLiveStreamErrorCode_RTMP_Publish_failed,
  139 + /// 音视频同步失败 (输入的音频和视频的时间戳的差值超过5s)
  140 + CNLiveStreamErrorCode_AV_SYNC_ERROR,
  141 + /// 非法地址(地址为空或url中的协议或本地文件的后缀SDK不支持, 请检查)
  142 + CNLiveStreamErrorCode_INVALID_ADDRESS,
  143 + /// 异常
  144 + CNLiveStreamErrorCode_ABNORMAL,
  145 +
  146 +};
  147 +
  148 +#pragma mark - 美颜
  149 +
  150 +typedef NS_ENUM(NSUInteger, CNLiveBeautyType) {
  151 + ///无
  152 + CNLiveBeautyTypeNone = 0,
  153 + ///旧美颜
  154 + CNLiveBeautyTypeOld,
  155 + ///红润美颜
  156 + CNLiveBeautyTypeRuddy,
  157 + ///美颜特效
  158 + CNLiveBeautyTypeSpecial
  159 +};
  160 +
  161 +typedef NS_ENUM(NSUInteger, CNLiveSpecialEffects) {
  162 + ///小清新
  163 + CNLiveSpecialEffectsFresh = 0,
  164 + ///靓丽
  165 + CNLiveSpecialEffectsPretty,
  166 + ///甜美可人
  167 + CNLiveSpecialEffectsSweet,
  168 + ///怀旧
  169 + CNLiveSpecialEffectsNostalgia,
  170 + ///蓝调
  171 + CNLiveSpecialEffectsBlues,
  172 + ///老照片
  173 + CNLiveSpecialEffectsOldPicture
  174 +};
  175 +
  176 +#pragma mark - player
  177 +/**
  178 + * 视频解码模式
  179 + */
  180 +typedef NS_ENUM(NSUInteger, CNLiveMovieVideoDecoderMode) {
  181 + ///视频解码方式采用软解
  182 + CNLiveMovieVideoDecoderMode_Software = 0,
  183 + ///视频解码方式采用硬解
  184 + CNLiveMovieVideoDecoderMode_Hardware,
  185 + ///自动选择解码方式,8.0以上的系统优先选择硬解
  186 + CNLiveMovieVideoDecoderMode_AUTO,
  187 +};
  188 +
  189 +/**
  190 + * 主播直播状态
  191 + */
  192 +typedef NS_ENUM(NSUInteger, CNLiveAnchorStatus) {
  193 + ///主播直播中
  194 + CNLiveAnchorStatusLiving = 0,
  195 + ///主播已离开
  196 + CNLiveAnchorStatusLeaving,
  197 + ///直播已结束
  198 + CNLiveAnchorStatusEnd,
  199 +};
  200 +
  201 +#endif /* CNLiveTypeDef_h */
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveWatermark.h 0 → 100644
  1 +//
  2 +// CNLiveWatermark.h
  3 +// CNLivePlayerSDKDemo
  4 +//
  5 +// Created by iOS on 17/2/27.
  6 +// Copyright © 2017年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import <UIKit/UIKit.h>
  11 +
  12 +@interface CNLiveWatermark : NSObject
  13 +
  14 +/**
  15 + @abstract 水印logo的图片
  16 + @discussion 设置为nil为清除水印图片
  17 + @discussion 请注意背景图片的尺寸, 太大的图片会导致内存占用过高
  18 + @see
  19 + */
  20 +@property (nonatomic, readwrite) UIImage *logoPic;
  21 +
  22 +/**
  23 + @abstract 水印logo的图片(网络图片)
  24 + @discussion 设置为nil为清除水印图片
  25 + @discussion 请注意背景图片的尺寸, 太大的图片会导致内存占用过高
  26 + @see
  27 + */
  28 +@property (nonatomic, readwrite) NSURL *logoURL;
  29 +
  30 +/**
  31 + @abstract 水印logo的图片的位置和大小
  32 + @discussion 位置和大小的单位为预览视图的百分比, 左上角为(0,0), 右下角为(1.0, 1.0)
  33 + @discussion 如果宽为0, 则根据图像的宽高比, 和设置的高度比例, 计算得到宽度的比例
  34 + @discussion 如果高为0, 方法同上
  35 + */
  36 +@property (nonatomic, readwrite) CGRect logoRect;
  37 +
  38 +/**
  39 + @abstract 水印logo的图片的透明度
  40 + @discussion alpha为透明度(0-1),0完全透明,1完全不透明
  41 + */
  42 +@property (nonatomic, readwrite) CGFloat logoAlpha;
  43 +
  44 +/**
  45 + @abstract 水印文字的label
  46 + @discussion 借用UILabel来指定文字的颜色,字体, 透明度, 对齐方式等属性
  47 + @discussion 请注意保证背景图片的尺寸, 太大的图片会导致内存占用过高
  48 + @warning 如果使用非等宽字体, 可能导致闪烁(默认为Courier)
  49 + @warning picMixer和UILabel都有alpha属性, 建议只选用其中一个, 固定另一个为1.0,
  50 + 为了减少接口, 建议直接使用UILabel的属性,
  51 + 如果两者同时使用, 最终图层的alpha为两者乘积
  52 + */
  53 +@property (nonatomic, readwrite) UILabel *textLabel;
  54 +
  55 +/**
  56 + @abstract 水印文字的位置和大小
  57 + @discussion 位置和大小的单位为预览视图的百分比, 左上角为(0,0), 右下角为(1.0, 1.0)
  58 + @discussion 如果宽为0, 则根据文字图像的宽高比, 和设置的高度比例, 计算得到宽度的比例
  59 + @discussion 如果高为0, 方法同上
  60 + */
  61 +@property (nonatomic, readwrite) CGRect textRect;
  62 +
  63 +/**
  64 + @abstract 刷新水印文字的内容
  65 + @discussion 先修改文字的内容或格式,调用该方法后生效
  66 + */
  67 +- (void)updateTextLabel;
  68 +
  69 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Headers/CNLiveWebcastManager.h 0 → 100644
  1 +//
  2 +// CNLiveStreamManager.h
  3 +// CNLivePlayerSDKDemo
  4 +//
  5 +// Created by iOS on 17/2/23.
  6 +// Copyright © 2017年 雷浩杰. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "CNLiveTypeDef.h"
  11 +#import "CNLiveWatermark.h"
  12 +#import "CNLiveStreamerBase.h"
  13 +#import "CNLiveBeautifyFaceFilter.h"
  14 +#import "CNLiveAudioCapture.h"
  15 +#import <AVFoundation/AVFoundation.h>
  16 +
  17 +@interface CNLiveWebcastManager : NSObject
  18 +
  19 +/**
  20 + * 应用ID(只读)
  21 + */
  22 +@property (nonatomic, readonly) NSString *appId;
  23 +
  24 +/**
  25 + * 应用KEY(只读)
  26 + */
  27 +@property (nonatomic, readonly) NSString *appKey;
  28 +
  29 ++ (CNLiveWebcastManager *)manager;
  30 +
  31 +/**
  32 + @abstract 初始化直播云SDK
  33 + @param appId 在open.cnlive.com网站申请得到的appId
  34 + @param appKey 在open.cnlive.com网站申请得到的appKey
  35 + @warning 必传参数
  36 + */
  37 +- (void)initWithAppId:(NSString *)appId appKey:(NSString *)appKey;
  38 +
  39 +/**
  40 + @abstract 获取版本号
  41 + */
  42 ++ (NSString *)getVersion;
  43 +
  44 +@end
... ...
发布版SDK/CNLivePlayerSDK.framework/Info.plist 0 → 100644
No preview for this file type
推流SDK文档.pdf deleted 100644 → 0
No preview for this file type
播放SDK文档.pdf deleted 100644 → 0
No preview for this file type