Monitoring¶
Everything the session does is readable while it runs.
stats, one call¶
player.stats
# {'position': 6.1, 'paused': False, 'muted': False, 'connected': True,
# 'stopped': False, 'loops': 0, 'bitrate_kbps': 116.1, 'frames_sent': 428,
# 'video_frames_sent': 51, 'bytes_sent': 90211, 'frames_dropped': 0,
# 'window_bytes': None, 'av_skew_ms': 0, 'error': None}
av_skew_ms is the wire skew of the audio timeline against the video one; near 0 and constant is healthy.
Throughput¶
It self-samples: poll it once a second and it is current.
Warnings¶
player.warnings lists everything the server will not accept: wrong dimensions, non-16:9 aspect ratio, unusual sample rates. Nothing fails silently; each warning is also pushed to your log callback prefixed with warning:.
The log narrates the session: connects, drops and retries, pause-outlived-window, end-of-stream holds, loop restarts.
Periodic dashboard¶
Or drive it from on_connection plus your own timer; the player never blocks on readers.