matrix-js-sdk
Version:
Matrix Client-Server SDK for Javascript
40 lines • 1.54 kB
TypeScript
import { MatrixClient } from "../client";
import { TypedEventEmitter } from "../models/typed-event-emitter";
import { Room } from "../models/room";
import { MatrixRTCSession } from "./MatrixRTCSession";
export declare enum MatrixRTCSessionManagerEvents {
SessionStarted = "session_started",
SessionEnded = "session_ended"
}
type EventHandlerMap = {
[MatrixRTCSessionManagerEvents.SessionStarted]: (roomId: string, session: MatrixRTCSession) => void;
[MatrixRTCSessionManagerEvents.SessionEnded]: (roomId: string, session: MatrixRTCSession) => void;
};
/**
* Holds all active MatrixRTC session objects and creates new ones as events arrive.
* This interface is UNSTABLE and may change without warning.
*/
export declare class MatrixRTCSessionManager extends TypedEventEmitter<MatrixRTCSessionManagerEvents, EventHandlerMap> {
private client;
private roomSessions;
constructor(client: MatrixClient);
start(): void;
stop(): void;
/**
* Gets the main MatrixRTC session for a room, or undefined if there is
* no current session
*/
getActiveRoomSession(room: Room): MatrixRTCSession | undefined;
/**
* Gets the main MatrixRTC session for a room, returning an empty session
* if no members are currently participating
*/
getRoomSession(room: Room): MatrixRTCSession;
private consumeCallEncryptionEvent;
private onTimeline;
private onRoom;
private onRoomState;
private refreshRoom;
}
export {};
//# sourceMappingURL=MatrixRTCSessionManager.d.ts.map