Interface IConfig

Optional configuration used when initializing the Jabra SDK.

In particular, the IJabraConfig object allows you to overwrite the default message/warning/error logger with your own custom implementation.

interface IConfig {
    appId?: string;
    appName?: string;
    internal?: {
        recorder?: IRecorder;
        testDeviceTransport?: null | ITransport;
    };
    logger?: ILogger;
    partnerKey?: string;
    tracking?: TrackingOptions;
    transport?: RequestedBrowserTransport;
}

Properties

appId?: string

Unique string identifier for your application. You can choose whatever you like. The ID must be between 3 and 100 characters long. It can contain any combination of ASCII letters, numbers, dashes, and underscores.

appName?: string

Provides a human-readable application name that shows when interacting with Jabra applications and services. For example, the Preferred Softphone selector in Jabra Direct.

The name must be no longer than 100 characters and can contain letters, numbers, ampersands, dashes, and spaces. It must begin with a letter or number.

internal?: { recorder?: IRecorder; testDeviceTransport?: null | ITransport }

Internally used utilities for testing and debugging. For regular purposes, leave this object null.

logger?: ILogger

Implementation of the ILogger interface, used for logging runtime messages. Can be a custom implementation depending on the user's needs.

By default, the Jabra SDK logs messages as it executes its usual operations. These log events can be intercepted by implementing the ILogger interface, and providing your own custom functionality.

For an example of how to do this, see the section 'Setting the library logging' inside 'Initializing the core module' in the JavaScript Developer's Guide.

partnerKey?: string

This is used to uniquely identify a partner organization. Partner keys can be obtained from the Jabra Developer Zone.

tracking?: TrackingOptions

The Jabra SDK can track usage and errors when allowed. See TrackingOptions for available settings.

Defaults to NO_TRACKING.

If set, this enables the SDK user to explicitly choose which transport mechanism they would like to use.

The options are to use the Chrome extension (default behaviour), Chrome extension but falling back to WebHID if the extension is not available, or just WebHID.

Currently the WebHID-standard is only available in Chromium based browsers and requires active consent from the end-user.

To collect user consent, import the webHidPairing function from main package and fire when end-user clicks a relevant button in the UI (must be triggered by a user interaction - otherwise the request will be blocked). The browser will show a list of connected Jabra devices and the user can choose what device to pair with.

The browser caches consents for devices when paired - so this is only needed once per device.

For an example of how to use this, see the 'Using WebHid' chapter in the 'Initializing the Jabra library' section of the JavaScript Developer's Guide.