fleeta-api-lib
Version:
A comprehensive library for fleet management applications - API, Auth, Device management
60 lines • 1.76 kB
TypeScript
/**
* WebRTC Factory
* Factory pattern for creating WebRTC-related objects with dependency injection
*/
import { WebRTCConnection } from './WebRTCConnection';
import { AudioManager } from './AudioManager';
import { ConnectionStateMachine } from './ConnectionStateMachine';
import type { WebRTCConnectionConfig } from './WebRTCProvider';
/**
* WebRTC dependency interface for testing and flexibility
*/
export interface WebRTCDependencies {
mediaDevices?: MediaDevices;
RTCPeerConnection?: typeof RTCPeerConnection;
webrtcSDK?: any;
console?: Console;
}
/**
* WebRTC Factory class
* Creates WebRTC objects with proper dependency injection
*/
export declare class WebRTCFactory {
private dependencies;
constructor(dependencies?: WebRTCDependencies);
/**
* Create WebRTC Connection with injected dependencies
*/
createConnection(config: WebRTCConnectionConfig): WebRTCConnection;
/**
* Create Audio Manager
*/
createAudioManager(): AudioManager;
/**
* Create Connection State Machine
*/
createStateMachine(): ConnectionStateMachine;
/**
* Create RTCPeerConnection with ICE servers
*/
createPeerConnection(iceServers: any[]): RTCPeerConnection;
/**
* Create SignalingClient with custom signer
*/
createSignalingClient(config: {
url: string;
region: string;
channelARN: string;
clientId: string;
channelEndpoint: string;
}): any;
/**
* Validate required dependencies
*/
private validateDependencies;
/**
* Update dependencies (useful for testing)
*/
updateDependencies(newDependencies: Partial<WebRTCDependencies>): void;
}
//# sourceMappingURL=WebRTCFactory.d.ts.map