Type Definitions
ConnectionState
Connection State
- 'new' |
'connecting' | 'connected' | 'failed' | 'disconnected' | 'reconnecting' | 'not_support' | 'limit_exceeded'
CloudMode
Cloud Mode public - Public cloud public_intl - Public cloud (international) private - Private cloud
- 'public' |
'public_intl' | 'private'
SDKMode
Service Mode server - Dedicated acceleration mode server2 - Standard acceleration mode
- 'server' |
'server2'
MediaType
Media Type
- 'video' |
'audio'
RoomState
Room State
- 'joining' |
'joined' | 'unjoined'
SignalingState
Signaling State
- 'new' |
'scheduling' | 'scheduled' | 'connecting' | 'connected' | 'disconnected' | 'closed' | 'reconnecting'
MqttConnectionState
MQTT Connection State
- 'new' |
'connecting' | 'connected' | 'reconnecting' | 'error' | 'closed'
PermissionState
Gateway Device Permission
- 'master' |
'guest'
Gateway
Gateway Information
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
deviceId | string | Field device ID. In public cloud mode, format is | |
deviceName | string | ||
deviceType | string | ||
streamCount | number | ||
status | string | ||
version | string | Gateway SDK version | |
licenseExpire | number | <optional> | License expiration timestamp (seconds) |
OnEventAutoplayResponse
Autoplay Response Type
- object
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type | 'autoplay' | |||||||||||||||||||||||||||||||||||||||||
data | object | Properties
|
WebRTCStats
Media Stream Statistics
- object
| Name | Type | Attributes | Description |
|---|---|---|---|
srcUserId | string | Media stream source user ID | |
trackId | string | Media stream track ID | |
streamId | number | Media stream ID | |
mediaType | MediaType | Media type | |
bitrate | number | Current bitrate in Mbps | |
packetsReceived | number | Total received RTP packets (cumulative) | |
packetsLost | number | Total lost RTP packets (cumulative) | |
lost | number | Current packet loss rate in % | |
lostAvg | number | Average packet loss rate in % | |
rtt | number | RTT (Round Trip Time) in ms | |
rttAvg | number | Average RTT in ms | |
codec | string | Media codec MIME type | |
decoderImplementation | string | Decoder identifier | |
decoderType | 'hardware' | | Decoder type:
| |
nack | number | Total NACK packets sent (cumulative) | |
firCount | number | FIR count | |
pliCount | number | PLI count (video only) | |
framesReceived | number | Total frames received (cumulative, video only) | |
framesDecoded | number | Total frames decoded (cumulative, video only) | |
keyFramesDecoded | number | Total key frames decoded (cumulative, video only) | |
resolution | string | Resolution in format | |
fps | number | Frame rate (video only) | |
decodeTime | number | Current decode time in ms (video only) | |
decodeTimeAvg | number | Average decode time in ms (video only) | |
processingDelay | number | Current processing delay in ms (video only) | |
processingDelayAvg | number | Average processing delay in ms (video only) | |
audioLevel | number | Current audio level (0-1, audio only) | |
jitter | number | Jitter in seconds | |
jitterBuffer | number | Current jitter buffer delay in ms | |
jitterBufferAvg | number | Average jitter buffer delay in ms | |
jitterBufferTarget | number | Current target jitter buffer delay in ms | |
jitterBufferTargetAvg | number | Average target jitter buffer delay in ms | |
latency | number | Video latency in ms | |
latency1 | number | <optional> | |
latency2 | number | <optional> | |
lag100 | number | Video freeze rate at 100ms | |
lag150 | number | Video freeze rate at 150ms | |
nackDelta | number | Period delta: NACK count in current collection period | |
firCountDelta | number | Period delta: FIR count in current collection period | |
pliCountDelta | number | Period delta: PLI count in current collection period | |
framesReceivedDelta | number | Period delta: frames received in current collection period | |
framesDecodedDelta | number | Period delta: frames decoded in current collection period | |
packetsReceivedDelta | number | Period delta: packets received in current collection period | |
packetsLostDelta | number | Period delta: packets lost in current collection period | |
stableFps | number | Stable FPS: 10s sliding window average, excluding 0 values (video only) |
DiagnosisReport
Diagnosis Report
- object
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
diag_error | string | Diagnosis error message, returns 'ok' if no error, otherwise error message | |||||||||||||||||||||||||||||||||||||||||||
device_id | string | Field device ID | |||||||||||||||||||||||||||||||||||||||||||
field_pid | string | <optional> | Field device process ID | ||||||||||||||||||||||||||||||||||||||||||
license_check | string | <optional> | Field device license check, returns 'ok' if passed, otherwise error message | ||||||||||||||||||||||||||||||||||||||||||
field_mqtt_connect | string | <optional> | Field device MQTT connection status, returns 'ok' if connected, otherwise error message | ||||||||||||||||||||||||||||||||||||||||||
remote_mqtt_connect | string | Remote device MQTT connection status, returns 'ok' if connected, otherwise error message | |||||||||||||||||||||||||||||||||||||||||||
result | Array | Video stream diagnosis reports | |||||||||||||||||||||||||||||||||||||||||||
result[].stream_id | number | Video stream ID | |||||||||||||||||||||||||||||||||||||||||||
result[].field | object | <optional> | Field device video stream diagnosis report Properties
| ||||||||||||||||||||||||||||||||||||||||||
result[].remote | object | <optional> | Remote device video stream diagnosis report Properties
|
OnEventWebRTCStatsResponse
WebRTC Stats Callback
- object
| Name | Type | Description |
|---|---|---|
type | 'webrtcStats' | |
data | Array.<WebRTCStats> |
OnEventGatewayStatsResponse
Gateway Stats Callback
- object
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
type | 'gatewayStats' | ||||||||||
data | object | Properties
|
OnEventLocalTrackUnpublishedResponse
Local Audio Track Unpublish Callback
- object
| Name | Type | Description |
|---|---|---|
type | 'localTrackUnpublished' | |
data | Object |
OnEventResponse
OnEvent Response