sinch-rtc
    Preparing search index...

    Interface SinchClientBuilder

    The SinchClientBuilder class builds a new SinchClient instance.

    To construct a SinchClient, the required configuration parameters are:

    • Application Key
    • Environment host
    • UserID

    It is optional to specify:

    • CLI (Calling-Line Identifier / Caller-ID) that will be used for calls terminated to PSTN (Publicly Switched Telephone Network).
    • hmsDeviceToken & hmsApplicationId if Huawei Push is to be used.
    interface SinchClientBuilder {
        applicationKey(applicationKey: string): SinchClientBuilder;
        build(): SinchClient;
        callerIdentifier(callerIdentifier: string): SinchClientBuilder;
        environmentHost(environmentHost: string): SinchClientBuilder;
        fetchApi(
            api: (
                input: RequestInfo | URL,
                init?: RequestInit,
            ) => Promise<Response>,
        ): SinchClientBuilder;
        mediaStreamFactory(
            mediaStreamFactory: MediaStreamFactory,
        ): SinchClientBuilder;
        userId(userId: string): SinchClientBuilder;
        videoConfiguration(
            videoConfiguration: MediaTrackConstraints,
        ): SinchClientBuilder;
    }
    Index

    Methods

    • Sets the application key associated with the SinchClient.

      Parameters

      • applicationKey: string

        Must not be null.

      Returns SinchClientBuilder

      The SinchClientBuilder instance.

    • Sets the caller identifier used when calling with PSTN.

      Parameters

      • callerIdentifier: string

        Optional, must not be null

      Returns SinchClientBuilder

      The SinchClientBuilder instance.

    • Sets the environment host associated with the SinchClient.

      Parameters

      • environmentHost: string

        Must not be null.

      Returns SinchClientBuilder

      The SinchClientBuilder instance.

    • Sets the fetch api to be used by rest request. If not set the standard FetchApi will be used.

      Parameters

      • api: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
          • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
          • Parameters

            • input: RequestInfo | URL
            • Optionalinit: RequestInit

            Returns Promise<Response>

      Returns SinchClientBuilder

      The SinchClientBuilder instance.

    • Sets the user id associated with the SinchClient.

      Parameters

      • userId: string

        Must not be null.

      Returns SinchClientBuilder

      The SinchClientBuilder instance.