Home / Docs Center / Device API Reference / Settingscandidate

Settingscandidate

Device API Reference · Intercom Camera WebRTC API · Playback

Project: Device Interface Document (New Version) | page_id: 1007

Brief Description:

  • Set candidate. The event.candidate json obtained by PeerConnection.onicecandidate can be forwarded directly. For multiple records, this interface needs to be called multiple times

Request URL:
- /xsw/api/p2p/candidate

Request Method:
- POST

URL Parameters:

Parameter Name Required Type Description
sessionId Yes string The sessionId obtained in the first step

Body Parameters:

Parameter Name Required Type Description
candidate Yes string -
sdpMid Yes string -
sdpMLineIndex Yes number -
usernameFragment Yes string -
{
  "candidate": "candidate:1171277789 1 udp 2113937151 192.168.0.190 59013 typ host generation 0 ufrag gTU8 network-cost 999",
  "sdpMid": "0",
  "sdpMLineIndex": 0,
  "usernameFragment": "gTU8"
}

Return Example

  {
        "code": 0,
        "msg": "",
  }

Return Parameter Description

Parameter Name Type Description
code number 0 means normal, >0 means failure
msg string Error message

Notes

  • None
Didn't find what you need?Contact us,Talk to our engineers directly.

Request a Quote

Fill in the form and we will get back with a quote and proposal within 1 business day.

Click "Generate inquiry email" to open your mail client with the body pre-filled. If no mail client is configured, click "Copy" and paste it into webmail — recipient: sunshiyang@xstrive.com.