Contact Us
Log In

Get WebRTC Configurations of the Device

Last Updated on : 2022-09-07 09:19:09download

Get the configurations that are used to create the WebRTC connection.

API address

GET: /v1.0/devices/{device_id}/webrtc-configs

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Return parameter

Parameter name Type Description
result WebRTCConfigVO

Description of result

Parameter name Type Description
audio_attributes JSONObject The audio attribute.
auth String The license.
id String The device ID.
moto_id String The ID of the signaling service.
p2p_config JSONObject The P2P configuration.
skill String The skill.
supports_webrtc Boolean Indicates whether WebRTC is supported.
vedio_clarity Integer The video clarity.

Description of p2p_config

Parameter name Type Description
ices List The information of interactive connectivity establishment (ICE).

Description of audio_attributes

Parameter name Type Description
call_mode List The call mode.
hardware_capability List The hardware capabilities.

Description of ices

Parameter name Type Description
urls String The address of the server.
username String The username.
credential String The password.
ttl Integer The validity period.

Request example

GET: /v1.0/devices/6c08578d894xxxx11afye1/webrtc-configs

Return example

{ "result": { "p2p_config": { "ices": [ { "urls": "stun:****" }, { "urls": "stun:tx1stun.wgine.com:****" }, { "urls": "nat:tx1nat.wgine.com:****" }, { "urls": "nat:tx1nat.tuyacn.com:****" }, { "ttl": 3600, "urls": "turn:", "credential": "+eszzFb3f+KM7N5f+/3jdCHl****", "username": "1615438498:6c08578d894934411afye1:kydhkuwwehqrvd8p****" }, { "ttl": 3600, "urls": "turn:tx1turn.wgine.com:****", "credential": "+eszzFb3f+KM7N5f+/3jdCHl****", "username": "1615438498:6c08578d894934411afye1:kydhkuwwehqrvd8p****" } ] }, "auth": "U+qtvRP+Amz3YQLpcgagMxqID8aUGBUZopKJr0kW****", "supports_webrtc": true, "skill": "{\"webrtc\":3,\"audios\":[{\"channels\":1,\"dataBit\":16,\"codecType\":105,\"sampleRate\":8000}],\"videos\":[{\"streamType\":2,\"profileId\":\"\",\"width\":2304,\"codecType\":4,\"sampleRate\":0,\"height\":1296},{\"streamType\":4,\"width\":640,\"codecType\":2,\"sampleRate\":0,\"height\":360}]}", "moto_id": "moto_cnpre002", "id": "6c08578d894934411a****", "vedio_clarity": 4, "audio_attributes": { "call_mode": [ 1, 2 ], "hardware_capability": [ 1, 2 ] } }, "t": 1615434898584, "success": true }

Error code

For more information, see error code.