Google Meet Media API clients must periodically upload client statistics over
the media-stats
data channel.
The entries required by the Meet Media API are a subset of the
statistics
gathered by WebRTC, which are accessible by calling the
RTCPeerConnection::getStats()
method.
Client flow
All Meet Media API clients must implement the following flow.
Initial configuration
After the client opens the media-stats
data channel, Meet
immediately sends a
MediaStatsConfiguration
resource update over the channel. This configuration specifies how the client
should upload stats.
Configuration | |
---|---|
uploadIntervalSeconds
|
Specifies how frequently the Meet Media API client should upload statistics, or zero if the client shouldn't upload any. |
allowlist
|
Specifies which RTCPeerConnection::getStats() entries the client should upload. |
Stats upload
While connected to a conference, the Meet Media API client must:
Call the
RTCPeerConnection::getStats()
method at the interval specified byuploadIntervalSeconds
.Filter the resulting stats object down to the fields specified by
allowlist
.Upload the filtered stats by sending a
UploadMediaStatsRequest
across themedia-stats
data channel.