@100mslive/hms-video-store
Version:
@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow
36 lines (35 loc) • 1.02 kB
TypeScript
import { HMSWebrtcStats } from './HMSWebrtcStats';
import { EventBus } from '../events/EventBus';
import { Store } from '../sdk/store';
export declare class HMSWebrtcInternals {
private readonly store;
private readonly eventBus;
private readonly TAG;
private readonly interval;
private isMonitored;
private hmsStats?;
constructor(store: Store, eventBus: EventBus);
getCurrentStats(): HMSWebrtcStats | undefined;
getPublishPeerConnection(): RTCPeerConnection | undefined;
getSubscribePeerConnection(): RTCPeerConnection | undefined;
onStatsChange(statsChangeCb: (stats: HMSWebrtcStats) => void): () => void;
private handleStatsUpdate;
/**
*
* @internal
*/
setPeerConnections({ publish, subscribe }: {
publish?: RTCPeerConnection;
subscribe?: RTCPeerConnection;
}): void;
/**
* @internal
*/
start(): Promise<void>;
private stop;
private startLoop;
/**
* @internal
*/
cleanup(): void;
}