Skip to main content

Home > @gnaudio/jabra-js > IConfig > transport

IConfig.transport property#

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.

Signature:
transport?: RequestedBrowserTransport;

Remarks#

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.

import { webHidPairing } from '@gnaudio/jabra-js';
document.getElementById('consent-button').addEventListener('click', async () => {
await webHidPairing();
});
// Init library as normal