CloudHubRTS Electron
- Overview
- RtsEngine
- RtsUpStream
- RtsUpStreamEventHandler
- RtsDownStream
- RtsDownStreamEventHandler
- RtsMixingUpstream
- RtsMixingUpstreamEventHandler
- RtsServerStreamMixing
- RtsServerStreamMixingEventHandler
- RtsDevicesManager
- Update log
onFirstlocalvideoframe
The callback of the first frame of the local video has been captured.
cRtsPusher.on("onFirstlocalvideoframe",data=>{});
Parameters | Description |
---|---|
sourceId | Push ID |
width | The width of the first video frame |
height | The height of the first frame of video |
onVolumeindication
The callback of the first frame of the local video has been displayed.
cRtsPusher.on("onVolumeindication",data=>{});
Parameters | Description |
---|---|
sourceId | Push ID |
totalVolume | Total volume value |
onRtsstats
Call statistics
cRtsPusher.on("onRtsstats",data=>{});
Parameters | Description |
---|---|
stats | The specific content of call statistics is 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:The current system’s CPU usage (%). |
onAudiodevicestatechanged
The callback of the first frame of the local video has been displayed.
cRtsPusher.on("onAudiodevicestatechanged",data=>{});
参数 | 说明 |
---|---|
sourceId | Push ID |
deviceId | equipment ID |
deviceType | Media device type: -1: Unknown device type 0: Audio playback device 1: Audio recording equipment 2: Video rendering equipment 3: Video capture equipment 4: App’s audio playback device |
state | equipment status : 1: The device is in use 2: Device is disabled 4: No such device 8: The device is unplugged |
onVideodevicestatechanged
Video device status changes
cRtsPusher.on("onVideodevicestatechanged",data=>{});
Parameters | Description |
---|---|
sourceId | Push ID |
state | equipment status : 1: The device is in use 2: Device is disabled 4: No such device 8: The device is unplugged |
onVideosizechanged
The callback of the first frame of the local video has been displayed.
cRtsPusher.on("onVideosizechanged",data=>{});
Parameters | Description |
---|---|
sourceId | Push ID |
width | Video width |
height | The height of the video |
onPushstateupdated
Push stream status change
cRtsPusher.on("onPushstateupdated",data=>{});
Parameters | Description |
---|---|
state | 1 => not connected CONNECTION_STATE_DISCONNECTED 2 => Connecting CONNECTION_STATE_CONNECTING 3 => Connection completed CONNECTION_STATE_CONNECTED 4 => Reconnecting CONNECTION_STATE_RECONNECTING 5 => connection failed CONNECTION_STATE_FAILED |
onFirstlocalaudioframe
The callback of the first frame of local audio has been captured.
cRtsPusher.on("onFirstlocalaudioframe",data=>{});
Parameters | Description |
---|---|
sourceId | Push ID |
onLocalVideoStateChanged
When the status of the local video changes
cRtsPusher.on("onLocalVideoStateChanged",data=>{});
Parameters | Description |
---|---|
sourceId | Push ID |
state | 0 => The default initial state of the local video 1 => The local video capture device started successfully 2 => The first frame of the local video is successfully encoded 3 => Local video failed to start |
error | 1 => The reason for the error is not clear 2 => No permission to start local video capture device 3 => The local video capture device is in use 4 => The local video capture failed, it is recommended to check whether the capture device is working properly 5 => Local video encoding failed |
onLocalAudioStateChanged
When the status of the local audio changes
cRtsPusher.on("onLocalAudioStateChanged",data=>{});
Parameters | Description |
---|---|
state | 0 => The default initial state of the local audio 1 => The local audio capture device started successfully 2 => The first frame of local audio is successfully encoded 3 => Local audio failed to start |
error | 1 => The reason for the error is not clear 2 => No permission to start local audio capture device 3 => The local audio capture device is in use 4 => Local audio collection failed, it is recommended to check whether the collection device is working properly 5 => Local audio encoding failed |
onError
An error occurred callback
cRtsPusher.on("onError",data=>{});
Parameters | Description |
---|---|
err | Error code, see ERROR_CODE_TYPE |
msg | wrong description |
detail
This callback method indicates that an error (network or media related) occurred during SDK runtime. Normally, the error reported by the SDK means that the SDK cannot be automatically restored, and the app needs to intervene or prompt the user.