mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 02:43:25 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6057c3c582 | |||
| 255fe42a43 |
@@ -411,7 +411,8 @@ const offers = await client.offers.create([{
|
|||||||
sdp: 'v=0...', // Your WebRTC offer SDP
|
sdp: 'v=0...', // Your WebRTC offer SDP
|
||||||
topics: ['movie-xyz', 'hd-content'],
|
topics: ['movie-xyz', 'hd-content'],
|
||||||
ttl: 300000, // 5 minutes
|
ttl: 300000, // 5 minutes
|
||||||
secret: 'my-secret-password' // Optional: protect offer (max 128 chars)
|
secret: 'my-secret-password', // Optional: protect offer (max 128 chars)
|
||||||
|
info: 'Looking for peers in EU region' // Optional: public info (max 128 chars)
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
// Discover peers by topic
|
// Discover peers by topic
|
||||||
@@ -489,7 +490,8 @@ const offers = await client.offers.create([
|
|||||||
sdp: 'v=0...',
|
sdp: 'v=0...',
|
||||||
topics: ['topic-1', 'topic-2'],
|
topics: ['topic-1', 'topic-2'],
|
||||||
ttl: 300000, // optional, default 5 minutes
|
ttl: 300000, // optional, default 5 minutes
|
||||||
secret: 'my-secret-password' // optional, max 128 chars
|
secret: 'my-secret-password', // optional, max 128 chars
|
||||||
|
info: 'Looking for peers in EU region' // optional, public info, max 128 chars
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
```
|
```
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@xtr-dev/rondevu-client",
|
"name": "@xtr-dev/rondevu-client",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@xtr-dev/rondevu-client",
|
"name": "@xtr-dev/rondevu-client",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@xtr-dev/rondevu-client": "^0.5.1"
|
"@xtr-dev/rondevu-client": "^0.5.1"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@xtr-dev/rondevu-client",
|
"name": "@xtr-dev/rondevu-client",
|
||||||
"version": "0.7.10",
|
"version": "0.7.11",
|
||||||
"description": "TypeScript client for Rondevu topic-based peer discovery and signaling server",
|
"description": "TypeScript client for Rondevu topic-based peer discovery and signaling server",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export interface CreateOfferRequest {
|
|||||||
topics: string[];
|
topics: string[];
|
||||||
ttl?: number;
|
ttl?: number;
|
||||||
secret?: string;
|
secret?: string;
|
||||||
|
info?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Offer {
|
export interface Offer {
|
||||||
@@ -21,6 +22,7 @@ export interface Offer {
|
|||||||
lastSeen: number;
|
lastSeen: number;
|
||||||
secret?: string;
|
secret?: string;
|
||||||
hasSecret?: boolean;
|
hasSecret?: boolean;
|
||||||
|
info?: string;
|
||||||
answererPeerId?: string;
|
answererPeerId?: string;
|
||||||
answerSdp?: string;
|
answerSdp?: string;
|
||||||
answeredAt?: number;
|
answeredAt?: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user