fleeta-api-lib
Version:
A comprehensive library for fleet management applications - API, Auth, Device management
159 lines • 5.25 kB
TypeScript
/**
* Multi-Device Provider
* 다중 디바이스 WebRTC 스트리밍의 최상위 관리자
* 여러 디바이스의 라이프사이클과 인증을 총괄 관리
*/
import { DeviceStreamManager } from './DeviceStreamManager';
import type { MultiDeviceProviderConfig, MultiDeviceProviderEvents, MultiDeviceStats, VoiceCommState, TwoWayAudioStatus } from './types';
/**
* Multi-Device Provider Class
* 여러 디바이스의 스트리밍을 통합 관리하는 최상위 Provider
*/
export declare class MultiDeviceProvider {
private config;
private isInitialized;
private sdkLoader;
private deviceManagers;
private globalStats;
private statsTimer;
private events;
/**
* Create Multi-Device Provider instance
* @param config - Provider configuration
*/
constructor(config?: Partial<MultiDeviceProviderConfig>);
/**
* Initialize the provider
* 프로바이더 초기화 및 통계 모니터링 시작
*/
initialize(): Promise<void>;
/**
* Add a new device to the provider
* 새 디바이스를 Provider에 추가
* @param psn - Device PSN to add
* @param initialChannel - Initial channel for the device
* @returns Device stream manager instance
*/
addDevice(psn: string, initialChannel?: import('./types').CameraChannel): Promise<DeviceStreamManager>;
/**
* Remove a device from the provider
* 디바이스를 Provider에서 제거
* @param psn - Device PSN to remove
*/
removeDevice(psn: string): Promise<void>;
/**
* Get device manager for a specific PSN
* 특정 PSN의 디바이스 매니저 조회
* @param psn - Device PSN
* @returns Device stream manager or null
*/
getDeviceManager(psn: string): DeviceStreamManager | null;
/**
* Get all device managers
* 모든 디바이스 매니저 목록 조회
* @returns Array of device stream managers
*/
getAllDevices(): DeviceStreamManager[];
/**
* Get list of all device PSNs
* 모든 디바이스 PSN 목록 조회
* @returns Array of device PSNs
*/
getDevicePSNs(): string[];
/**
* Connect all devices
* 모든 디바이스 연결
*/
connectAllDevices(): Promise<void>;
/**
* Disconnect all devices
* 모든 디바이스 연결 해제
*/
disconnectAllDevices(): Promise<void>;
/**
* Start voice communication for a specific device
* 특정 디바이스의 음성 통신 시작
* @param psn - Device PSN
* @returns Promise with two-way audio status
*/
startVoiceComm(psn: string): Promise<TwoWayAudioStatus>;
/**
* Stop voice communication for a specific device
* 특정 디바이스의 음성 통신 중지
* @param psn - Device PSN
* @returns Promise with two-way audio status
*/
stopVoiceComm(psn: string): Promise<TwoWayAudioStatus>;
/**
* Stop all active voice communications
* 모든 활성 음성 통신 중지
*/
stopAllVoiceComm(): Promise<void>;
/**
* Set local audio enabled for a specific device
* 특정 디바이스의 로컬 오디오 활성화/비활성화
* @param psn - Device PSN
* @param enabled - Audio enabled state
*/
setLocalAudioEnabled(psn: string, enabled: boolean): void;
/**
* Set remote audio volume for a specific device
* 특정 디바이스의 원격 오디오 볼륨 설정
* @param psn - Device PSN
* @param volume - Volume level (0.0 to 1.0)
*/
setRemoteAudioVolume(psn: string, volume: number): void;
/**
* Get voice communication state for a specific device
* 특정 디바이스의 음성 통신 상태 조회
* @param psn - Device PSN
* @returns Voice communication state or null
*/
getVoiceCommState(psn: string): VoiceCommState | null;
/**
* Get global statistics
* 전체 통계 정보 조회
* @returns Global multi-device statistics
*/
getGlobalStats(): MultiDeviceStats;
/**
* Set event callbacks
* 이벤트 콜백 등록
* @param events - Event callback functions
*/
setEvents(events: MultiDeviceProviderEvents): void;
/**
* Update provider configuration
* Provider 설정 업데이트
* @param config - New configuration values
*/
updateConfig(config: Partial<MultiDeviceProviderConfig>): void;
/**
* Destroy provider and cleanup all resources
* Provider 파괴 및 모든 리소스 정리
*/
destroy(): Promise<void>;
/**
* Setup event handlers for a device manager
* 디바이스 매니저의 이벤트 핸들러 설정
* @param psn - Device PSN
* @param manager - Device stream manager
*/
private setupDeviceEventHandlers;
/**
* Update global statistics
* 전체 통계 업데이트
*/
private updateGlobalStats;
/**
* Start statistics monitoring
* 통계 모니터링 시작
*/
private startStatisticsMonitoring;
/**
* Stop statistics monitoring
* 통계 모니터링 중지
*/
private stopStatisticsMonitoring;
}
//# sourceMappingURL=MultiDeviceProvider.d.ts.map