
// Example code for starting a network speed test. sdkAppId and UserSig are required (for the acquisition method, refer to Basic Features).// Here is an example of starting a speed test after logging inpublic void onLogin(String userId, String userSig){TRTCCloudDef.TRTCSpeedTestParams params = new TRTCCloudDef.TRTCSpeedTestParams();params.sdkAppId = GenerateTestUserSig.SDKAPPID;params.userId = mEtUserId.getText().toString();params.userSig = GenerateTestUserSig.genTestUserSig(params.userId);params.expectedUpBandwidth = Integer.parseInt(expectUpBandwidthStr);params.expectedDownBandwidth = Integer.parseInt(expectDownBandwidthStr);// sdkAppID is the actual application AppID obtained in the consoletrtcCloud.startSpeedTest(params);}// Listen for the speed test results, inherit TRTCCloudListener, and implement the following methodvoid onSpeedTestResult(TRTCCloudDef.TRTCSpeedTestResult result){// Call back the speed test results once the speed test is completed}Android
// Example code for starting a network speed test. sdkAppId and UserSig are required (for the acquisition method, refer to Basic Features).// Here is an example of starting a speed test after logging in- (void)onLogin:(NSString *)userId userSig:(NSString *)userSid{TRTCSpeedTestParams *params;// sdkAppID is the actual application AppID obtained in the consoleparams.sdkAppID = sdkAppId;params.userID = userId;params.userSig = userSig;// Expected upstream bandwidth (Unit: kbps. Value range: 10–5000. A value of 0 indicates no test)params.expectedUpBandwidth = 5000;// Expected downstream bandwidth (Unit: kbps. Value range: 10–5000. A value of 0 indicates no test)params.expectedDownBandwidth = 5000;[trtcCloud startSpeedTest:params];}- (void)onSpeedTestResult:(TRTCSpeedTestResult *)result {// Return the speed test results once the speed test is completed}
// Example code for starting a network speed test. sdkAppId and UserSig are required (for the acquisition method, refer to Basic Features).// Here is an example of starting a speed test after logging invoid onLogin(const char* userId, const char* userSig){TRTCSpeedTestParams params;// sdkAppID is the actual application AppID obtained in the consoleparams.sdkAppID = sdkAppId;params.userId = userid;param.userSig = userSig;// Expected upstream bandwidth (Unit: kbps. Value range: 10–5000. A value of 0 indicates no test)param.expectedUpBandwidth = 5000;// Expected downstream bandwidth (Unit: kbps. Value range: 10–5000. A value of 0 indicates no test)param.expectedDownBandwidth = 5000;trtcCloud->startSpeedTest(params);}// Listen for the speed test resultsvoid TRTCCloudCallbackImpl::onSpeedTestResult(const TRTCSpeedTestResult& result){// Call back the speed test results once the speed test is completed}
Field | Meaning | Description |
success | Whether the test is successful | Whether the current test is successful. |
errMsg | Error message | Detailed error information of the bandwidth test. |
ip | Server IP address | IP address of the testing server. |
Network quality score | Network quality as calculated by the assessment algorithm. The lower the packet loss and the smaller the rtt, the higher the score. | |
upLostRate | Upstream packet loss rate | Range: 0–1.0. For example, a value of 0.3 means that 3 out of every 10 packets sent to the server may be lost midway. |
downLostRate | Downstream packet loss rate | Range: 0–1.0. For example, a value of 0.2 means that 2 out of every 10 packets received from the server may be lost midway. |
rtt | Network latency | Time taken for a round trip between the SDK and the server. The smaller the value, the better. A normal value is between 10 ms and 100 ms. |
availableUpBandwidth | Upstream bandwidth | Predicted upstream bandwidth. Unit: kbps. A value of -1 indicates an invalid result. |
availableDownBandwidth | Downstream bandwidth | Predicted downstream bandwidth. Unit: kbps. A value of -1 indicates an invalid result. |
Metric | Meaning |
WiFi Quality | Wi-Fi signal quality |
DNS RTT | Duration of parsing the Tencent Cloud speed test domain name |
MTR | A network test tool that can detect the packet loss rate and latency between the client and the RTC Engine node and display detailed information of each hop in the route |
UDP Loss | UDP packet loss rate between the client and the RTC Engine node |
UDP RTT | UDP latency between the client and the RTC Engine node |
Local RTT | Latency between the client and the local gateway |
Upload | Estimated upstream bandwidth |
Download | Estimated downstream bandwidth |
Quality | Name | Description |
0 | Unknown | Not detected. |
1 | Excellent | The current network is excellent. |
2 | Good | The current network is good. |
3 | Poor | The current network is moderate. |
4 | Bad | The current network is poor, and obvious lags and call delays may occur. |
5 | VeryBad | The current network is very poor. RTC Engine can merely sustain the connection but cannot guarantee communication quality. |
6 | Down | The current network fails to satisfy the minimum requirements of RTC Engine, and normal audio and video calls cannot be performed. |
// Listen for the onNetworkQuality callback to stay aware of changes in the current network status@Overridepublic void onNetworkQuality(TRTCCloudDef.TRTCQuality localQuality,ArrayList<trtcclouddef.trtcquality> remoteQuality){// Get your local network qualityswitch(localQuality) {case TRTCQuality_Unknown:Log.d(TAG, "SDK has not yet sensed the current network quality.");break;case TRTCQuality_Excellent:Log.d(TAG, "The current network is very good.");break;case TRTCQuality_Good:Log.d(TAG, "The current network is good.");break;case TRTCQuality_Poor:Log.d(TAG, "The current network quality barely meets the demand.");break;case TRTCQuality_Bad:Log.d(TAG, "The current network is poor, and there may be significant freezes and call delays.");break;case TRTCQuality_VeryBad:Log.d(TAG, "The current network is very poor, the communication quality cannot be guaranteed");break;case TRTCQuality_Down:Log.d(TAG, "The current network does not meet the minimum requirements.");break;default:break;}// Get the network quality of remote usersfor (TRTCCloudDef.TRTCQuality info : arrayList) {Log.d(TAG, "remote user : = " + info.userId + ", quality = " + info.quality);}}
// Listen for the onNetworkQuality callback to stay aware of changes in the current network status- (void)onNetworkQuality:(TRTCQualityInfo *)localQuality remoteQuality:(NSArray<trtcqualityinfo *=""> *)remoteQuality {// Get your local network qualityswitch(localQuality.quality) {case TRTCQuality_Unknown:NSLog(@"SDK has not yet sensed the current network quality.");break;case TRTCQuality_Excellent:NSLog(@"The current network is very good.");break;case TRTCQuality_Good:NSLog(@"The current network is good.");break;case TRTCQuality_Poor:NSLog(@"The current network quality barely meets the demand.");break;case TRTCQuality_Bad:NSLog(@"The current network is poor, and there may be significant freezes and call delays.");break;case TRTCQuality_VeryBad:NSLog(@"The current network is very poor, the communication quality cannot be guaranteed");break;case TRTCQuality_Down:NSLog(@"The current network does not meet the minimum requirements.");break;default:break;}// Get the network quality of remote usersfor (TRTCQualityInfo *info in arrayList) {NSLog(@"remote user : = %@, quality = %@", info.userId, @(info.quality));}}iOSMac
// Listen for the onNetworkQuality callback to stay aware of changes in the current network statusvoid onNetworkQuality(liteav::TRTCQualityInfo local_quality,liteav::TRTCQualityInfo* remote_quality, uint32_t remote_quality_count) {// Get your local network qualityswitch (local_quality.quality) {case TRTCQuality_Unknown:printf("SDK has not yet sensed the current network quality.");break;case TRTCQuality_Excellent:printf("The current network is very good.");break;case TRTCQuality_Good:printf("The current network is good.");break;case TRTCQuality_Poor:printf("The current network quality barely meets the demand.");break;case TRTCQuality_Bad:printf("The current network is poor, and there may be significant freezes and call delays.");break;case TRTCQuality_Vbad:printf("The current network is very poor, the communication quality cannot be guaranteed");break;case TRTCQuality_Down:printf("The current network does not meet the minimum requirements.");break;default:break;}// Get the network quality of remote usersfor (int i = 0; i < remote_quality_count; ++i) {printf("remote user : = %s, quality = %d", remote_quality[i].userId, remote_quality[i].quality);}}
Enumeration Type | Description |
appCpu | CPU utilization of the current application. Unit: %. Android 8.0 or later is not supported. |
downLoss | Downstream packet loss rate from the cloud to the SDK. Unit: %. The smaller the value, the better. If downLoss is 0%, the downstream network quality is very good, and the data packets received from the cloud experience little to no loss. If downLoss is 30%, 30% of the audio and video data packets transmitted from the cloud to the SDK will be lost in the transmission link. |
gatewayRtt | Round-trip latency from the SDK to the local router. Unit: ms. This value represents the total duration for a network packet to travel from the SDK to the local router gateway and back again, that is, the complete cycle of "SDK > gateway > SDK." The smaller the value, the better. A gatewayRtt value below 50 ms indicates low latency for audio and video calls, while a value above 200 ms indicates high latency for audio and video calls. When the network type is a cellular network, the value is invalid. |
localArray | Local audio and video statistics. Since three audio and video streams may be available locally (that is, the primary HD stream, secondary low-resolution stream, and substream), the local audio and video statistics are provided as an array. |
receiveBytes | Total number of received bytes (including signaling data and audio and video data). Unit: byte. |
remoteArray | Remote audio and video statistics. Since multiple remote users may be present simultaneously, and each of them may carry multiple audio and video streams (that is, a primary HD stream, a secondary low-resolution stream, and a substream), the remote audio and video statistics are provided as an array. |
rtt | Round-trip latency from the SDK to the cloud. Unit: ms. This value represents the total duration for a network packet to travel from the SDK to the cloud and back again, that is, the complete cycle of "SDK > cloud > SDK." The smaller the value, the better. A rtt value below 50 ms indicates low latency for audio and video calls, while a value above 200 ms indicates high latency for audio and video calls. Note: rtt represents the total duration on the link of "SDK > cloud > SDK." Therefore, upRtt and downRtt do not need to be distinguished. |
sendBytes | Total number of sent bytes (including signaling data and audio and video data). Unit: byte. |
systemCpu | CPU utilization of the current system. Unit: %. Android 8.0 or later is not supported. |
upLoss | Upstream packet loss rate from the SDK to the cloud. Unit: %. The smaller the value, the better. If upLoss is 0%, the upstream network quality is very good, and the data packets uploaded to the cloud experience little to no loss. If upLoss is 30%, 30% of the audio and video data packets sent from the SDK to the cloud will be lost in the transmission link. |
@Overridepublic void onStatistics(TRTCStatistics statistics) {super.onStatistics(statistics);// appCpu is the application CPU utilizationLog.d(TAG, "appCpu:" + statistics.appCpu);// systemCpu is the system CPU utilizationLog.d(TAG, "systemCpu:" + statistics.systemCpu);// rtt is the round-trip latency from the SDK to the cloudLog.d(TAG, "rtt:" + statistics.rtt);// upLoss is the upstream packet loss rateLog.d(TAG, "upLoss:" + statistics.upLoss);// downLoss is the downstream packet loss rateLog.d(TAG, "downLoss:" + statistics.downLoss);// gatewayRtt is the round-trip latency from the gateway to the cloudLog.d(TAG, "gatewayRtt:" + statistics.gatewayRtt);// sendBytes is the number of sent bytesLog.d(TAG, "sendBytes:" + statistics.sendBytes);// receiveBytes is the number of received bytesLog.d(TAG, "receiveBytes:" + statistics.receiveBytes);if(statistics.localArray != null) {for (int i = 0; i < statistics.localArray.size(); i++) {// Local video widthLog.d(TAG, "localStatistics width:" + statistics.localArray.get(i).width);// Local video heightLog.d(TAG, "localStatistics height:" + statistics.localArray.get(i).height);// Local video frame rateLog.d(TAG, "localStatistics frameRate:" + statistics.localArray.get(i).frameRate);// Local video bitrateLog.d(TAG, "localStatistics videoBitrate:" + statistics.localArray.get(i).videoBitrate);// Local audio bitrateLog.d(TAG, "localStatistics audioBitrate:" + statistics.localArray.get(i).audioBitrate);// Capture status of the local audio device (used to monitor the health of audio peripherals). 0: capture device in normal status; 1: long-time silence detected; 2: audio clipping detected; 3: abnormal sound intermittency detected.Log.d(TAG, "localStatistics audioCaptureState:" + statistics.localArray.get(i).audioCaptureState);// Local audio sample rateLog.d(TAG, "localStatistics audioSampleRate:" + statistics.localArray.get(i).audioSampleRate);// Local stream typeLog.d(TAG, "localStatistics streamType:" + statistics.localArray.get(i).streamType);}}if(statistics.remoteArray != null) {for (int i = 0; i < statistics.remoteArray.size(); i++) {// userid of the remote userLog.d(TAG, "remoteStatistics userId:" + statistics.remoteArray.get(i).userId);// Stream type of the remote userLog.d(TAG, "remoteStatistics streamType:" + statistics.remoteArray.get(i).streamType);// Remote video widthLog.d(TAG, "remoteStatistics width:" + statistics.remoteArray.get(i).width);// Remote video heightLog.d(TAG, "remoteStatistics height:" + statistics.remoteArray.get(i).height);// Remote video frame rateLog.d(TAG, "remoteStatistics frameRate:" + statistics.remoteArray.get(i).frameRate);// Remote video bitrateLog.d(TAG, "remoteStatistics videoBitrate:" + statistics.remoteArray.get(i).videoBitrate);// Remote video lag rate. Unit: %. Video playback lag rate (videoBlockRate) = Cumulative video playback lag duration (videoTotalBlockTime) / Total video playback duration.Log.d(TAG, "remoteStatistics videoBlockRate:" + statistics.remoteArray.get(i).videoBlockRate);// Cumulative lag duration of the video playback. Unit: ms.Log.d(TAG, "remoteStatistics videoTotalBlockTime:" + statistics.remoteArray.get(i).videoTotalBlockTime);// Total packet loss rate of the video stream// videoPacketLoss represents the packet loss rate calculated at the audience end after the video stream goes through a complete transmission link of "anchor > cloud > audience."// The smaller the videoPacketLoss value, the better. A packet loss rate of 0 means that all data of the video stream has fully arrived at the audience end.// If downLoss == 0 but videoPacketLoss != 0, it means that the video stream experienced no packet loss on the cloud-to-audience link, but irreversible packet loss was detected on the anchor-to-cloud link.Log.d(TAG, "remoteStatistics videoPacketLoss:" + statistics.remoteArray.get(i).videoPacketLoss);// Remote audio bitrateLog.d(TAG, "remoteStatistics audioBitrate:" + statistics.remoteArray.get(i).audioBitrate);// Lag rate of the remote audio playbackLog.d(TAG, "remoteStatistics audioBlockRate:" + statistics.remoteArray.get(i).audioBlockRate);// Remote audio sample rateLog.d(TAG, "remoteStatistics audioSampleRate:" + statistics.remoteArray.get(i).audioSampleRate);// Packet loss rate of the remote audioLog.d(TAG, "remoteStatistics audioPacketLoss:" + statistics.remoteArray.get(i).audioPacketLoss);// Cumulative lag duration of the audio playbackLog.d(TAG, "remoteStatistics audioTotalBlockTime:" + statistics.remoteArray.get(i).audioTotalBlockTime);// Playback delay. The playback buffer, maintained by RTC Engine on the player side, organizes received network packets to prevent sound and image lags caused by network jitter and out-of-order network packets. The buffer size adjusts adaptively based on the current network quality. The buffer size, expressed as a time duration in milliseconds, is measured as the jitterBufferDelay.Log.d(TAG, "remoteStatistics jitterBufferDelay:" + statistics.remoteArray.get(i).jitterBufferDelay);// End-to-end delay. Unit: ms.// point2PointDelay represents the delay in the link of "anchor => cloud => audience." More precisely, it represents the delay in the entire link of "capture => encoding => network transmission => reception => buffering => decoding => playback."// point2PointDelay takes effect only when both the local and remote SDKs are version 8.5 or later. If the remote user is using a version earlier than 8.5, this value will remain 0, indicating no valid measurement.Log.d(TAG, "remoteStatistics point2PointDelay:" + statistics.remoteArray.get(i).point2PointDelay);}}}
- (void)onStatistics:(TRTCStatistics *)statistics {// appCpu is the application CPU utilizationNSLog(@"appCpu: %u", statistics.appCpu);// systemCpu is the system CPU utilizationNSLog(@"systemCpu: %u", statistics.systemCpu);// rtt is the round-trip latency from the SDK to the cloudNSLog(@"rtt: %d", statistics.rtt);// upLoss is the upstream packet loss rateNSLog(@"upLoss: %u", statistics.upLoss);// downLoss is the downstream packet loss rateNSLog(@"downLoss: %u", statistics.downLoss);// gatewayRtt is the round-trip latency from the gateway to the cloudNSLog(@"gatewayRtt: %d", statistics.gatewayRtt);// sendBytes is the number of sent bytesNSLog(@"sendBytes: %llu", (unsigned long long)statistics.sentBytes);// receiveBytes is the number of received bytesNSLog(@"receiveBytes: %llu", (unsigned long long)statistics.receivedBytes);if (statistics.localStatistics != nil) {for (int i = 0; i < statistics.localStatistics.count; i++) {// Local video widthNSLog(@"localStatistics width: %d", statistics.localStatistics[i].width);// Local video heightNSLog(@"localStatistics height: %d", statistics.localStatistics[i].height);// Local video frame rateNSLog(@"localStatistics frameRate: %u", statistics.localStatistics[i].frameRate);// Local video bitrateNSLog(@"localStatistics videoBitrate: %d", statistics.localStatistics[i].videoBitrate);// Local audio bitrateNSLog(@"localStatistics audioBitrate: %d", statistics.localStatistics[i].audioBitrate);// Capture status of the local audio deviceNSLog(@"localStatistics audioCaptureState: %d", statistics.localStatistics[i].audioCaptureState);// Local audio sample rateNSLog(@"localStatistics audioSampleRate: %d", statistics.localStatistics[i].audioSampleRate);// Local stream typeNSLog(@"localStatistics streamType: %ld", (long)statistics.localStatistics[i].streamType);}}if (statistics.remoteStatistics != nil) {for (int i = 0; i < statistics.remoteStatistics.count; i++) {// userid of the remote userNSLog(@"remoteStatistics userId: %@", statistics.remoteStatistics[i].userId);// Stream type of the remote userNSLog(@"remoteStatistics streamType: %ld", (long)statistics.remoteStatistics[i].streamType);// Remote video widthNSLog(@"remoteStatistics width: %d", statistics.remoteStatistics[i].width);// Remote video heightNSLog(@"remoteStatistics height: %d", statistics.remoteStatistics[i].height);// Remote video frame rateNSLog(@"remoteStatistics frameRate: %u", statistics.remoteStatistics[i].frameRate);// Remote video bitrateNSLog(@"remoteStatistics videoBitrate: %d", statistics.remoteStatistics[i].videoBitrate);// Remote video lag rateNSLog(@"remoteStatistics videoBlockRate: %u", statistics.remoteStatistics[i].videoBlockRate);// Cumulative lag duration of the video playbackNSLog(@"remoteStatistics videoTotalBlockTime: %d", statistics.remoteStatistics[i].videoTotalBlockTime);// Total packet loss rate of the video streamNSLog(@"remoteStatistics videoPacketLoss: %u", statistics.remoteStatistics[i].videoPacketLoss);// Remote audio bitrateNSLog(@"remoteStatistics audioBitrate: %d", statistics.remoteStatistics[i].audioBitrate);// Lag rate of the remote audio playbackNSLog(@"remoteStatistics audioBlockRate: %u", statistics.remoteStatistics[i].audioBlockRate);// Remote audio sample rateNSLog(@"remoteStatistics audioSampleRate: %d", statistics.remoteStatistics[i].audioSampleRate);// Packet loss rate of the remote audioNSLog(@"remoteStatistics audioPacketLoss: %u", statistics.remoteStatistics[i].audioPacketLoss);// Cumulative lag duration of the audio playbackNSLog(@"remoteStatistics audioTotalBlockTime: %d", statistics.remoteStatistics[i].audioTotalBlockTime);// Playback delayNSLog(@"remoteStatistics jitterBufferDelay: %d", statistics.remoteStatistics[i].jitterBufferDelay);// End-to-end delayNSLog(@"remoteStatistics point2PointDelay: %d", statistics.remoteStatistics[i].point2PointDelay);}}}
void onStatistics(const TRTCStatistics& statistics) {// appCpu is the application CPU utilizationprintf("appCpu: %f\\n", statistics.appCpu);// systemCpu is the system CPU utilizationprintf("systemCpu: %f\\n", statistics.systemCpu);// rtt is the round-trip latency from the SDK to the cloudprintf("rtt: %d\\n", statistics.rtt);// upLoss is the upstream packet loss rateprintf("upLoss: %f\\n", statistics.upLoss);// downLoss is the downstream packet loss rateprintf("downLoss: %f\\n", statistics.downLoss);// gatewayRtt is the round-trip latency from the gateway to the cloudprintf("gatewayRtt: %d\\n", statistics.gatewayRtt);// sentBytes is the number of sent bytesprintf("sentBytes: %lld\\n", statistics.sentBytes);// receiveBytes is the number of received bytesprintf("receivedBytes: %lld\\n", statistics.receivedBytes);//for (const auto& localStat : statistics.localStatisticsArray) {if (statistics.localStatisticsArray != nullptr && statistics.localStatisticsArraySize != 0){for (int i = 0; i < statistics.localStatisticsArraySize; i++){// Local video widthprintf("localStatistics width: %d\\n", statistics.localStatisticsArray[i].width);// Local video heightprintf("localStatistics height: %d\\n", statistics.localStatisticsArray[i].height);// Local video frame rateprintf("localStatistics frameRate: %f\\n", statistics.localStatisticsArray[i].frameRate);// Local video bitrateprintf("localStatistics videoBitrate: %d\\n", statistics.localStatisticsArray[i].videoBitrate);// Local audio bitrateprintf("localStatistics audioBitrate: %d\\n", statistics.localStatisticsArray[i].audioBitrate);// Capture status of the local audio deviceprintf("localStatistics audioCaptureState: %d\\n", statistics.localStatisticsArray[i].audioCaptureState);// Local audio sample rateprintf("localStatistics audioSampleRate: %d\\n", statistics.localStatisticsArray[i].audioSampleRate);// Local stream typeprintf("localStatistics streamType: %d\\n", statistics.localStatisticsArray[i].streamType);}}//for (const auto& remoteStat : statistics.remoteStatisticsArray) {if (statistics.remoteStatisticsArray != nullptr && statistics.remoteStatisticsArraySize != 0){for (int i = 0; i < statistics.remoteStatisticsArraySize; i++){// userid of the remote userprintf("remoteStatistics userId: %s\\n", statistics.remoteStatisticsArray[i].userId);// Stream type of the remote userprintf("remoteStatistics streamType: %d\\n", statistics.remoteStatisticsArray[i].streamType);// Remote video widthprintf("remoteStatistics width: %d\\n", statistics.remoteStatisticsArray[i].width);// Remote video heightprintf("remoteStatistics height: %d\\n", statistics.remoteStatisticsArray[i].height);// Remote video frame rateprintf("remoteStatistics frameRate: %f\\n", statistics.remoteStatisticsArray[i].frameRate);// Remote video bitrateprintf("remoteStatistics videoBitrate: %d\\n", statistics.remoteStatisticsArray[i].videoBitrate);// Remote video lag rateprintf("remoteStatistics videoBlockRate: %f\\n", statistics.remoteStatisticsArray[i].videoBlockRate);// Cumulative lag duration of the video playbackprintf("remoteStatistics videoTotalBlockTime: %d\\n", statistics.remoteStatisticsArray[i].videoTotalBlockTime);// Total packet loss rate of the video streamprintf("remoteStatistics videoPacketLoss: %f\\n", statistics.remoteStatisticsArray[i].videoPacketLoss);// Remote audio bitrateprintf("remoteStatistics audioBitrate: %d\\n", statistics.remoteStatisticsArray[i].audioBitrate);// Lag rate of the remote audio playbackprintf("remoteStatistics audioBlockRate: %f\\n", statistics.remoteStatisticsArray[i].audioBlockRate);// Remote audio sample rateprintf("remoteStatistics audioSampleRate: %d\\n", statistics.remoteStatisticsArray[i].audioSampleRate);// Packet loss rate of the remote audioprintf("remoteStatistics audioPacketLoss: %f\\n", statistics.remoteStatisticsArray[i].audioPacketLoss);// Cumulative lag duration of the audio playbackprintf("remoteStatistics audioTotalBlockTime: %d\\n", statistics.remoteStatisticsArray[i].audioTotalBlockTime);// Playback delayprintf("remoteStatistics jitterBufferDelay: %d\\n", statistics.remoteStatisticsArray[i].jitterBufferDelay);// End-to-end delayprintf("remoteStatistics point2PointDelay: %d\\n", statistics.remoteStatisticsArray[i].point2PointDelay);}}}

Callback API | Description |
onConnectionLost | The SDK has been disconnected from the cloud. |
onTryToReconnect | The SDK is trying to connect to the cloud again. |
onConnectionRecovery | The connection between the SDK and the cloud has been recovered. |

enterRoom API to trigger a room entry request.onEnterRoom callback. Userid2 becomes aware of the presence of Userid1 with a delay of approximately 300 ms before receiving the onRemoteUserEnterRoom callback.onConnectionLost disconnection callback.onTryToReconnect retry callback.onTryToReconnect retry callback every 24 seconds.onRemoteUserLeaveRoom callback once the SDK detects that the remote user Userid1 has disconnected 90 seconds after Userid2 receives the Userid1 disconnection notification.onConnectionRecovery recovery callback.@Overridepublic void onConnectionLost() {// Connection lostLog.d(TAG, "onConnectionLost");}@Overridepublic void onTryToReconnect() {// Attempt to reconnectLog.d(TAG, "onTryToReconnect");}@Overridepublic void onConnectionRecovery() {// Reconnect successfullyLog.d(TAG, "onConnectionRecovery");}
- (void)onConnectionLost {// Connection lostNSLog(@"onConnectionLost");}- (void)onTryToReconnect {// Attempt to reconnectNSLog(@"onTryToReconnect");}- (void)onConnectionRecovery {// Reconnect successfullyNSLog(@"onConnectionRecovery");}
void onConnectionLost() {// Connection lostprintf("onConnectionLost\\n");}void onTryToReconnect() {// Attempt to reconnectprintf("onTryToReconnect\\n");}void onConnectionRecovery() {// Reconnect successfullyprintf("onConnectionRecovery\\n");}
Feedback