Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SinchClient

SinchClient is an entry point for whole SDK

Hierarchy

  • SinchClient

Index

Properties

callClient: CallClient

Returns the CallClient object for placing and receiving calls.

returns

the CallClient object.

localUserId: string

Returns the id of the user associated with this SinchClient.

returns

the local user id.

pushNotificationDisplayName?: string

Specify a display name to be used when the Sinch client initiates a call a on behalf of the local user (e.g. for an outgoing video call).

Display name is included in a push notification on a best-effort basis. For example, if the target device has very limited push payload size constraints (e.g iOS 7 can only handle 255 byte push notification payload), then the display name may not be included. display name is also included in an incoming call, Call.remoteUserDisplayName

returns

display name

Methods

  • isStarted(): boolean
  • Method used to forward the Sinch specific payload extracted from an incoming push notification. This will implicitly start the SinchClient if it wasn't already started.

    Parameters

    • payload: Record<string, string>

      Sinch specific payload which was transferred with the message

    Returns NotificationResult

    A result indicating initial inspection of the payload.

  • setSupportManagedPush(serviceWorker?: string): Promise<void>
  • Enables the use of managed push, where Sinch is responsible for sending your app a push notification when necessary.

    Parameters

    • Optional serviceWorker: string

      filename of push ServiceWorker definition, default is sw.js

    Returns Promise<void>

  • start(): Promise<void>
  • Starts the Sinch client. This must be done prior to making any calls.

    throws

    InvalidOperationError if SinchClient is already started

    Returns Promise<void>

  • terminate(): void
  • Terminates the Sinch client, while still leaving it some time to finish up currently pending tasks, for example finishing pending HTTP requests.

    Returns void

Generated using TypeDoc