janus-textroom-plugin
Typed bindings for janus.plugin.textroom, packaged independently from
janus-api-core and other named plugins.
TextRoom has two intentionally separate protocols:
- Janus plugin messages establish/restart the data-only PeerConnection and
perform synchronous room administration using a
requestfield. - Chat participation travels as UTF-8 JSON over a DataChannel using a
textroomfield and a mandatory transaction.
from janus_api.models.base import Jsep
from janus_textroom_plugin import TextRoomPlugin
textroom = TextRoomPlugin(session=session)
await textroom.attach()
offer = await textroom.setup()
# Apply offer.jsep in the WebRTC implementation, create the data channel,
# then return the local answer.
await textroom.ack(Jsep(type="answer", sdp=answer_sdp))
textroom.bind_datachannel(channel)
await textroom.join(1234, "alice", display="Alice")
await textroom.message(1234, "Hello everyone")
Room administration is deliberately independent of the WebRTC transport:
await textroom.create_room(
room=1234,
description="Support",
secret="room-admin-secret",
history=50,
)
rooms = await textroom.list_rooms()
participants = await textroom.list_participants(1234)
DataChannelLike is a small adapter protocol (ready_state plus send).
Incoming channel payloads must be handed to feed_datachannel(). The
transaction manager bounds pending requests, event backlog, and payload size;
it applies per-request timeouts and deterministically fails pending futures
when closed or cancelled. It does not close the application's underlying
WebRTC transport. Feed each incoming UTF-8 frame back to
textroom.feed_datachannel(payload) on the channel's owning event loop.
Room list/create/edit/destroy/exists/ACL queries use Janus messages. Join, message, announcement, leave, and kick use the DataChannel and can never be accidentally serialized into the Janus plugin body.
All operations accept a per-call timeout. Applications should call
await textroom.aclose() during shutdown so outstanding transaction waiters
are failed deterministically before the Janus handle is detached.
See the official TextRoom API.
Metadata
Release files for janus-textroom-plugin 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| janus_textroom_plugin-3.0.0.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| janus_textroom_plugin-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.8 kB
Release files / janus_textroom_plugin-3.0.0.tar.gz
| Download URL | janus_textroom_plugin-3.0.0.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8856899294be3563ff838fcbcbfdd698418c2971adb197c0f078447a13ac027c
|
|
BLAKE2b-256 checksum How to use checksums |
4997acf0140e7182314b7d6efc112ee9ea8ee267ef4ae0ed153be89bfc724b69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|
Release files / janus_textroom_plugin-3.0.0-py3-none-any.whl
| Download URL | janus_textroom_plugin-3.0.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea2592cbf1b5d59a9353292635bf8e96db5e21386fa6c1659880729252994290
|
|
BLAKE2b-256 checksum How to use checksums |
33b104cd44ad3649592337fea84552d28eec26d071281ad3f10671612ae46f2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|