uniwrtc 1.0.0 → 1.0.1
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 +17 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,19 +16,21 @@ A universal WebRTC signaling service that provides a simple and flexible WebSock
|
|
|
16
16
|
|
|
17
17
|
### Installation
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
#### From npm (recommended)
|
|
20
20
|
```bash
|
|
21
|
-
|
|
22
|
-
cd UniWRTC
|
|
21
|
+
npm install uniwrtc
|
|
23
22
|
```
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
Run the bundled server locally (installed binary is `uniwrtc` via npm scripts):
|
|
26
25
|
```bash
|
|
27
|
-
|
|
26
|
+
npx uniwrtc start # or: node server.js if using the cloned repo
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
#### From source
|
|
31
30
|
```bash
|
|
31
|
+
git clone https://github.com/draeder/UniWRTC.git
|
|
32
|
+
cd UniWRTC
|
|
33
|
+
npm install
|
|
32
34
|
npm start
|
|
33
35
|
```
|
|
34
36
|
|
|
@@ -160,6 +162,15 @@ The signaling server accepts WebSocket connections and supports the following me
|
|
|
160
162
|
|
|
161
163
|
### Client Library Usage
|
|
162
164
|
|
|
165
|
+
Use directly from npm:
|
|
166
|
+
```javascript
|
|
167
|
+
// ESM
|
|
168
|
+
import { UniWRTCClient } from 'uniwrtc/client-browser.js';
|
|
169
|
+
// or CommonJS
|
|
170
|
+
const { UniWRTCClient } = require('uniwrtc/client-browser.js');
|
|
171
|
+
// For Node.js signaling client use 'uniwrtc/client.js'
|
|
172
|
+
```
|
|
173
|
+
|
|
163
174
|
The `client.js` library provides a convenient wrapper for the signaling protocol:
|
|
164
175
|
|
|
165
176
|
```javascript
|