inspect_jitsi.xmpp.monitor module#
monitor_conference: follow a Jitsi Meet room until it is closed.
An async generator yielding a JSON-serializable state dict - always the same schema - once when connected and again every time something in it changes:
{
"room": {"name": ..., "url": ..., "domain": ..., "muc_domain": ..., "jid": ...},
"participants": [{...}, ...],
"status": {"open": true, "attempts": 0},
}
If the connection drops, it reconnects (for up to timeout seconds) and
only increases status.attempts for each attempt. When the room is closed
it yields a last state with status.open false and returns.
- async inspect_jitsi.xmpp.monitor.monitor_conference(conference_url, *, nick=None, name=None, anonymous_domain=None, muc_domain=None, timeout=60, connect_timeout=10, create=False, stay=False)[source]#
Yield the room's state whenever it changes, until the room is closed.
A room that does not exist is not joined (joining could create it): a single state with
status.openfalse is yielded instead, unlesscreateis set.- Parameters:
conference_url (
str) – e.g. "https://meet.example.com/SomeRoomName".nick (
str|None) – the MUC nickname to join under. Random if not given.name (
str|None) – the display name (XEP-0172) to disclose when joining.anonymous_domain (
str|None) – override the XMPP domain. Auto-discovered if not given.muc_domain (
str|None) – override the MUC domain. Auto-discovered if not given.timeout (
float) – seconds to keep trying to reconnect after the connection is lost, before giving up. 0 disables reconnecting.connect_timeout (
float) – seconds to wait for each network step.create (
bool) – join the room even if it does not exist, which creates it on deployments that let anyone create rooms. Otherwise the existence of the room is checked before every join.stay (
bool) – keep monitoring when nobody else is in the room. Otherwise the room counts as closed - and the monitor leaves it - as soon as the monitor is the only one left in it.
- Raises:
ValueError – the conference URL cannot be parsed.
inspect_jitsi.xmpp.JitsiConnectionError – the first connection failed, or the connection was lost and could not be re-established within
timeoutseconds.
- Return type:
AsyncIterator[dict[str,Any]]