Metadata-Version: 2.4
Name: janus-videoroom-plugin
Version: 3.0.0
Summary: Typed VideoRoom plugin client and lifecycle service for janus-api-core
Author: Janus API contributors
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: janus-api-core<4,>=3
Requires-Dist: pydantic<3,>=2.7
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Requires-Dist: build>=1.2; extra == "test"

# janus-videoroom-plugin

Independent, typed bindings for the Janus VideoRoom SFU plugin. It depends on
`janus-api-core>=3,<4` and does not install any other named Janus plugin.

```python
from janus_videoroom_plugin import (
    PublisherJoinRequest,
    SubscribeTarget,
    SubscriberJoinRequest,
    VideoRoomPlugin,
)

async with VideoRoomPlugin(session=session) as publisher:
    joined = await publisher.join_publisher(PublisherJoinRequest(room=1234))

async with VideoRoomPlugin(session=session) as subscriber:
    attached = await subscriber.join_subscriber(
        SubscriberJoinRequest(
            room=1234,
            streams=[SubscribeTarget(feed=42, mid="1")],
        )
    )
```

`VideoRoomService` safely owns related publisher and subscriber handles for an
application lifecycle. It is async-only, scoped to one session, and never
creates a hidden global event loop or thread:

```python
from janus_videoroom_plugin import VideoRoomService

async with VideoRoomService(session) as rooms:
    publisher = await rooms.publisher(room=1234, participant=7, display="Ada")
    subscriber = await rooms.subscriber(
        room=1234,
        owner=7,
        key="stage",
        streams=[SubscribeTarget(feed=42)],
    )
```

Outbound models serialize only explicitly supplied options. Inbound response
models retain unknown fields for compatibility with newer Janus servers.

Protocol reference: <https://janus.conf.meetecho.com/docs/videoroom.html>

