更新时间:2026-09-14 GMT+08:00
分享

返回弱网指标回调

方法名称

void onCloudStatistics(KPCloudStat kPClientStat)

功能描述

回调接口显示相关网络数据

public static native void nativeClassInit();
public int sendFrameRate;     // 发送帧率
public int encFrameRate;      // 编码帧率
public int renderFrameRate;   // 显示帧率
public int rtt;               // 往返时延
public int upBitrate;         // 上行流量速度
public int downBitrate;       // 下行流量速度
public int fecRate;           // 纠错率
public int arqRate;           // 重传率
public int estimateBW;        // 估算带宽
public int lostRate;          // 估算丢包

重写toString显示参数信息

public String toString() {
    return "KPCloudStat{" +
            "sendFrameRate=" + sendFrameRate +
            ", encFrameRate=" + encFrameRate +
            ", renderFrameRate=" + renderFrameRate +
            ", rtt=" + rtt +
            ", upBitrate=" + upBitrate +
            ", downBitrate=" + downBitrate +
            ", fecRate=" + fecRate +
            ", arqRate=" + arqRate +
            ", estimateBW=" + estimateBW +
            ", lostRate=" + lostRate +
            '}';
}

相关文档