Add RTC configuration example to README

- Demonstrate how to configure `rtcConfig` with ICE servers in Rondevu constructor.
This commit is contained in:
2025-11-08 10:40:53 +01:00
parent 9df9966381
commit 7831e03af1

View File

@@ -19,7 +19,21 @@ npm install @xtr-dev/rondevu-client
```typescript ```typescript
import { Rondevu } from '@xtr-dev/rondevu-client'; import { Rondevu } from '@xtr-dev/rondevu-client';
const rdv = new Rondevu({ baseUrl: 'https://server.com' }); const rdv = new Rondevu({
baseUrl: 'https://server.com',
rtcConfig: {
iceServers: [
// your ICE servers here
{ urls: 'stun:stun.l.google.com:19302' },
{ urls: 'stun:stun1.l.google.com:19302' },
{
urls: 'turn:relay1.example.com:3480',
username: 'example',
credential: 'example'
}
]
}
});
// Connect by topic // Connect by topic
const conn = await rdv.join('room'); const conn = await rdv.join('room');