Skip to content

Commit c80c1f4

Browse files
author
archurtan
committed
更新VideoSDK说明文档.
Change-Id: I4dc00da41f5f2d77839e234ad63f7727afd2420d
1 parent 2a79917 commit c80c1f4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

sdk/video-link-android/doc/VideoSDK接口说明.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ WlanDetectBody 定义如下
254254
255255
| 参数 | 类型 | 描述 |
256256
|:-|:-|:-|
257-
| id | String | 回传`startServiceWithXp2pInfo`接口中的`id` |
257+
| id | String | 回传`startService`接口中的`id` |
258258
| data | ByteArray | 接收到的音视频数据 |
259259
| len | Int | 接收到的音视频数据的长度 |
260260

@@ -266,7 +266,7 @@ WlanDetectBody 定义如下
266266
267267
| 参数 | 类型 | 描述 |
268268
|:-|:-|:-|
269-
| id | String | 回传`startServiceWithXp2pInfo`接口中的`id` |
269+
| id | String | 回传`startService`接口中的`id` |
270270
| msg | String | 附加描述信息,当前版本可不用处理 |
271271
| code | Int | 附加描述信息,当前版本可不用处理 |
272272

@@ -278,7 +278,7 @@ WlanDetectBody 定义如下
278278
279279
| 参数 | 类型 | 描述 |
280280
|:-|:-|:-|
281-
| id | String | 回传`startServiceWithXp2pInfo`接口中的`id` |
281+
| id | String | 回传`startService`接口中的`id` |
282282
| msg | String | 设备端回应的消息,json数组格式 |
283283
| len | Int | 设备端回应的消息长度 |
284284

@@ -289,7 +289,7 @@ WlanDetectBody 定义如下
289289
290290
| 参数 | 类型 | 描述 |
291291
|:-|:-|:-|
292-
| id | String | 回传`startServiceWithXp2pInfo`接口中的`id` |
292+
| id | String | 回传`startService`接口中的`id` |
293293
| msg | String | 附加说明,json格式 |
294294

295295
5. 设备向app发送自定义消息,该回调的返回值表示app向设备端回复的消息
@@ -327,20 +327,21 @@ DeviceServerInfo 定义如下
327327
### 附带说明
328328

329329
* 函数接口调用顺序:
330-
* setQcloudApiCred
331330
* setCallback
332-
* startServiceWithXp2pInfo
331+
* startService
332+
* setParamsForXp2pInfo
333333
* runSendService:如果没有发送需求可不调用该接口
334334
* dataSend:如果没有发送需求可不调用该接口
335335
* stopSendService:该接口暂时不用调用
336336
* stopService
337337

338338

339339
### APP接入SDK说明
340-
第三方App在接入Video SDK时,建议将`secretId``secretKey`保存到自建后台,不推荐将这两个信息保存至App端; 而SDK需要的xp2p info需要App侧从自己的业务后台获取;获取到xp2p info后,可以通过上述的`startServiceWithXp2pInfo`接口将该info传给SDK,示例代码如下:
340+
第三方App在接入Video SDK时,建议将`secretId``secretKey`保存到自建后台,不推荐将这两个信息保存至App端; 而SDK需要的xp2p info需要App侧从自己的业务后台获取;获取到xp2p info后,可以通过上述的`setParamsForXp2pInfo`接口将该info传给SDK,示例代码如下:
341341
```
342342
...
343343
String xp2p_info = getXP2PInfo(...) // 从自建后台获取xp2p info
344344
XP2P.setCallback(this)
345-
XP2P.startServiceWithXp2pInfo(id, product_id, device_name, "", xp2p_info)
345+
XP2P.startService(id, product_id, device_name)
346+
XP2P.setParamsForXp2pInfo(deviceId, "", "", xp2pInfo)
346347
```

0 commit comments

Comments
 (0)