browser_get_live_stream_stats
POST /api/execute/browser_get_live_stream_statsRetrieves operational metrics for an active MJPEG broadcast, detailing viewer count, transmitted frames, bandwidth throughput, and uptime. The internal streaming multiplexer tracks every open HTTP client socket receiving multipart JPEG chunks alongside rolling byte transfer counters and active encoder settings. Inspecting these metrics enables control-plane dashboards to detect orphaned viewer connections, monitor network egress saturation, and verify whether surface delivery matches the configured target cadence. Querying telemetry reads in-memory atomic counters non-intrusively and does not interrupt ongoing image compression or client socket delivery. If no broadcast is currently running for the given session, the response indicates an inactive streaming state with zeroed throughput counters so callers can handle idle handles gracefully without raising runtime exceptions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| context_id | string | yes | Session handle queried for live MJPEG broadcast viewer counts and throughput telemetry. |
Usage
result = await browser.get_live_stream_stats(context_id=context_id)