@webex/calling 0.0.1-next.7 → 0.0.1-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,52 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
### Table of Contents
|
|
2
|
+
- [Getting Started](#getting-started)
|
|
3
|
+
- [Developing](#developing)
|
|
4
|
+
- [Building](#building)
|
|
5
|
+
- [Testing](#testing)
|
|
6
|
+
- [Samples](#samples)
|
|
7
|
+
- [Consuming SDK](#consuming-sdk)
|
|
8
|
+
- [NPM](#npm)
|
|
9
|
+
- [CDN](#cdn)
|
|
10
|
+
- [Kitchen Sink App](#kitchen-sink-app)
|
|
11
|
+
---
|
|
2
12
|
|
|
13
|
+
## Getting Started
|
|
3
14
|
With the Webex Calling SDK, you can effortlessly integrate fundamental audio calling capabilities into your solutions, enhancing the way your users connect.
|
|
4
15
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> API guide - TBD
|
|
8
|
-
|
|
16
|
+
- [Introduction to the Webex Web Calling SDK](https://github.com/webex/webex-js-sdk/wiki/Introducing-the-Webex-Web-Calling-SDK)
|
|
17
|
+
- [Quickstart guide](https://github.com/webex/webex-js-sdk/wiki/Quickstart-Guide-(Calling)).
|
|
9
18
|
|
|
10
19
|
## Developing
|
|
11
20
|
|
|
12
|
-
```
|
|
21
|
+
```bash
|
|
13
22
|
git clone https://github.com/\<your-fork\>/webex-js-sdk.git
|
|
14
23
|
cd web-js-sdk/
|
|
15
24
|
yarn install
|
|
16
25
|
```
|
|
17
26
|
|
|
18
|
-
|
|
27
|
+
## Building
|
|
19
28
|
|
|
20
29
|
If your project needs some additional steps for the developer to build the
|
|
21
30
|
project after some code changes, state them here:
|
|
22
31
|
|
|
23
|
-
```
|
|
32
|
+
```bash
|
|
24
33
|
yarn workspaces foreach --parallel --verbose run build:src
|
|
25
34
|
|
|
26
35
|
yarn build:local
|
|
27
36
|
```
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
## Testing
|
|
30
39
|
|
|
31
|
-
```
|
|
40
|
+
```bash
|
|
32
41
|
yarn workspace @webex/calling run test
|
|
33
42
|
```
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
44
|
+
## Samples
|
|
45
|
+
```bash
|
|
46
|
+
yarn run samples:serve
|
|
38
47
|
```
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
## Consuming SDK
|
|
50
|
+
To consume the latest stable version of the Calling SDK one can use NPM or CDN.
|
|
51
|
+
# NPM
|
|
52
|
+
```javascript
|
|
53
|
+
npm install @webex/calling
|
|
54
|
+
```
|
|
55
|
+
(or)
|
|
43
56
|
|
|
57
|
+
```javascript
|
|
58
|
+
yarn add @webex/calling
|
|
59
|
+
```
|
|
44
60
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
npm install @webex/web-calling-sdk
|
|
61
|
+
```javascript
|
|
62
|
+
import Calling from '@webex/calling'
|
|
48
63
|
```
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
```
|
|
64
|
+
# CDN
|
|
65
|
+
```javascript
|
|
66
|
+
<script src="../calling.min.js"></script>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Kitchen Sink App
|
|
70
|
+
To test Calling SDK API, use this Kitchen Sink app: https://webex.github.io/webex-js-sdk/samples/calling/
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
@@ -70,9 +70,6 @@ export class CallHistory extends Eventing {
|
|
|
70
70
|
return errorStatus;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
getSDKConnector() {
|
|
74
|
-
return this.sdkConnector;
|
|
75
|
-
}
|
|
76
73
|
registerSessionsListener() {
|
|
77
74
|
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, async (event) => {
|
|
78
75
|
if (event && event.data.userSessions.userSessions) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Event, RoapMediaConnection } from '@webex/internal-media-core';
|
|
1
|
+
import { Event, LocalStreamEventNames, RoapMediaConnection, } from '@webex/internal-media-core';
|
|
2
2
|
import { createMachine, interpret } from 'xstate';
|
|
3
3
|
import { v4 as uuid } from 'uuid';
|
|
4
4
|
import { ERROR_LAYER, ERROR_TYPE } from '../../Errors/types';
|
|
@@ -1225,6 +1225,7 @@ export class Call extends Eventing {
|
|
|
1225
1225
|
this.initMediaConnection(localAudioTrack);
|
|
1226
1226
|
this.mediaRoapEventsListener();
|
|
1227
1227
|
this.mediaTrackListener();
|
|
1228
|
+
this.outputTrackUpdateListener(localAudioStream);
|
|
1228
1229
|
}
|
|
1229
1230
|
if (this.callStateMachine.state.value === 'S_SEND_CALL_PROGRESS') {
|
|
1230
1231
|
this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_CONNECT' });
|
|
@@ -1240,6 +1241,7 @@ export class Call extends Eventing {
|
|
|
1240
1241
|
this.initMediaConnection(localAudioTrack);
|
|
1241
1242
|
this.mediaRoapEventsListener();
|
|
1242
1243
|
this.mediaTrackListener();
|
|
1244
|
+
this.outputTrackUpdateListener(localAudioStream);
|
|
1243
1245
|
}
|
|
1244
1246
|
if (this.mediaStateMachine.state.value === 'S_ROAP_IDLE') {
|
|
1245
1247
|
this.sendMediaStateMachineEvt({ type: 'E_SEND_ROAP_OFFER' });
|
|
@@ -1506,6 +1508,11 @@ export class Call extends Eventing {
|
|
|
1506
1508
|
}
|
|
1507
1509
|
});
|
|
1508
1510
|
}
|
|
1511
|
+
outputTrackUpdateListener(localAudioStream) {
|
|
1512
|
+
localAudioStream.on(LocalStreamEventNames.OutputTrackChange, (track) => {
|
|
1513
|
+
this.mediaConnection.updateLocalTracks({ audio: track });
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1509
1516
|
async delete() {
|
|
1510
1517
|
const disconnectMetrics = await this.getCallStats();
|
|
1511
1518
|
return this.webex.request({
|
|
@@ -24,9 +24,6 @@ export class ContactsClient {
|
|
|
24
24
|
this.defaultGroupId = '';
|
|
25
25
|
log.setLogger(logger.level, CONTACTS_FILE);
|
|
26
26
|
}
|
|
27
|
-
getSDKConnector() {
|
|
28
|
-
return this.sdkConnector;
|
|
29
|
-
}
|
|
30
27
|
async decryptContactDetail(encryptionKeyUrl, contactDetails) {
|
|
31
28
|
const decryptedContactDetail = [...contactDetails];
|
|
32
29
|
const decryptedValues = await Promise.all(decryptedContactDetail.map((detail) => this.webex.internal.encryption.decryptText(encryptionKeyUrl, detail.value)));
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CallHistory } from './CallHistory/CallHistory';
|
|
2
|
+
import { CallSettings } from './CallSettings/CallSettings';
|
|
3
|
+
import { CallingClient } from './CallingClient/CallingClient';
|
|
4
|
+
import { ContactsClient } from './Contacts/ContactsClient';
|
|
5
|
+
import { Voicemail } from './Voicemail/Voicemail';
|
|
6
|
+
export { CallHistory, CallSettings, CallingClient, ContactsClient, Voicemail };
|
package/dist/module/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createMicrophoneStream } from '@webex/media-helpers';
|
|
1
|
+
import { NoiseReductionEffect, createMicrophoneStream } from '@webex/media-helpers';
|
|
2
2
|
import { createCallSettingsClient } from './CallSettings/CallSettings';
|
|
3
3
|
import { createContactsClient } from './Contacts/ContactsClient';
|
|
4
4
|
import { createClient } from './CallingClient/CallingClient';
|
|
5
5
|
import { createCallHistoryClient } from './CallHistory/CallHistory';
|
|
6
6
|
import { createVoicemailClient } from './Voicemail/Voicemail';
|
|
7
7
|
import Logger from './Logger';
|
|
8
|
-
export { createClient, createCallHistoryClient,
|
|
8
|
+
export { createClient, createCallHistoryClient, createCallSettingsClient, createContactsClient, createMicrophoneStream, createVoicemailClient, Logger, NoiseReductionEffect, };
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test:style": "eslint 'src/**/*.ts'",
|
|
32
32
|
"fix:lint": "eslint 'src/**/*.ts' --fix",
|
|
33
33
|
"fix:prettier": "prettier \"src/**/*.ts\" --write",
|
|
34
|
-
"build:docs": "typedoc --out docs/",
|
|
34
|
+
"build:docs": "typedoc --out ../../docs/calling",
|
|
35
35
|
"docs": "typedoc --emit none",
|
|
36
36
|
"deploy:npm": "npm publish"
|
|
37
37
|
},
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"sinon": "12.0.1",
|
|
98
98
|
"ts-jest": "27.1.4",
|
|
99
99
|
"typed-emitter": "2.1.0",
|
|
100
|
-
"typedoc": "0.
|
|
100
|
+
"typedoc": "0.23.26",
|
|
101
101
|
"typescript": "4.9.5"
|
|
102
102
|
},
|
|
103
103
|
"commitlint": {
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"staticpath": "docs",
|
|
130
130
|
"noprompt": true
|
|
131
131
|
},
|
|
132
|
-
"version": "0.0.1-next.
|
|
132
|
+
"version": "0.0.1-next.9"
|
|
133
133
|
}
|