将客户端指标上传到 Meet 媒体 API
Google Meet Media API 客户端必须定期通过 media-stats
数据通道上传客户端统计信息。
Meet Media API 所需的条目是 WebRTC 收集的统计信息的一部分,您可以通过调用 RTCPeerConnection::getStats()
方法访问这些统计信息。
客户端流程
所有 Meet Media API 客户端都必须实现以下流程。
初始配置
客户端打开 media-stats
数据通道后,Meet 会立即通过该通道发送 MediaStatsConfiguration
资源更新。此配置指定客户端应如何上传统计信息。
上传统计信息
连接到会议期间,Meet Media API 客户端必须:
按照 uploadIntervalSeconds
指定的时间间隔调用 RTCPeerConnection::getStats()
方法。
将生成的统计信息对象过滤为仅包含 allowlist
指定的字段。
通过 media-stats
数据通道发送 UploadMediaStatsRequest
来上传过滤后的统计信息。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-24。
[null,null,["最后更新时间 (UTC):2025-02-24。"],[[["Meet Media API clients are required to periodically upload client statistics via the `media-stats` data channel."],["The required statistics for the Meet Media API are a subset of those collected by WebRTC and accessed via the `RTCPeerConnection::getStats()` method."],["Upon opening the `media-stats` channel, clients receive a `MediaStatsConfiguration` from Meet, dictating how statistics should be uploaded."],["Clients must call `RTCPeerConnection::getStats()`, filter the results based on the provided `allowlist`, and upload the filtered stats as an `UploadMediaStatsRequest` over the data channel."],["The upload interval for client statistics is specified by the `uploadIntervalSeconds` parameter provided in the `MediaStatsConfiguration` received from the Meet server."]]],[]]