sceyt-call 1.0.6 → 1.0.7
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 +38 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Sceyt Call SDK
|
|
2
2
|
|
|
3
|
-
JavaScript SDK for real-time voice and video calls with WebRTC.
|
|
3
|
+
JavaScript SDK for real-time voice and video calls with WebRTC. This SDK works alongside the [SceytChat SDK](https://www.npmjs.com/package/sceyt-chat) to provide calling functionality.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
* [Installation](#installation)
|
|
8
|
+
* [Prerequisites](#prerequisites)
|
|
9
|
+
* [Quick Start](#quick-start)
|
|
10
|
+
* [Media Flow Types](#media-flow-types)
|
|
11
|
+
* [Call Methods](#call-methods)
|
|
12
|
+
* [Call Events](#call-events)
|
|
13
|
+
* [Client Events](#client-events)
|
|
14
|
+
* [Call Management](#call-management)
|
|
15
|
+
* [Call History (CDR)](#call-history-cdr)
|
|
16
|
+
* [Participant States](#participant-states)
|
|
17
|
+
* [Logging](#logging)
|
|
18
|
+
* [TypeScript Support](#typescript-support)
|
|
19
|
+
* [License](#license)
|
|
4
20
|
|
|
5
21
|
## Installation
|
|
6
22
|
|
|
@@ -10,12 +26,29 @@ npm install sceyt-call
|
|
|
10
26
|
yarn add sceyt-call
|
|
11
27
|
```
|
|
12
28
|
|
|
29
|
+
## Prerequisites
|
|
30
|
+
|
|
31
|
+
The Sceyt Call SDK requires the [SceytChat SDK](https://www.npmjs.com/package/sceyt-chat) to be installed and connected before initializing the call client. The chat client handles authentication and signaling for calls.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npm install sceyt-chat
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import SceytChat from 'sceyt-chat';
|
|
39
|
+
|
|
40
|
+
const chatClient = new SceytChat('{apiUrl}', '{appId}', '{clientId}');
|
|
41
|
+
await chatClient.connect('{accessToken}');
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For detailed chat client setup, see the [sceyt-chat documentation](https://www.npmjs.com/package/sceyt-chat).
|
|
45
|
+
|
|
13
46
|
## Quick Start
|
|
14
47
|
|
|
15
48
|
```typescript
|
|
16
49
|
import SceytCallClient, { MediaFlow } from 'sceyt-call';
|
|
17
50
|
|
|
18
|
-
// Initialize with
|
|
51
|
+
// Initialize call client with connected chat client
|
|
19
52
|
const callClient = new SceytCallClient(chatClient);
|
|
20
53
|
|
|
21
54
|
// Listen for incoming calls
|
|
@@ -48,7 +81,7 @@ call.on('participantStateChanged', ({ participant, state }) => {
|
|
|
48
81
|
|------|-------------|----------|
|
|
49
82
|
| `MediaFlow.P2P` | Direct peer-to-peer connection | 1:1 calls |
|
|
50
83
|
| `MediaFlow.SFU` | Server-routed media (Selective Forwarding Unit) | Group calls |
|
|
51
|
-
| `MediaFlow.S2W` |
|
|
84
|
+
| `MediaFlow.S2W` | SIP-to-WebRTC media processing | 1:1 calls |
|
|
52
85
|
|
|
53
86
|
## Call Methods
|
|
54
87
|
|
|
@@ -166,7 +199,7 @@ records.forEach(record => {
|
|
|
166
199
|
## Logging
|
|
167
200
|
|
|
168
201
|
```typescript
|
|
169
|
-
|
|
202
|
+
callClient.onLog((entry) => {
|
|
170
203
|
console.log(`[${entry.level}] ${entry.prefix}: ${entry.message}`);
|
|
171
204
|
});
|
|
172
205
|
```
|
|
@@ -191,4 +224,4 @@ import type {
|
|
|
191
224
|
|
|
192
225
|
## License
|
|
193
226
|
|
|
194
|
-
|
|
227
|
+
See the [LICENSE](LICENSE.txt) file for details.
|