cn.seastart.rtc.monitoring.api from SRTC 2.0.38. The old nested types under cn.seastart.rtc.statistics.MediaMetric and onMediaMetric() have been removed. See SRTC media quality for all fields and units.
Get quality data
getMetric() returns null when no meeting is active, no sample has completed, or the media connection is invalid. onLocalQualitySnapshot() is delivered about every 2 seconds after sampling completes; query detailed statistics only when needed.
Local quality snapshot
LocalQualitySnapshot contains timestamp: Long, networkQuality: NetworkQuality, and mediaPlaybackExperience: MediaPlaybackExperience from the same sample. Network quality provides levels, loss rates, bitrates, RTT, and jitter by direction and user track. Playback experience provides smoothness or interruption data by remote video and audio track. The snapshot does not contain raw per-track counters; see SRTC media quality for fields and levels.
Detailed statistics
The top-levelMediaMetric returned by getMetric() contains channel, sampleTimestampMs, local sending tracks localAudios / localVideos, remote receiving tracks remoteAudios / remoteVideos, aggregates localUploadStats / remoteDownloadStats, networkStats, and the nullable FY server qualityReport. Per-track maps use UserTrackDesc keys. Bitrates are in bps; loss rates are fractions from 0 to 1. See SRTC media quality for the full fields and units.
FY server quality reports
onNetworkQualityChanged() fires once for the uplink and once for the downlink for each FY server report, without debouncing. When the level is unchanged, trend is STABLE. It is independent of the local LocalQualitySnapshot evaluation. See SRTC enums for directions, levels, and trends, and SRTC network quality for poor-network handling.