Skip to main content

Home > @gnaudio/jabra-js > IApi

IApi interface#

Main Jabra API object. Returned after SDK initialization (see init()).

Provides an entry point to reflecting and changing the state of Jabra devices.

Signature:
interface IApi

Example#

Here is an example where the JabraApi object can be used to subscribe to events related to jabra devices. The example iterates through all connected devices and prints them in the console:

const yourSoftphoneInfo; // See the init function for more details
// Init the Jabra SDK
const jabraApi = await jabrav3.init(yourSoftphoneInfo);
// Subscribe to changes to the connected Jabra devices
jabraApi.deviceList.subscribe((devices) => {
devices.forEach(async (device) => {
console.log(`- ${device.name}`);
});
});

Properties#

PropertyTypeDescription
_readyEventsObservable<any>Observable for the initial ready events from the console app and Chrome extension.This will replay on subscription.
_transportITransport
deviceAddedObservable<ISdkDevice>An observable which emits newly discovered Jabra devices. The emitted device object can be consumed by the third party developer. See ISdkDevice for more information.
deviceListObservable<ISdkDevice[]>A list of connected physical Jabra devices. Each device object can be consumed by the third party developer. See ISdkDevice for more information.
deviceRemovedObservable<ISdkDevice>An observable which emits disconnected Jabra devices. The emitted device object represents the device that has been disconnected. See ISdkDevice for more information.
logger?ILogger(Optional)
transportContextTransportContextGet the underlying transport context. Especially relevant when running in the browser to distinguish between WebHID and Chrome Extension/Host See enum TransportContext

Methods#

MethodDescription
getChromeExtensionVersion()Get the Jabra Chrome Extension versionIn node context, the Chrome Extension is unnecessary and will always return null.In browser context, the Chrome Extension is a required component that needs to be installed separately from this npm-package - unless the library is configured to use WebHID-transport, see IConfig.transport.
getChromehostVersion()Get the Jabra Chromehost versionChromehost is the native console application communicating with the USB-layer.In node context, the Chromehost will be embedded in the jabra-js stack, and not something to be concerned with as an SDK-user.In browser context, the Chromehost is a required application that needs to be installed separately from this npm-package - unless the library is configured to use WebHID-transport, see IConfig.transport.
getVersion()Returns the Jabra SDK version