RtcStats
- Flutter
更新时间不可用
通话相关的统计信息。
class RtcStats {
const RtcStats(
{this.duration,
this.txBytes,
this.rxBytes,
this.txAudioBytes,
this.txVideoBytes,
this.rxAudioBytes,
this.rxVideoBytes,
this.txKBitRate,
this.rxKBitRate,
this.rxAudioKBitRate,
this.txAudioKBitRate,
this.rxVideoKBitRate,
this.txVideoKBitRate,
this.lastmileDelay,
this.userCount,
this.cpuAppUsage,
this.cpuTotalUsage,
this.gatewayRtt,
this.memoryAppUsageRatio,
this.memoryTotalUsageRatio,
this.memoryAppUsageInKbytes,
this.connectTimeMs,
this.firstAudioPacketDuration,
this.firstVideoPacketDuration,
this.firstVideoKeyFramePacketDuration,
this.packetsBeforeFirstKeyFramePacket,
this.firstAudioPacketDurationAfterUnmute,
this.firstVideoPacketDurationAfterUnmute,
this.firstVideoKeyFramePacketDurationAfterUnmute,
this.firstVideoKeyFrameDecodedDurationAfterUnmute,
this.firstVideoKeyFrameRenderedDurationAfterUnmute,
this.txPacketLossRate,
this.rxPacketLossRate});
@JsonKey(name: 'duration')
final int? duration;
@JsonKey(name: 'txBytes')
final int? txBytes;
@JsonKey(name: 'rxBytes')
final int? rxBytes;
@JsonKey(name: 'txAudioBytes')
final int? txAudioBytes;
@JsonKey(name: 'txVideoBytes')
final int? txVideoBytes;
@JsonKey(name: 'rxAudioBytes')
final int? rxAudioBytes;
@JsonKey(name: 'rxVideoBytes')
final int? rxVideoBytes;
@JsonKey(name: 'txKBitRate')
final int? txKBitRate;
@JsonKey(name: 'rxKBitRate')
final int? rxKBitRate;
@JsonKey(name: 'rxAudioKBitRate')
final int? rxAudioKBitRate;
@JsonKey(name: 'txAudioKBitRate')
final int? txAudioKBitRate;
@JsonKey(name: 'rxVideoKBitRate')
final int? rxVideoKBitRate;
@JsonKey(name: 'txVideoKBitRate')
final int? txVideoKBitRate;
@JsonKey(name: 'lastmileDelay')
final int? lastmileDelay;
@JsonKey(name: 'userCount')
final int? userCount;
@JsonKey(name: 'cpuAppUsage')
final double? cpuAppUsage;
@JsonKey(name: 'cpuTotalUsage')
final double? cpuTotalUsage;
@JsonKey(name: 'gatewayRtt')
final int? gatewayRtt;
@JsonKey(name: 'memoryAppUsageRatio')
final double? memoryAppUsageRatio;
@JsonKey(name: 'memoryTotalUsageRatio')
final double? memoryTotalUsageRatio;
@JsonKey(name: 'memoryAppUsageInKbytes')
final int? memoryAppUsageInKbytes;
@JsonKey(name: 'connectTimeMs')
final int? connectTimeMs;
@JsonKey(name: 'firstAudioPacketDuration')
final int? firstAudioPacketDuration;
@JsonKey(name: 'firstVideoPacketDuration')
final int? firstVideoPacketDuration;
@JsonKey(name: 'firstVideoKeyFramePacketDuration')
final int? firstVideoKeyFramePacketDuration;
@JsonKey(name: 'packetsBeforeFirstKeyFramePacket')
final int? packetsBeforeFirstKeyFramePacket;
@JsonKey(name: 'firstAudioPacketDurationAfterUnmute')
final int? firstAudioPacketDurationAfterUnmute;
@JsonKey(name: 'firstVideoPacketDurationAfterUnmute')
final int? firstVideoPacketDurationAfterUnmute;
@JsonKey(name: 'firstVideoKeyFramePacketDurationAfterUnmute')
final int? firstVideoKeyFramePacketDurationAfterUnmute;
@JsonKey(name: 'firstVideoKeyFrameDecodedDurationAfterUnmute')
final int? firstVideoKeyFrameDecodedDurationAfterUnmute;
@JsonKey(name: 'firstVideoKeyFrameRenderedDurationAfterUnmute')
final int? firstVideoKeyFrameRenderedDurationAfterUnmute;
@JsonKey(name: 'txPacketLossRate')
final int? txPacketLossRate;
@JsonKey(name: 'rxPacketLossRate')
final int? rxPacketLossRate;
factory RtcStats.fromJson(Map<String, dynamic> json) =>
_$RtcStatsFromJson(json);
Map<String, dynamic> toJson() => _$RtcStatsToJson(this);
}属性
| 参数名 | 描述 |
|---|---|
duration | |
txBytes | |
rxBytes | |
txAudioBytes | |
txVideoBytes | |
rxAudioBytes | |
rxVideoBytes | |
txKBitRate | |
rxKBitRate | |
rxAudioKBitRate | |
txAudioKBitRate | |
rxVideoKBitRate | |
txVideoKBitRate | |
lastmileDelay | |
txPacketLossRate | |
rxPacketLossRate | |
userCount | |
cpuAppUsage | 当前 App 的 CPU 使用率 (%)。 注:
|
cpuTotalUsage | 当前系统的 CPU 使用率 (%)。 对于 Windows 平台,在多核环境中,该成员指多核 CPU 的平均使用率。 计算方式为 (100 - 任务管理中显示的系统空闲进程 CPU)/100。 注:
|
connectTimeMs | |
gatewayRtt | 客户端到本地路由器的往返时延 (ms)。 注: 该属性默认在 iOS 14 之前的设备上开启,在 iOS 14 及之后的设备上关闭。 如需在 iOS 14 及之后的设备上启用该属性,请联系技术支持。
在 Android 平台上,如需获取 |
memoryAppUsageRatio | |
memoryTotalUsageRatio | |
memoryAppUsageInKbytes |