CloudHub Docs
Download Documents

RTS


CloudHubRTS Electron

onVolumeindication

Speaker volume reminder callback.

cRtsPusher.on("onVolumeindication",data=>{});
parameterexplanation
sourceIdPull stream ID
totalVolumeTotal volume value

onRtsstats

Pull flow state change

cRtsPusher.on("onRtsstats",data=>{});
parameterexplanation
sourceIdPull stream ID
statsCall statistics The details are as follows:
duration:Talk time, in seconds, cumulative value
txBytes:Number of bytes sent (bytes), cumulative value
rxBytes:Received bytes (bytes), cumulative value
txKBitRate:Transmission bit rate (Kbps), instantaneous value
rxKBitRate:Receive bit rate (Kbps), instantaneous value
rxAudioBytes:The number of received audio bytes (bytes), cumulative value
txAudioBytes:Send audio bytes (bytes), cumulative value
rxVideoBytes: Received video bytes (bytes), cumulative value
txVideoBytes: The number of transmitted video bytes (bytes), cumulative value
rxAudioKBitRate: Audio receiving bit rate (Kbps), instantaneous value
txAudioKBitRate: Audio packet transmission bit rate (Kbps), instantaneous value
rxVideoKBitRate: Video receiving bit rate (Kbps), instantaneous value
txVideoKBitRate: Video transmission bit rate (Kbps), instantaneous value
lastMileDelay: Network latency from client to edge server (milliseconds)
txPacketLossRate: Before using anti-packet technology, the packet loss rate from the client to the CloudHub edge server (%)
rxPacketLossRate: Before using anti-packet technology, CloudHub edge server to client packet loss rate (%)
cpuTotalUsage: Current system CPU usage (%)

onPullstateupdated

Pull flow state change

cRtsPusher.on("onPullstateupdated",data=>{});
parameterexplanation
sourceIdPull stream ID
state1 => not connected CONNECTION_STATE_DISCONNECTED
2 => Connecting CONNECTION_STATE_CONNECTING
3 => Connection complete CONNECTION_STATE_CONNECTED
4 => Reconnecting CONNECTION_STATE_RECONNECTING
5 => Connection failed CONNECTION_STATE_FAILED

onVideosizechanged

Video size change

cRtsPusher.on("onVideosizechanged",data=>{});
parameterexplanation
sourceIdPull stream ID
widthVideo width
heightThe height of the video

onRemoteVideoStateChanged

Call back when the status of the remote video stream has changed.

cRtsPusher.on("onRemoteVideoStateChanged",data=>{});
parameterexplanation
sourceIdPull stream ID
state1 : Remote video start

onFirstremotevideoframe

Occurs when the first remote audio frame is decoded

cRtsPusher.on("onFirstremotevideoframe",data=>{});
parameterexplanation
sourceIdPull stream ID
widthThe width of the first video frame
heightThe height of the first frame of video

onFirstremoteaudioframe

Occurs when the first remote audio frame is received

cRtsPusher.on("onFirstremoteaudioframe",data=>{});
parameterexplanation
sourceIdPull stream ID
stateNew audio stream status 1 => Far end audio start