Skip to content

Commit fa84925

Browse files
author
eagleychen
committed
添加双中转+更新废弃接口
1 parent 6a7c1e5 commit fa84925

15 files changed

+64
-49
lines changed

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ PODS:
3535
- TIoTLinkKit_SoundTouch (1.0.0)
3636
- TIoTLinkKit_TPNS (1.0.1)
3737
- TIoTLinkKit_WechatOpenSDK (1.0.1)
38-
- TIoTLinkKit_XP2P (2.4.52)
38+
- TIoTLinkKit_XP2P (2.4.53-beta.202412180853)
3939
- TIoTLinkVideo (1.0.0):
4040
- CocoaAsyncSocket (= 7.6.5)
4141
- TIoTLinkKit_FLV (= 2.2.3)
4242
- TIoTLinkKit_GVoiceSE (>= 1.0.9)
4343
- TIoTLinkKit_SoundTouch (= 1.0.0)
44-
- TIoTLinkKit_XP2P (= 2.4.52)
44+
- TIoTLinkKit_XP2P (= 2.4.53-beta.202412180853)
4545
- TPCircularBuffer (= 1.6.1)
4646
- TPCircularBuffer (1.6.1)
4747
- TrueTime (5.0.3)
@@ -133,8 +133,8 @@ SPEC CHECKSUMS:
133133
TIoTLinkKit_SoundTouch: cf79ae182b6c2349ff65bac7a338974bc538fa77
134134
TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968
135135
TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614
136-
TIoTLinkKit_XP2P: e7cc68a561a86bfde6ecd70ed098e7c66be65df1
137-
TIoTLinkVideo: bf6562362dfc6fb6228eb397914867c8cc070db5
136+
TIoTLinkKit_XP2P: f8e7e8646955e42d151e36885a5ff68d7df29046
137+
TIoTLinkVideo: c3afe0e458b0e920665f012772d255690b120e38
138138
TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a
139139
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
140140
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d

Source/LinkSDKDemo/Video/LocalAreaNetwork/Controller/TIoTAreaNetworkPreviewVC.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,8 @@ - (void)responseP2PdisConnect:(NSNotification *)notify {
892892
#warning 开启p2p
893893
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
894894
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
895-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:DeviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:@""];
895+
//TODO 重新拉取 p2pinfo 后,setxp2pinfo
896+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:DeviceName?:@"" xp2pinfo:@"请重新拉取xp2pinfo,填入此处"];
896897
[self setVieoPlayerStartPlayWith:self.qualityString];
897898
});
898899

Source/LinkSDKDemo/Video/NVRList/Controller/TIoTDemoNVRSubDeviceVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ - (void)requestXp2pInfoWithDeviceName:(NSString *)deviceName isReconnection:(BOO
186186
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
187187
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
188188
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
189-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
189+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
190190
}
191191

