Interface LocalP2PRoomMember

interface LocalP2PRoomMember {
    id: string;
    leave: (() => Promise<void>);
    metadata?: string;
    name?: string;
    onFatalError: Event<SkyWayError<Record<string, any>>>;
    onLeft: Event<void>;
    onMetadataUpdated: Event<string>;
    onPublicationListChanged: Event<void>;
    onPublicationSubscribed: Event<{
        stream: RemoteDataStream | RemoteAudioStream | RemoteVideoStream;
        subscription: RoomSubscription<RemoteStream>;
    }>;
    onPublicationUnsubscribed: Event<{
        subscription: RoomSubscription<RemoteStream>;
    }>;
    onStreamPublished: Event<{
        publication: RoomPublication<LocalStream>;
    }>;
    onStreamUnpublished: Event<{
        publication: RoomPublication<LocalStream>;
    }>;
    onSubscriptionListChanged: Event<void>;
    publications: RoomPublication<LocalStream>[];
    publish: (<T>(stream, options?) => Promise<RoomPublication<T>>);
    room: Room;
    roomId: string;
    roomName?: string;
    roomType: "sfu" | "p2p";
    side: "local";
    state: MemberState;
    subscribe: (<T>(publicationId, options?) => Promise<{
        stream: T;
        subscription: RoomSubscription<T>;
    }>);
    subscriptions: RoomSubscription<RemoteStream>[];
    unpublish: ((publicationId) => Promise<void>);
    unsubscribe: ((subscriptionId) => Promise<void>);
    updateMetadata: ((metadata) => Promise<void>);
}

Hierarchy (view full)

Properties

id: string
leave: (() => Promise<void>)

Type declaration

    • (): Promise<void>
    • Returns Promise<void>

Description

[japanese] Channelから退室する

metadata?: string
name?: string
onFatalError: Event<SkyWayError<Record<string, any>>>

Description

[japanese] 回復不能なエラー。このインスタンスは継続して利用できない。

onLeft: Event<void>

Description

[japanese] MemberがRoomから出たときに発火するイベント

onMetadataUpdated: Event<string>

Description

[japanese] Memberのメタデータが更新された時に発火するイベント

onPublicationListChanged: Event<void>

Description

[japanese] Publicationの数が変化した時に発火するイベント

onPublicationSubscribed: Event<{
    stream: RemoteDataStream | RemoteAudioStream | RemoteVideoStream;
    subscription: RoomSubscription<RemoteStream>;
}>

Description

[japanese] このMemberがStreamをSubscribeしたときに発火するイベント

onPublicationUnsubscribed: Event<{
    subscription: RoomSubscription<RemoteStream>;
}>

Type declaration

Description

[japanese] このMemberがStreamをUnsubscribeしたときに発火するイベント

onStreamPublished: Event<{
    publication: RoomPublication<LocalStream>;
}>

Type declaration

Description

[japanese] このMemberがStreamをPublishしたときに発火するイベント

onStreamUnpublished: Event<{
    publication: RoomPublication<LocalStream>;
}>

Type declaration

Description

[japanese] このMemberがStreamをUnPublishしたときに発火するイベント

onSubscriptionListChanged: Event<void>

Description

[japanese] Subscriptionの数が変化した時に発火するイベント

publications: RoomPublication<LocalStream>[]

Description

[japanese] Memberが Publish した Publication のリスト

publish: (<T>(stream, options?) => Promise<RoomPublication<T>>)

Type declaration

Description

[japanese] StreamをPublishする

room: Room
roomId: string
roomName?: string
roomType: "sfu" | "p2p"
side: "local"
subscribe: (<T>(publicationId, options?) => Promise<{
    stream: T;
    subscription: RoomSubscription<T>;
}>)

Type declaration

Description

[japanese] StreamのPublicationをSubscribeする

subscriptions: RoomSubscription<RemoteStream>[]

Description

[japanese] Memberが Subscribe している Subscription のリスト

unpublish: ((publicationId) => Promise<void>)

Type declaration

Description

[japanese] StreamのPublicationをUnpublishする

unsubscribe: ((subscriptionId) => Promise<void>)

Type declaration

Description

[japanese] StreamのSubscriptionをUnsubscribeする

updateMetadata: ((metadata) => Promise<void>)

Type declaration

    • (metadata): Promise<void>
    • Parameters

      • metadata: string

      Returns Promise<void>

Description

[japanese] Memberのメタデータを更新する