@@ -209,25 +209,36 @@ For service-style integration:
2092095 . For continuous input, run ` publish_live(...) ` in a worker thread.
2102106 . Use ` TransportStatus ` messages for metrics and retry decisions.
211211
212- ## 11. Runtime Stats (` stats_json ` )
212+ ## 11. Publish Summary (` stats ` )
213213
214- You can query publisher runtime state at any time:
214+ The publisher API is blocking: ` publish(...) ` , ` publish_file(...) ` ,
215+ ` publish_stream(...) ` , and ` publish_live(...) ` run the session on the calling
216+ thread. Because there is no built-in polling loop, stats are exposed as a
217+ structured summary of the current or most recent publish operation rather than
218+ as a live telemetry stream.
215219
216220``` cpp
217- const std::string stats = publisher.stats_json();
218- std::cout << stats << " \n " ;
221+ const auto stats = publisher.stats();
222+ std::cout << " bytes=" << stats.bytes_published
223+ << " objects=" << stats.objects_published
224+ << " groups=" << stats.groups_published << " \n " ;
219225```
220226
221- Current JSON fields:
227+ Current fields:
222228
223- - ` active ` : whether a session is currently active
224- - ` connected ` : whether transport is currently connected
225229- ` publishingLive ` : whether the active session is live-publish mode
226230- ` bytesPublished ` : total payload bytes published in the current/last session
227231- ` objectsPublished ` : total objects published in the current/last session
228232- ` groupsPublished ` : total (track, group) units published in the current/last session
229233- ` splitCmafChunks ` : current packaging mode (` true ` = split chunks, ` false ` = coalesced chunks)
230234- ` includeSap ` : whether SAP track/object packaging is enabled
235+ - ` transport ` , ` host ` , ` port ` , ` path ` : endpoint context for the current/last session
236+ - ` connectionId ` : last known transport connection ID
237+ - ` lastError ` : last publisher-level error, if any
238+
239+ ` stats_json() ` remains available for existing integrations, but it is deprecated
240+ because a JSON polling API implies runtime telemetry support that the blocking
241+ publisher API does not provide.
231242- ` transport ` : ` "raw_quic" ` or ` "webtransport" `
232243- ` host ` : configured endpoint host
233244- ` port ` : configured endpoint port
0 commit comments