TRTCSpeedTestResult

TRTCSpeedTestResult

Network speed test result

Constructor

new TRTCSpeedTestResult(success, errMsg, ip, quality, upLostRate, downLostRate, rtt, availableUpBandwidth, availableDownBandwidth)

The startSpeedTest API can be used to test the network speed before a user enters a room (this API cannot be called during a call). The speed test result will be returned once every 2–3 seconds, and the test result of one IP address will be returned each time.

Parameters:
Name Type Description
success Boolean

Whether the network speed test is successful. ** Supported from TRTCSDK 9.3 **

errMsg String

Error message for network speed test. ** Supported from TRTCSDK 9.3 **

ip String

Server IP address

quality TRTCQuality

Network quality, which is tested and calculated based on the internal evaluation algorithm. The better the network, the higher the score.

upLostRate Number

Upstream packet loss rate between 0 and 1.0. For example, 0.3 indicates that 3 data packets may be lost in every 10 packets sent to the server.

downLostRate Number

Downstream packet loss rate between 0 and 1.0. For example, 0.2 indicates that 2 data packets may be lost in every 10 packets received from the server.

rtt Number

Delay in milliseconds, which is the round-trip time between the current device and TRTC server. The smaller the value, the better. The normal value range is 10–100 ms.

availableUpBandwidth Number

Upstream bandwidth (in Kbps, -1: invalid value). ** Supported from TRTCSDK 9.3 **

availableDownBandwidth Number

Downstream bandwidth (in Kbps, -1: invalid value). ** Supported from TRTCSDK 9.3 **