Skip to main content

Typed VideoRoom plugin client and lifecycle service for janus-api-core

Project description

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.

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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

janus_videoroom_plugin-3.0.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

janus_videoroom_plugin-3.0.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file janus_videoroom_plugin-3.0.0.tar.gz.

File metadata

File hashes

Hashes for janus_videoroom_plugin-3.0.0.tar.gz
Algorithm Hash digest
SHA256 011a2700193da7a7aa60c1a5e8cd5b8654cf3f1f4cfeb9c6c2e1f7fea83449bb
MD5 0a793088c234d7fea3f6eddf7f6f8275
BLAKE2b-256 bd43022c1adf5af56f6c8e27e71006f2bc262e8d6fc3f0e870f1e732873752e0

See more details on using hashes here.

File details

Details for the file janus_videoroom_plugin-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for janus_videoroom_plugin-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27af843ae233edae2c6dc5d291d2e35c0a5a07b069deb4b284c842328ec7436f
MD5 af053da6da5b2dd434df12329bc088dd
BLAKE2b-256 aa3c2ec2ed0c1b140fa763283776af6e40895b7e541c47af53fb82cc560e0ad6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page