mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 02:43:25 +00:00
Add WebRTC connection manager and fix race condition
- Add RondevuConnection class for high-level WebRTC management - Handles offer/answer exchange, ICE candidates, and data channels - Fix race condition in answer() method (register answerer before sending ICE) - Add event-driven API (connecting, connected, disconnected, error, datachannel, track) - Update README with connection manager examples - Export new connection types and classes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
50
src/index.ts
50
src/index.ts
@@ -1,37 +1,31 @@
|
||||
/**
|
||||
* @xtr-dev/rondevu-client
|
||||
* WebRTC peer signaling and discovery client
|
||||
* WebRTC peer signaling and discovery client with topic-based discovery
|
||||
*/
|
||||
|
||||
// Export main WebRTC client class
|
||||
// Export main client class
|
||||
export { Rondevu } from './rondevu.js';
|
||||
export type { RondevuOptions } from './rondevu.js';
|
||||
|
||||
// Export connection class
|
||||
export { RondevuConnection } from './connection.js';
|
||||
// Export authentication
|
||||
export { RondevuAuth } from './auth.js';
|
||||
export type { Credentials, FetchFunction } from './auth.js';
|
||||
|
||||
// Export low-level signaling API (for advanced usage)
|
||||
export { RondevuAPI } from './client.js';
|
||||
|
||||
// Export all types
|
||||
// Export offers API
|
||||
export { RondevuOffers } from './offers.js';
|
||||
export type {
|
||||
// WebRTC types
|
||||
RondevuOptions,
|
||||
ConnectionRole,
|
||||
RondevuConnectionParams,
|
||||
RondevuConnectionEvents,
|
||||
WebRTCPolyfill,
|
||||
// Signaling types
|
||||
Side,
|
||||
CreateOfferRequest,
|
||||
CreateOfferResponse,
|
||||
AnswerRequest,
|
||||
AnswerResponse,
|
||||
PollRequest,
|
||||
PollOffererResponse,
|
||||
PollAnswererResponse,
|
||||
PollResponse,
|
||||
VersionResponse,
|
||||
HealthResponse,
|
||||
ErrorResponse,
|
||||
RondevuClientOptions,
|
||||
} from './types.js';
|
||||
Offer,
|
||||
IceCandidate,
|
||||
TopicInfo
|
||||
} from './offers.js';
|
||||
|
||||
// Export bloom filter
|
||||
export { BloomFilter } from './bloom.js';
|
||||
|
||||
// Export connection manager
|
||||
export { RondevuConnection } from './connection.js';
|
||||
export type {
|
||||
ConnectionOptions,
|
||||
RondevuConnectionEvents
|
||||
} from './connection.js';
|
||||
|
||||
Reference in New Issue
Block a user