TRTCRemoteStatistics

TRTCRemoteStatistics

Remote audio/video metrics

Constructor

new TRTCRemoteStatistics(userId, audioPacketLoss, videoPacketLoss, width, height, frameRate, videoBitrate, audioSampleRate, audioBitrate, jitterBufferDelay, point2PointDelay, audioTotalBlockTime, audioBlockRate, videoTotalBlockTime, videoBlockRate, finalLoss, remoteNetworkUplinkLoss, remoteNetworkRTT, streamType)

Parameters:
Name Type Description
userId String required

user ID

audioPacketLoss Number required

total packet loss rate (%) of the audio stream audioPacketLoss represents the packet loss rate eventually calculated on the audience side after the audio/video stream goes through the complete transfer linkage of "anchor -> cloud -> audience". The smaller the audioPacketLoss, the better. The packet loss rate of 0 indicates that all data of the audio stream has entirely reached the audience. If downLoss is 0 but audioPacketLoss isn't, there is no packet loss on the linkage of "cloud -> audience" for the audiostream, but there are unrecoverable packet losses on the linkage of "anchor -> cloud".

videoPacketLoss Number required

total packet loss rate (%) of the video stream videoPacketLoss represents the packet loss rate eventually calculated on the audience side after the audio/video stream goes through the complete transfer linkage of "anchor -> cloud -> audience". The smaller the videoPacketLoss, the better. The packet loss rate of 0 indicates that all data of the video stream has entirely reached the audience. If downLoss is 0 but videoPacketLoss isn't, there is no packet loss on the linkage of "cloud -> audience" for the video stream, but there are unrecoverable packet losses on the linkage of "anchor -> cloud".

width Number required

remote video width in px

height Number required

remote video height in px

frameRate Number required

remote video frame rate (fps)

videoBitrate Number required

remote video bitrate (Kbps)

audioSampleRate Number required

remote audio sample rate (Hz)

audioBitrate Number required

remote audio bitrate (Kbps)

jitterBufferDelay Number required

playback delay (ms)

point2PointDelay Number required

end-to-end delay (ms) point2PointDelay represents the delay of "anchor -> cloud -> audience". To be more precise, it represents the delay of the entire linkage of "collection -> encoding -> network transfer -> receiving -> buffering -> decoding -> playback". point2PointDelay works only if both the local and remote SDKs are on version 8.5 or above. If the remote SDK is on a version below 8.5, this value will always be 0 and thus meaningless.

audioTotalBlockTime Number required

cumulative audio playback lag duration (ms)

audioBlockRate Number required

audio playback lag rate (%)

videoTotalBlockTime Number required

cumulative video playback lag duration (ms)

videoBlockRate Number required

video playback lag rate (%)

finalLoss Number required

total packet loss rate (%) of the audio/video stream Deprecated, please use audioPacketLoss and videoPacketLoss instead.

remoteNetworkUplinkLoss Number required

upstream packet loss rate (%) from the SDK to cloud The smaller the value, the better. If remoteNetworkUplinkLoss is 0%, the upstream network quality is very good, and the data packets uploaded to the cloud are basically not lost. If remoteNetworkUplinkLoss is 30%, 30% of the audio/video data packets sent to the cloud by the SDK are lost on the transfer linkage.

remoteNetworkRTT Number required

round-trip delay (ms) from the SDK to cloud This value represents the total time it takes to send a network packet from the SDK to the cloud and then send a network packet back from the cloud to the SDK, i.e., the total time it takes for a network packet to go through the linkage of "SDK -> cloud -> SDK". The smaller the value, the better. If remoteNetworkRTT is below 50 ms, it means a short audio/video call delay; if remoteNetworkRTT is above 200 ms, it means a long audio/video call delay. It should be explained that remoteNetworkRTT represents the total time spent on the linkage of "SDK -> cloud -> SDK"; therefore, there is no need to distinguish between remoteNetworkUpRTT and remoteNetworkDownRTT.

streamType TRTCVideoStreamType required

video stream type (HD big image | smooth small image | substream image)