inspect_jitsi.xmpp.conference module#
JitsiConference: the public, domain-level handle on a Jitsi Meet room.
JitsiXmppConnection is the low-level
XMPP/MUC transport (stream negotiation, SASL, presence framing - the RFC
6120/7395/XEP-0045 plumbing). JitsiConference wraps one such connection and
is the class user code is expected to reach for.
- class inspect_jitsi.xmpp.conference.JitsiConference(conference_url, nick=None, *, name=None, anonymous_domain=None, muc_domain=None, timeout=10)[source]#
Bases:
objectA Jitsi Meet conference (room), joined anonymously as an observer.
Use as an async context manager:
async with JitsiConference(conference_url, "probe") as conference: print(await conference.get_participants())
or call
open()/close()directly.diagnose()andis_created()can be called standalone, without opening the conference, to check what's needed to join at all and whether there's anyone to join in the first place.- __annotations__ = {}#
- __dict__ = mappingproxy({'__module__': 'inspect_jitsi.xmpp.conference', '__firstlineno__': 50, '__doc__': 'A Jitsi Meet conference (room), joined anonymously as an observer.\n\nUse as an async context manager::\n\n async with JitsiConference(conference_url, "probe") as conference:\n print(await conference.get_participants())\n\nor call :meth:`open`/:meth:`close` directly. :meth:`diagnose` and\n:meth:`is_created` can be called standalone, without opening the\nconference, to check what\'s needed to join at all and whether there\'s\nanyone to join in the first place.\n', '__init__': <function JitsiConference.__init__>, 'room': <property object>, 'nick': <property object>, 'name': <property object>, 'open': <function JitsiConference.open>, 'close': <function JitsiConference.close>, 'get_participants': <function JitsiConference.get_participants>, 'is_created': <function JitsiConference.is_created>, 'diagnose': <function JitsiConference.diagnose>, '_probe_stream': <function JitsiConference._probe_stream>, '__aenter__': <function JitsiConference.__aenter__>, '__aexit__': <function JitsiConference.__aexit__>, '__static_attributes__': ('_anonymous_domain', '_connection', '_muc_domain', 'conference_url', 'timeout'), '__dict__': <attribute '__dict__' of 'JitsiConference' objects>, '__weakref__': <attribute '__weakref__' of 'JitsiConference' objects>, '__annotations__': {}})#
- __firstlineno__ = 50#
- __init__(conference_url, nick=None, *, name=None, anonymous_domain=None, muc_domain=None, timeout=10)[source]#
- __module__ = 'inspect_jitsi.xmpp.conference'#
- __static_attributes__ = ('_anonymous_domain', '_connection', '_muc_domain', 'conference_url', 'timeout')#
- __weakref__#
list of weak references to the object
- async diagnose()[source]#
Probe the server and report what's needed to read this room's occupancy.
Unlike
open(), this never joins the room - it checks whether /config.js was readable, which internal domains it advertises, whether the XMPP domain is actually served over the WebSocket endpoint, which SASL mechanisms it offers, and whether anonymous login succeeds (i.e. whether a token/JWT is required).- Return type:
- async get_participants()[source]#
Return the participants currently known to be in the conference.
- Return type:
- async is_created()[source]#
Return whether this room currently exists, without joining it.
Jitsi's MUC returns a forbidden disco#info error for a room that exists (disco is restricted to occupants) but item-not-found for one that hasn't been created yet (or was destroyed once everyone left) - this tells the two apart without joining.
- Raises:
inspect_jitsi.xmpp.JitsiConnectionError – the XMPP connection failed or was lost (refused, dropped, timed out, or an unparseable server response) - not raised for a room that simply doesn't exist, which is reported as False.
- Return type: