TRTCSpeedTestResult

TRTCSpeedTestResult

Network speed test result

Constructor

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

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 required

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

errMsg String required

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

ip String required

Server IP address

quality TRTCQuality required

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

upLostRate Number required

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 required

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 required

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 required

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

availableDownBandwidth Number required

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

upJitter Number required

Uplink data packet jitter (ms)

downJitter Number required

Downlink data packet jitter (ms)