Interface LocalPerson

interface LocalPerson {
    channel: Channel;
    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: Subscription<RemoteStream>;
    }>;
    onPublicationUnsubscribed: Event<{
        subscription: Subscription<RemoteStream>;
    }>;
    onStreamPublished: Event<{
        publication: Publication<LocalStream>;
    }>;
    onStreamUnpublished: Event<{
        publication: Publication<LocalStream>;
    }>;
    onSubscriptionListChanged: Event<void>;
    publications: Publication<LocalStream>[];
    publish: (<T>(stream, options?) => Promise<Publication<T>>);
    side: MemberSide;
    state: MemberState;
    subscribe: (<T>(publication, options?) => Promise<{
        stream: T;
        subscription: Subscription<T>;
    }>);
    subscriptions: Subscription<RemoteDataStream | RemoteAudioStream | RemoteVideoStream>[];
    subtype: "person";
    type: "person";
    unpublish: ((publication) => Promise<void>);
    unsubscribe: ((subscription) => Promise<void>);
    updateMetadata: ((metadata) => Promise<void>);
}

Hierarchy (view full)

Properties

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

Type declaration

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

Description

[japanese] memberをChannelから退去させる

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

Description

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

onLeft: Event<void>

Description

[japanese] Channelから離脱したときに発火するイベント

onMetadataUpdated: Event<string>

Description

[japanese] Metadataが変化したときに発火するイベント

onPublicationListChanged: Event<void>

Description

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

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

Description

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

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

Type declaration

Description

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

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

Type declaration

Description

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

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

Type declaration

Description

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

onSubscriptionListChanged: Event<void>

Description

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

publications: Publication<LocalStream>[]

Description

[japanese] このMemberのPublicationのリスト

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

Type declaration

Description

[japanese] StreamをPublishする

subscribe: (<T>(publication, options?) => Promise<{
    stream: T;
    subscription: Subscription<T>;
}>)

Type declaration

Description

[japanese] StreamのPublicationをSubscribeする

Description

[japanese] このMemberのSubscriptionのリスト

subtype: "person"
type: "person"
unpublish: ((publication) => Promise<void>)

Type declaration

Description

[japanese] StreamのPublicationをUnpublishする

unsubscribe: ((subscription) => 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] metadataを更新する