File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -194,16 +194,10 @@ class LIVEKIT_API Room {
194194 // / Retrieve aggregated WebRTC stats for this room session.
195195 // /
196196 // / Behavior:
197- // / - If the room is not currently connected (no live FFI handle), resolves
198- // / immediately with a `GetSessionStatsErrorCode::NOT_CONNECTED` failure.
199- // / - Otherwise dispatches an async `get_session_stats` request to the Rust
200- // / FFI; the future resolves once the corresponding callback arrives.
201- // / - The future never throws — failures are surfaced as a typed
202- // / `GetSessionStatsError`. Inspect `Result::ok()` / `Result::error().code`
203- // / to branch on outcome.
204- // /
205- // / @return Future resolving with publisher + subscriber stats on success,
206- // / or a typed error code + message on failure.
197+ // / - If the room is not currently connected, returns a failed result immediately.
198+ // / - Otherwise dispatches an async request to the server to get the stats.
199+ // / @note Check result.ok() before accessing the stats.
200+ // / @return Future result of the room session stats.
207201 std::future<Result<SessionStats, GetSessionStatsError>> getStats () const ;
208202
209203 /* Register a handler for incoming text streams on a specific topic.
Original file line number Diff line number Diff line change @@ -502,13 +502,6 @@ struct RtcStats {
502502};
503503
504504// / Aggregated WebRTC stats for a connected room session.
505- // /
506- // / Mirrors the FFI `GetSessionStatsCallback.Result` payload: stats are split
507- // / between the publisher peer connection (outbound media flowing from the
508- // / local participant to the SFU) and the subscriber peer connection (inbound
509- // / media flowing from the SFU back to the local participant). When the SDK is
510- // / operating in single-peer-connection mode the publisher list carries the
511- // / combined stats and the subscriber list is empty.
512505struct SessionStats {
513506 // / Stats from the publisher peer connection (outbound media).
514507 std::vector<RtcStats> publisher_stats;
You can’t perform that action at this time.
0 commit comments