@xtr-dev/rondevu-client 0.7.7 → 0.7.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,4 +1,4 @@
1
- # @xtr-dev/rondevu-client
1
+ # Rondevu Client
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@xtr-dev/rondevu-client)](https://www.npmjs.com/package/@xtr-dev/rondevu-client)
4
4
 
@@ -7,8 +7,9 @@
7
7
  TypeScript/JavaScript client for Rondevu, providing topic-based peer discovery, stateless authentication, and complete WebRTC signaling with trickle ICE support.
8
8
 
9
9
  **Related repositories:**
10
- - [rondevu-server](https://github.com/xtr-dev/rondevu-server) - HTTP signaling server
11
- - [rondevu-demo](https://rondevu-demo.pages.dev) - Interactive demo
10
+ - [@xtr-dev/rondevu-client](https://github.com/xtr-dev/rondevu-client) - TypeScript client library ([npm](https://www.npmjs.com/package/@xtr-dev/rondevu-client))
11
+ - [@xtr-dev/rondevu-server](https://github.com/xtr-dev/rondevu-server) - HTTP signaling server ([npm](https://www.npmjs.com/package/@xtr-dev/rondevu-server), [live](https://api.ronde.vu))
12
+ - [@xtr-dev/rondevu-demo](https://github.com/xtr-dev/rondevu-demo) - Interactive demo ([live](https://ronde.vu))
12
13
 
13
14
  ---
14
15
 
@@ -58,6 +58,12 @@ export default class RondevuPeer extends EventEmitter<PeerEvents> {
58
58
  * Add a media track to the connection
59
59
  */
60
60
  addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender;
61
+ /**
62
+ * Create a data channel for sending and receiving arbitrary data
63
+ * This should typically be called by the offerer before creating the offer
64
+ * The answerer will receive the channel via the 'datachannel' event
65
+ */
66
+ createDataChannel(label: string, options?: RTCDataChannelInit): RTCDataChannel;
61
67
  /**
62
68
  * Close the connection and clean up
63
69
  */
@@ -123,6 +123,14 @@ export default class RondevuPeer extends EventEmitter {
123
123
  addTrack(track, ...streams) {
124
124
  return this.pc.addTrack(track, ...streams);
125
125
  }
126
+ /**
127
+ * Create a data channel for sending and receiving arbitrary data
128
+ * This should typically be called by the offerer before creating the offer
129
+ * The answerer will receive the channel via the 'datachannel' event
130
+ */
131
+ createDataChannel(label, options) {
132
+ return this.pc.createDataChannel(label, options);
133
+ }
126
134
  /**
127
135
  * Close the connection and clean up
128
136
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtr-dev/rondevu-client",
3
- "version": "0.7.7",
3
+ "version": "0.7.9",
4
4
  "description": "TypeScript client for Rondevu topic-based peer discovery and signaling server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",