This projects implements a Javascript Client Library to interact with a Kopano Webmeetings server.
- Typescript
- WebRTC
- Webpack
Kopano publishes releases of kwmjs to the community download server. Those can easily be added to projects with Yarn or NPM.
yarn add https://download.kopano.io/community/kapp:/kwmjs-latest.tgz
KWMJS exposes a public API. The documentation can be generated with TypeScript as follows:
make docs
Then to view the docs, open dist/docs/index.html
in a browser of your choice.
const kwm = new kwmjs.KWM();
kwm.connect('userA').then(() => {
// Connected, ready to call.
return kwm.webrtc.doCall('userB');
}).then(channel => {
// Ringing, waiting for userB to accept call.
});
const kwm = new kwmjs.KWM();
kwm.webrtc.onpeer = event => {
switch (event.event) {
case 'incomingcall':
kwm.webrtc.doAnswer(event.record.user).then(channel => {
// Waiting for connection to establish.
});
break;
}
};
kwm.connect('userB').then(() => {
// Connected, ready to accept calls.
});
Builtin kwmjs, requires the following dependencies:
- yarn
Type in the following in the browser console to enable WebRTC debugging.
localStorage.debug = 'simple-peer'
See LICENSE.txt
for licensing information of this project.