The Client is the primary controller which powers the MediaPanel.

Hierarchy

  • Client

Properties

EVENTS: typeof CLIENT_EVENTS

An Enum representing all the internal events that apps can listen to.

connect: ((channelId: string) => Promise<void[]>)

Type declaration

    • (channelId: string): Promise<void[]>
    • Connect to a Channel. This should be called before a MediaPanel is created and presented with MediaPanel.

      Parameters

      • channelId: string

      Returns Promise<void[]>

destroy: (() => void)

Type declaration

    • (): void
    • Disconnect from all channels and tear down the Client. Once destroy is invoked, the client cannot be used anymore.

      Returns void

disconnect: ((channelId: string) => void)

Type declaration

    • (channelId: string): void
    • Disconnect from a Channel.

      Parameters

      • channelId: string

      Returns void

off: ((eventName: CLIENT_EVENTS, callback: CallableFunction) => void)

Type declaration

    • (eventName: CLIENT_EVENTS, callback: CallableFunction): void
    • Unregister from a previously registered event.

      Parameters

      Returns void

on: ((eventName: CLIENT_EVENTS, callback: CallableFunction) => void)

Type declaration

    • (eventName: CLIENT_EVENTS, callback: CallableFunction): void
    • Register a new handler for a given event.

      Parameters

      Returns void

setUserAvatarUrl: ((avatarUrl?: string) => void)

Type declaration

    • (avatarUrl?: string): void
    • Sets the user avatar image.

      Parameters

      • Optional avatarUrl: string

      Returns void

setUserDisplayName: ((name: string) => void)

Type declaration

    • (name: string): void
    • Sets the user display name.

      Parameters

      • name: string

      Returns void

updateAuthToken: ((token: string) => Promise<void[]>)

Type declaration

    • (token: string): Promise<void[]>
    • Update the current auth token. Typically called when the token is nearing expiry and to continue the session uninterrupted.

      Parameters

      • token: string

      Returns Promise<void[]>