join_channel_async#

async omni.kit.collaboration.channel_manager.join_channel_async(
url: str,
get_users_only=False,
) Channel#

Joins a live session and starts listening for user presence and messages.

Parameters:
  • url (str) – The session url to join.

  • get_users_only (bool) – Joins the session without announcing presence. Users in this mode will not appear in other clients’ user lists. Useful for discovering who is in a session without participating.

Returns:

omni.kit.collaboration.channel_manager.Channel. The instance of channel that could be used to publish/subscribe channel messages.

Examples

>>> import omni.kit.collaboration.channel_manager as nm
>>>
>>> async join_channel_async(url):
>>>     channel = await nm.join_channel_async(url)
>>>     if channel:
>>>         channel.add_subscriber(...)
>>>         await channel.send_message_async(...)
>>>     else:
>>>         # Failed to join
>>>         pass