Skip to content

Commit

Permalink
添加双中转+更新废弃接口
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Dec 18, 2024
1 parent 6a7c1e5 commit fa84925
Show file tree
Hide file tree
Showing 15 changed files with 64 additions and 49 deletions.
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ PODS:
- TIoTLinkKit_SoundTouch (1.0.0)
- TIoTLinkKit_TPNS (1.0.1)
- TIoTLinkKit_WechatOpenSDK (1.0.1)
- TIoTLinkKit_XP2P (2.4.52)
- TIoTLinkKit_XP2P (2.4.53-beta.202412180853)
- TIoTLinkVideo (1.0.0):
- CocoaAsyncSocket (= 7.6.5)
- TIoTLinkKit_FLV (= 2.2.3)
- TIoTLinkKit_GVoiceSE (>= 1.0.9)
- TIoTLinkKit_SoundTouch (= 1.0.0)
- TIoTLinkKit_XP2P (= 2.4.52)
- TIoTLinkKit_XP2P (= 2.4.53-beta.202412180853)
- TPCircularBuffer (= 1.6.1)
- TPCircularBuffer (1.6.1)
- TrueTime (5.0.3)
Expand Down Expand Up @@ -133,8 +133,8 @@ SPEC CHECKSUMS:
TIoTLinkKit_SoundTouch: cf79ae182b6c2349ff65bac7a338974bc538fa77
TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968
TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614
TIoTLinkKit_XP2P: e7cc68a561a86bfde6ecd70ed098e7c66be65df1
TIoTLinkVideo: bf6562362dfc6fb6228eb397914867c8cc070db5
TIoTLinkKit_XP2P: f8e7e8646955e42d151e36885a5ff68d7df29046
TIoTLinkVideo: c3afe0e458b0e920665f012772d255690b120e38
TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,8 @@ - (void)responseP2PdisConnect:(NSNotification *)notify {
#warning 开启p2p
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:DeviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:@""];
//TODO 重新拉取 p2pinfo 后,setxp2pinfo
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:DeviceName?:@"" xp2pinfo:@"请重新拉取xp2pinfo,填入此处"];
[self setVieoPlayerStartPlayWith:self.qualityString];
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ - (void)requestXp2pInfoWithDeviceName:(NSString *)deviceName isReconnection:(BOO
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
}

- (void)setupUIViews {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ - (void)requestXp2pInfo:(NSString *)deviceName {
- (void)requestXp2pInfoWithDeviceName:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfo{
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfo?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfo?:@""];
}
/// video 设备列表
- (void)requestVideoList {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ - (void)responseP2PdisConnect:(NSNotification *)notify {
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
}

- (void)viewDidDisappear:(BOOL)animated {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {
[self requestCloudStoreVideoList];

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

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

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

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

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ - (void)requestXp2pInfoWithDeviceName:(NSString *)deviceName isReconnection:(BOO
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
}

#pragma mark -IJKPlayer
Expand Down
7 changes: 4 additions & 3 deletions Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoCallVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {

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

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

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

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

}

Expand Down
7 changes: 4 additions & 3 deletions Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoPushVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {

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

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

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

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

}

Expand Down
7 changes: 4 additions & 3 deletions Source/LinkSDKDemo/Video/P2P/Mjpeg/TIoTDemoPreviewMJPEGVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {

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

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

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

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

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,7 @@ - (void)responseLocalP2PdisConnect:(NSNotification *)notify {
- (void)resconnectXp2pWithDevicename:(NSString *)deviceName xp2pInfo:(NSString *)xp2pInfoString {
TIoTCoreAppEnvironment *env = [TIoTCoreAppEnvironment shareEnvironment];
[[TIoTCoreXP2PBridge sharedInstance] startAppWith:env.cloudProductId dev_name:deviceName?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" sec_id:env.cloudSecretId sec_key:env.cloudSecretKey xp2pinfo:xp2pInfoString?:@""];
[[TIoTCoreXP2PBridge sharedInstance] setXp2pInfo:deviceName?:@"" xp2pinfo:xp2pInfoString?:@""];
}

#pragma mark Remove Movie Notification Handlers
Expand Down
4 changes: 2 additions & 2 deletions Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ - (void)requestDiffDeviceDataWithXp2pInfo:(NSString *)xp2pInfo {

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

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

- (UIViewController *)getCurrentViewController
Expand Down
18 changes: 7 additions & 11 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
@property (nonatomic, strong)NSString *appkey; //为explorer平台注册的应用信息(https://console.cloud.tencent.com/iotexplorer/v2/instance/app/detai) explorer控制台- 应用开发 - 选对应的应用下的 appkey/appsecret
@property (nonatomic, strong)NSString *appsecret; //为explorer平台注册的应用信息(https://console.cloud.tencent.com/iotexplorer/v2/instance/app/detai)
@property (nonatomic, strong)NSString *userid; //用户纬度(每个手机区分开)使用用户自有的账号系统userid;若无请配置为[TIoTCoreXP2PBridge sharedInstance].getAppUUID; 查找日志是需提供此userid字段

@property (nonatomic, assign)BOOL crossStunTurn; //是否打开双中转开关,默认false
@property (nonatomic, assign)XP2PProtocolType type; //通信协议,默认auto
@end

@protocol TIoTCoreXP2PBridgeDelegate <NSObject>
Expand Down Expand Up @@ -74,24 +77,17 @@ extern NSNotificationName const TIoTCoreXP2PBridgeNotificationStreamEnd;
+ (NSString *)getSDKVersion;
+ (instancetype)sharedInstance ;

// 不建议使用下面两个start接口,避免泄漏您的secretid和secretkey,会造成您的账户泄漏,demo仅用此接口做演示使用
- (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")));
- (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")));

/*
* 启动 sdk 服务,productid和devicename可以从video控制台创建得倒
* type: 默认auto模式,udp探测不通自动切换至tcp
*/
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name;
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name type:(XP2PProtocolType)type;
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name; __attribute__((deprecated("Use -startAppWith: dev_name: appconfig:")));
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name appconfig:(TIoTP2PAPPConfig *)appconfig;

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

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

0 comments on commit fa84925

Please sign in to comment.