summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/webrtc/callEventHandler.d.ts
blob: 249a5188179811cc5fc28895a9aa908b86c9104f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { MatrixEvent } from "../models/event";
import { MatrixCall } from "./call";
import { MatrixClient } from "../client";
export declare enum CallEventHandlerEvent {
    Incoming = "Call.incoming"
}
export type CallEventHandlerEventHandlerMap = {
    /**
     * Fires whenever an incoming call arrives.
     * @param call - The incoming call.
     * @example
     * ```
     * matrixClient.on("Call.incoming", function(call){
     *   call.answer(); // auto-answer
     * });
     * ```
     */
    [CallEventHandlerEvent.Incoming]: (call: MatrixCall) => void;
};
export declare class CallEventHandler {
    calls: Map<string, MatrixCall>;
    callEventBuffer: MatrixEvent[];
    nextSeqByCall: Map<string, number>;
    toDeviceEventBuffers: Map<string, Array<MatrixEvent>>;
    private client;
    private candidateEventsByCall;
    private eventBufferPromiseChain?;
    constructor(client: MatrixClient);
    start(): void;
    stop(): void;
    private onSync;
    private evaluateEventBuffer;
    private onRoomTimeline;
    private onToDeviceEvent;
    private handleCallEvent;
}
//# sourceMappingURL=callEventHandler.d.ts.map