@maxverse/media-web-sdk
Version:
48 lines (47 loc) • 2.11 kB
TypeScript
import { RoomOptions } from 'livekit-client';
import { TargetParticipant } from '../participant/targetParticipant';
export interface Config extends RoomOptions {
isVideoEnabled?: boolean;
isAudioEnabled?: boolean;
videoDeviceId?: string;
audioDeviceId?: string;
}
export declare type OnParticipantConnected = (targetParticipant: TargetParticipant) => void;
export declare type OnParticipantDisconnected = (targetParticipant: TargetParticipant) => void;
export declare type OnConnectionStateChanged = (currentConnectionInfo: CurrentConnectionInfo) => void;
export declare type OnPresenterUpdated = (targetParticipant: TargetParticipant) => void;
export declare type OnLocalTrackUpdated = (targetParticipant: TargetParticipant) => void;
export declare type OnRemoteTrackUpdated = (targetParticipant: TargetParticipant) => void;
export declare type OnTrackSwitched = (targetParticipant: TargetParticipant) => void;
export interface RoomHandler {
onParticipantConnected?: OnParticipantConnected;
onParticipantDisconnected?: OnParticipantDisconnected;
onConnectionStateChanged?: OnConnectionStateChanged;
onPresenterUpdated?: OnPresenterUpdated;
}
export interface ParticipantHandler {
onLocalVideoUpdated?: OnLocalTrackUpdated;
onLocalAudioUpdated?: OnLocalTrackUpdated;
onLocalScreenShareUpdated?: OnLocalTrackUpdated;
onRemoteVideoUpdated?: OnRemoteTrackUpdated;
onRemoteAudioUpdated?: OnRemoteTrackUpdated;
onRemoteScreenShareUpdated?: OnRemoteTrackUpdated;
onVideoSwitched?: OnTrackSwitched;
onAudioSwitched?: OnTrackSwitched;
}
export declare enum InitialConnectionStatus {
CONNECTION_SUCCESS = "CONNECTION_SUCCESS",
CONNECTION_FAIL = "CONNECTION_FAIL",
PREPARE_CONNECTION_SUCCESS = "PREPARE_CONNECTION_SUCCESS",
PREPARE_CONNECTION_FAIL = "PREPARE_CONNECTION_FAIL"
}
export declare enum ConnectionState {
Disconnected = "disconnected",
Connecting = "connecting",
Connected = "connected",
Reconnecting = "reconnecting"
}
export interface CurrentConnectionInfo {
roomId: string;
status: ConnectionState;
}