V2TXLivePremier.h
2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// Copyright © 2020 Tencent. All rights reserved.
//
// Module: V2TXLive
//
#import "V2TXLiveDef.h"
#import "TXLiteAVSymbolExport.h"
NS_ASSUME_NONNULL_BEGIN
/// @defgroup V2TXLivePremier_ios V2TXLivePremier
///
/// @{
/////////////////////////////////////////////////////////////////////////////////
//
// V2TXLive 高级接口
//
/////////////////////////////////////////////////////////////////////////////////
@protocol V2TXLivePremierObserver;
@protocol V2TXLivePremier <NSObject>
/**
* 获取 SDK 版本号
*/
+ (NSString *)getSDKVersionStr;
/**
* 设置 V2TXLivePremier 回调接口
*/
+ (void)setObserver:(id<V2TXLivePremierObserver>)observer;
/**
* 设置 Log 的配置信息
*/
+ (V2TXLiveCode)setLogConfig:(V2TXLiveLogConfig *)config;
/**
* 设置 SDK 接入环境
*
* @note 如您的应用无特殊需求,请不要调用此接口进行设置。
* @param env 目前支持 “default” 和 “GDPR” 两个参数
* - default:默认环境,SDK 会在全球寻找最佳接入点进行接入。
* - GDPR:所有音视频数据和质量统计数据都不会经过中国大陆地区的服务器。
*/
+ (V2TXLiveCode)setEnvironment:(const char *)env;
/**
* 设置 SDK 的授权 License
*
* 文档地址:https://cloud.tencent.com/document/product/454/34750
* @param url licence的地址
* @param key licence的秘钥
*/
#if TARGET_OS_IPHONE
+ (void)setLicence:(NSString *)url key:(NSString *)key;
#endif
/**
* 设置 SDK sock5 代理配置
*
* @param host sock5 代理服务器的地址
* @param port sock5 代理服务器的端口
* @param username sock5 代理服务器的验证的用户名
* @param password sock5 代理服务器的验证的密码
*/
+ (V2TXLiveCode)setSocks5Proxy:(NSString *)host port:(NSInteger)port username:(NSString *)username password:(NSString *)password;
@end
/////////////////////////////////////////////////////////////////////////////////
//
// V2TXLive 高级回调接口
//
/////////////////////////////////////////////////////////////////////////////////
@protocol V2TXLivePremierObserver <NSObject>
@optional
/**
* 自定义 Log 输出回调接口
*/
- (void)onLog:(V2TXLiveLogLevel)level log:(NSString *)log;
/**
* setLicence 接口回调
*
* @param result 设置 licence 结果 0 成功,负数失败
* @param reason 设置 licence 失败原因
*/
- (void)onLicenceLoaded:(int)result Reason:(NSString *)reason;
@end
LITEAV_EXPORT @interface V2TXLivePremier : NSObject<V2TXLivePremier>
@end
NS_ASSUME_NONNULL_END
/// @}