Skip to main content
This page documents the public monitoring models in cn.seastart.rtc.monitoring.api. For callbacks and queries, see Network quality. The old nested types under cn.seastart.rtc.statistics.MediaMetric and the onMediaMetric callback have been removed. Migrate to the top-level types here, onLocalQualitySnapshot, and getMetric().

LocalQualitySnapshot

Both child objects must have a timestamp equal to the outer timestamp. The snapshot does not contain raw per-track counters; call getMetric() for detailed statistics.

NetworkQuality, DirectionQuality, and TrackQuality

NetworkQuality contains timestamp, uplink: DirectionQuality, downlink: DirectionQuality, localTracks: List<TrackQuality>, and remoteTracks: List<TrackQuality>. Lists are empty when no corresponding tracks exist. QualityLevel is UNKNOWN, EXCELLENT, GOOD, POOR, BAD, or LOST; QualityConstraint is NONE, CPU, or BANDWIDTH. QualityDirection is UPLINK or DOWNLINK. UNKNOWN means there is no reliable assessment; LOST only means ICE for an expected media track reached FAILED. See Enums for more.

MediaPlaybackExperience

MediaPlaybackExperience contains timestamp, videoTracks: List<VideoTrackPlaybackExperience>, and audioTracks: List<AudioTrackPlaybackExperience>. It describes only downlink playback continuity on this device.

MediaMetric

RTCEngine.getMetric() returns MediaMetric? for the default channel; RTCChannel.getMetric() returns MediaMetric? for a specified channel. The result copies the latest completed sample and is null when unavailable. This detailed model contains no network or playback levels.

Detailed statistics fields and units

Nonexistent tracks do not appear in a map. Some totals are 0 when no corresponding tracks exist. When a track exists but raw counters or a valid window are missing, the affected measurement is null, not a measured zero. If any track contributing to an aggregate lacks a needed value, that aggregate is null. Detailed direction loss rates use combined packet counts; snapshot direction lossRate uses the maximum available per-track window rate, so the two may differ. Do not treat per-track timestamp and sampleTimestampMs as the same clock.

ServerQualityReport and NetworkQualityChange

FY ServerQualityReport contains timestamp, uplink: ServerQualityStats, and downlink: ServerQualityStats. Each ServerQualityStats contains score (0–100), level (excellent / good / poor / lost), mos, loss (0–1), rtt (ms), jitter (ms), packets, bitrate (kbps), and bytes. Server values follow the backend contract; local-statistics unit conversions do not apply. NetworkQualityChange contains direction: QualityDirection, previousLevel: String, currentLevel: String, trend: QualityTrend, and report: ServerQualityReport. Only FY server reports drive it; it is independent of local LocalQualitySnapshot evaluation.