Member¶
RoomMember
¶
RoomMember(
context: SkyWayContext,
id: str,
name: str | None,
metadata: str | None,
room_id: str,
side: MemberSide,
state: MemberState,
)
RemoteRoomMember
¶
RemoteRoomMember(
context: SkyWayContext,
id: str,
name: str | None,
metadata: str | None,
room_id: str,
state: MemberState = JOINED,
)
Bases: RoomMember
他のクライアントから Room に参加しているリモートメンバー。
LocalRoomMember
¶
LocalRoomMember(
context: SkyWayContext,
id: str,
name: str | None,
metadata: str | None,
room_id: str,
state: MemberState,
)
Bases: RoomMember
このクライアントから Room に参加しているメンバー。
LocalRoomMember は Room に join すると作成される。 一つの Room インスタンスには一つの LocalRoomMember が join でき、 複数管理することはできない。
publish
async
¶
publish(
stream: Stream, options: PublicationOptions = PublicationOptions()
) -> Publication
LocalDataStreamをpublishする。既にpublish中のStreamは指定することはできない。
unpublish
async
¶
unpublish(publication: Publication) -> None
unpublish(publication_id: str) -> None
unpublish(target: str | Publication) -> None
Publication または ID を指定して unpublish する。自身が publish した Publication のみ指定できる。
subscribe
async
¶
subscribe(publication: Publication) -> Subscription
subscribe(publication_id: str) -> Subscription
subscribe(target: str | Publication) -> Subscription
Publication または ID を指定して subscribe する。
LocalMemberConfig
dataclass
¶
LocalRoomMember の keepalive に関する設定。