mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 10:53:24 +00:00
Add RTC configuration example to README
- Demonstrate how to configure `rtcConfig` with ICE servers in Rondevu constructor.
This commit is contained in:
16
README.md
16
README.md
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user