1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Use MatrixClient as type

and different array syntax
This commit is contained in:
David Baker
2020-10-09 17:20:01 +01:00
parent f518ea95f4
commit e6155f9e37

View File

@@ -18,18 +18,19 @@ import MatrixEvent from '../models/event';
import {logger} from '../logger';
import { createNewMatrixCall, MatrixCall, CallErrorCode, CallState, CallDirection } from './call';
import { EventType } from '../@types/event';
import { MatrixClient } from '../client';
// Don't ring unless we'd be ringing for at least 3 seconds: the user needs some
// time to press the 'accept' button
const RING_GRACE_PERIOD = 3000;
export class CallEventHandler {
client: any;
client: MatrixClient;
calls: Map<string, MatrixCall>;
callEventBuffer: Array<MatrixEvent>;
callEventBuffer: MatrixEvent[];
candidatesByCall: Map<string, Array<RTCIceCandidate>>;
constructor(client: any) {
constructor(client: MatrixClient) {
this.client = client;
this.calls = new Map<string, MatrixCall>();
// The sync code always emits one event at a time, so it will patiently