gnaudio / jabra-browser-integration

JavaScript library to control a Jabra headset from a browser
https://www.npmjs.com/package/@gnaudio/jabra-browser-integration
MIT License
3 stars 1 forks source link

Getting Jabra to work with electron #11

Closed ZDemeter closed 6 years ago

ZDemeter commented 6 years ago

Hi! I've been having trouble getting this to work with an electron client.

The main problem seem to be that electron hasn't implemented the chrome.runtime API, creating some conflicts with the chrome web extension when connecting to the native application and sending messages, for example:

// background.js L:61
...
port = window.chrome.runtime.connectNative(hostName);
...
// content-script L:40
...
window.chrome.runtime.onMessage.addListener(...);
...

Is there any solution for gettings this to work with electron, or any thoughts about this? 🙂

frederiksen commented 6 years ago

@ZDemeter try to look at our npm module: https://npmjs.com/package/jabra

ZDemeter commented 6 years ago

@frederiksen Oh, does that intend to replace the 'jabra-browser-integration' flow entirely, as in the Chrome WebExtension and the JabraChromHost application?

frederiksen commented 6 years ago

@ZDemeter the two solutions compliments it other. For an Electron app use the npm module. For a web-app to be used from a Chrome browser use the Jabra Browser Integration project.

ghost commented 6 years ago

Closing as this is resolved by using the npm.