mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 02:43:25 +00:00
Rename methods to match WebRTC terminology
- Rename create() → offer() to align with WebRTC offer creation - Rename connect() → answer() to align with WebRTC answer handling - Update README with new method names and examples - Version 0.3.3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
14
README.md
14
README.md
@@ -39,11 +39,11 @@ const rdv = new Rondevu({
|
||||
}
|
||||
});
|
||||
|
||||
// Create a connection with custom ID
|
||||
const connection = await rdv.create('my-room-123');
|
||||
// Create an offer with custom ID
|
||||
const connection = await rdv.offer('my-room-123');
|
||||
|
||||
// Or connect to an existing connection
|
||||
const connection = await rdv.connect('my-room-123');
|
||||
// Or answer an existing offer
|
||||
const connection = await rdv.answer('my-room-123');
|
||||
|
||||
// Use data channels
|
||||
connection.on('connect', () => {
|
||||
@@ -77,7 +77,7 @@ const rdv = new Rondevu({
|
||||
}
|
||||
});
|
||||
|
||||
const connection = await rdv.create('my-room-123');
|
||||
const connection = await rdv.offer('my-room-123');
|
||||
|
||||
connection.on('connect', () => {
|
||||
const channel = connection.dataChannel('chat');
|
||||
@@ -88,8 +88,8 @@ connection.on('connect', () => {
|
||||
### API
|
||||
|
||||
**Main Methods:**
|
||||
- `rdv.create(id)` - Create connection with custom ID
|
||||
- `rdv.connect(id)` - Connect to existing connection by ID
|
||||
- `rdv.offer(id)` - Create an offer with custom ID
|
||||
- `rdv.answer(id)` - Answer an existing offer by ID
|
||||
|
||||
**Connection Events:**
|
||||
- `connect` - Connection established
|
||||
|
||||
Reference in New Issue
Block a user