192192
- (void)setupUIViews {

Source/LinkSDKDemo/Video/P2P/Controller/PreviousPath/TIoTPlayListVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ - (void)requestXp2pInfo:(NSString *)deviceName {
104104
- (void)requestXp2pInfoWithDeviceName:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfo{
105105
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
106106
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
107-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
107+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
108108
}
109109
/// video 设备列表
110110
- (void)requestVideoList {

Source/LinkSDKDemo/Video/P2P/Controller/PreviousPath/TIoTPlayMovieVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ - (void)responseP2PdisConnect:(NSNotification *)notify {
210210
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
211211
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
212212
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
213-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
213+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
214214
}
215215

216216
- (void)viewDidDisappear:(BOOL)animated {

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoPreviewDeviceVC.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {
146146
[self requestCloudStoreVideoList];
147147

148148
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
149-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
149+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
150150
[self setVieoPlayerStartPlayWith:self.qualityString];
151151

152152
//计算IPC打洞开始时间
@@ -1246,7 +1246,7 @@ - (void)resconnectXp2pRequestInfo:(NSString *)DeviceName {
12461246

12471247
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfo {
12481248
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
1249-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
1249+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
12501250

12511251
[self getDeviceStatusWithType:action_live qualityType:self.qualityString completion:^(BOOL finished) {
12521252
if (finished) {
@@ -1704,7 +1704,8 @@ - (void)appNetWorkResume {
17041704
//重连使用
17051705
[[TIoTCoreXP2PBridge sharedInstance] stopService:self.deviceName?:@""];
17061706
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
1707-
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
1707+
[self requestXp2pInfo];// 重新获取info,启动p2p
1708+
// [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
17081709

17091710
}
17101711

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoSameScreenVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ - (void)requestXp2pInfoWithDeviceName:(NSString *)deviceName isReconnection:(BOO
670670
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
671671
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
672672
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
673-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
673+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
674674
}
675675

676676
#pragma mark -IJKPlayer

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoCallVC.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {
111111

112112
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
113113
int errorcode = [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:self.deviceName?:@""];
114-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
114+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
115115

116116
if (errorcode == XP2P_ERR_VERSION) {
117117
UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"APP SDK 版本与设备端 SDK 版本号不匹配,版本号需前两位保持一致" message:nil preferredStyle:(UIAlertControllerStyleAlert)];
@@ -548,7 +548,7 @@ - (void)resconnectXp2pRequestInfo:(NSString *)DeviceName {
548548

549549
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfo {
550550
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
551-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
551+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
552552

553553
[self getDeviceStatusWithType:action_live qualityType:self.qualityString completion:^(BOOL finished) {
554554
if (finished) {
@@ -790,7 +790,8 @@ - (void)appNetWorkResume {
790790
//重连使用
791791
[[TIoTCoreXP2PBridge sharedInstance] stopService:self.deviceName?:@""];
792792
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
793-
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
793+
[self requestXp2pInfo];// 重新获取info,启动p2p
794+
// [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
794795

795796
}
796797

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {
170170

171171
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
172172
int errorcode = [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:self.deviceName?:@""];
173-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
173+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
174174

175175
if (errorcode == XP2P_ERR_VERSION) {
176176
UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"APP SDK 版本与设备端 SDK 版本号不匹配,版本号需前两位保持一致" message:nil preferredStyle:(UIAlertControllerStyleAlert)];
@@ -515,7 +515,7 @@ - (void)resconnectXp2pRequestInfo:(NSString *)DeviceName {
515515

516516
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfo {
517517
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
518-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
518+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
519519

520520
[self getDeviceStatusWithType:action_live qualityType:self.qualityString completion:^(BOOL finished) {
521521
if (finished) {
@@ -626,7 +626,8 @@ - (void)appNetWorkResume {
626626
//重连使用
627627
[[TIoTCoreXP2PBridge sharedInstance] stopService:self.deviceName?:@""];
628628
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
629-
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
629+
[self requestXp2pInfo];// 重新获取info,启动p2p
630+
// [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
630631

631632
}
632633

Source/LinkSDKDemo/Video/P2P/Mjpeg/TIoTDemoPreviewMJPEGVC.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {
144144

145145
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
146146
int errorcode = [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:self.deviceName?:@""];
147-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
147+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
148148

149149
if (errorcode == XP2P_ERR_VERSION) {
150150
UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"APP SDK 版本与设备端 SDK 版本号不匹配,版本号需前两位保持一致" message:nil preferredStyle:(UIAlertControllerStyleAlert)];
@@ -1225,7 +1225,7 @@ - (void)resconnectXp2pRequestInfo:(NSString *)DeviceName {
12251225

12261226
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfo {
12271227
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
1228-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
1228+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
12291229

12301230
[self getDeviceStatusWithType:action_live qualityType:self.qualityString completion:^(BOOL finished) {
12311231
if (finished) {
@@ -1695,7 +1695,8 @@ - (void)appNetWorkResume {
16951695
//重连使用
16961696
[[TIoTCoreXP2PBridge sharedInstance] stopService:self.deviceName?:@""];
16971697
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
1698-
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
1698+
[self requestXp2pInfo];// 重新获取info,启动p2p
1699+
// [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudSecretId sec_key:env.cloudSecretKey pro_id:env.cloudProductId dev_name:self.deviceName?:@""];
16991700

17001701
}
17011702

Source/LinkSDKDemo/Video/PlayBack/LocalPlayBack/Controller/TIoTDemoLocalRecordVC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ - (void)responseLocalP2PdisConnect:(NSNotification *)notify {
16221622
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
16231623
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
16241624
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
1625-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
1625+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
16261626
}
16271627

16281628
#pragma mark Remove Movie Notification Handlers

Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {
9393

9494
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
9595
int errorcode = [[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:self.deviceName?:@""];
96-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
96+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:self.deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
9797

9898
if (errorcode == XP2P_ERR_VERSION) {
9999
UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"APP SDK 版本与设备端 SDK 版本号不匹配,版本号需前两位保持一致" message:nil preferredStyle:(UIAlertControllerStyleAlert)];
@@ -285,7 +285,7 @@ - (void)responseP2PdisConnect:(NSNotification *)notify {
285285
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
286286
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
287287
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
288-
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
288+
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
289289
}
290290

291291
- (UIViewController *)getCurrentViewController

Source/SDK/LinkVideo/TIoTCoreXP2PBridge.h

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
2222
@property (nonatomic, strong)NSString *appkey; //为explorer平台注册的应用信息(https://console.cloud.tencent.com/iotexplorer/v2/instance/app/detai) explorer控制台- 应用开发 - 选对应的应用下的 appkey/appsecret
2323
@property (nonatomic, strong)NSString *appsecret; //为explorer平台注册的应用信息(https://console.cloud.tencent.com/iotexplorer/v2/instance/app/detai)
2424
@property (nonatomic, strong)NSString *userid; //用户纬度(每个手机区分开)使用用户自有的账号系统userid;若无请配置为[TIoTCoreXP2PBridge sharedInstance].getAppUUID; 查找日志是需提供此userid字段
25+
26+
@property (nonatomic, assign)BOOL crossStunTurn; //是否打开双中转开关,默认false
27+
@property (nonatomic, assign)XP2PProtocolType type; //通信协议,默认auto
2528
@end
2629

2730
@protocol TIoTCoreXP2PBridgeDelegate <NSObject>
@@ -74,24 +77,17 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
7477
+ (NSString *)getSDKVersion;
7578
+ (instancetype)sharedInstance ;
7679

77-
// 不建议使用下面两个start接口,避免泄漏您的secretid和secretkey,会造成您的账户泄漏,demo仅用此接口做演示使用
78-
- (XP2PErrCode)startAppWith:(NSString *)sec_id sec_key:(NSString *)sec_key pro_id:(NSString *)pro_id dev_name:(NSString *)dev_name __attribute__((deprecated("Use -startAppWith & -setXp2pInfo")));
79-
- (XP2PErrCode)startAppWith:(NSString *)sec_id sec_key:(NSString *)sec_key pro_id:(NSString *)pro_id dev_name:(NSString *)dev_name xp2pinfo:(NSString *)xp2pinfo __attribute__((deprecated("Use -startAppWith & -setXp2pInfo")));
80-
8180
/*
8281
* 启动 sdk 服务,productid和devicename可以从video控制台创建得倒
8382
* type: 默认auto模式,udp探测不通自动切换至tcp
8483
*/
85-
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name;
86-
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name type:(XP2PProtocolType)type;
84+
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name; __attribute__((deprecated("Use -startAppWith: dev_name: appconfig:")));
85+
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name appconfig:(TIoTP2PAPPConfig *)appconfig;
8786

8887
/*
89-
* 此接口慎重:需注意 正式版app发布时候不需要传入secretid和secretkey,避免将这两个参数放置在app中,防止账号泄露,此处仅为演示功能
90-
* 此接口只二者选一:传入xp2pinfo 就不需要填写 secretid和secretkey,xp2pinfo可从自建服务获取;
91-
* 仅跑通流程的话,可设置 secretid和secretkey 两个参数,xp2pinfo传“”即可
88+
* 设置设备 xp2pinfo ,ready 回调之后,即可开始(拉流、发信令、对讲等)
9289
*/
93-
- (XP2PErrCode)setXp2pInfo:(NSString *)dev_name sec_id:(NSString *)sec_id sec_key:(NSString *)sec_key xp2pinfo:(NSString *)xp2pinfo __attribute__((deprecated("Use -setXp2pInfo: xp2pinfo:")));
94-
- (XP2PErrCode)setXp2pInfo:(NSString *)dev_name xp2pinfo:(NSString *)xp2pinfo appconfig:(TIoTP2PAPPConfig *)appconfig;
90+
- (XP2PErrCode)setXp2pInfo:(NSString *)dev_name xp2pinfo:(NSString *)xp2pinfo;
9591

9692
/*
9793
* 使用播放器播放时,需先等待 SDK 初始化完成,ready事件(xp2preconnect 通知)之后,即可获取到 http-url

0 commit comments

Comments
 (0)