webrtcChannel PushSwitch
Project: Device API Documentation (New) | page_id: 471
Brief Description:
- Modify the channel WebRTC streaming switch and push platform server
Request URL:
- /xsw/modValues
Request Method:
- POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| key1 | Yes | string | encode.0.venc_param.[channelIndex].webrtcEnable |
| value1 | Yes | number | 0 disabled, 1 enabled |
| type1 | No | string | number, fixed value |
| key2 | Yes | string | encode.0.venc_param.[channelIndex].webrtcPushType |
| value2 | Yes | number | 1:Tencent Cloud TRTC,4:Tencent Cloud LEB,3:self-built platform |
| type2 | No | string | number, fixed value |
Parameter Description
Replace [channelIndex] with the channel index
For example, channel 1 corresponds to key1: encode.0.venc_param.0.webrtcEnable
For example, channel 2 corresponds to key1: encode.0.venc_param.1.webrtcEnable
For example, channel 3 corresponds to key1: encode.0.venc_param.2.webrtcEnable
And so on
The same applies to key2
Request Example
- Enable WebRTC streaming on channel 1 to Tencent Cloud LEB
http://192.168.0.15/xsw/modValues?key1=encode.0.venc_param.0.webrtcEnable&key2=encode.0.venc_param.0.webrtcPushType&t=1678872091&token=b7fb8322e62cd00fd801a158b0d0c10f&type1=number&type2=number&value1=1&value2=4
- Disable WebRTC streaming on channel 1
http://192.168.0.15/xsw/modValues?key1=encode.0.venc_param.0.webrtcEnable&t=1678872295&token=6030d9d712ea074d5fe740665c11c823&type1=number&value1=0
Response Example
{"code":0,"msg":""}
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | int | 0 means success, others mean failure |
| msg | string | Error information |
Notes
- The modification will restart streaming, please wait