Skip to content

Commit

Permalink
add missing events from reemitter to GroupCall (#2527)
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 authored Jul 25, 2022
1 parent e876482 commit 38a6949
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/webrtc/groupCall.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { TypedEventEmitter } from "../models/typed-event-emitter";
import { CallFeed, SPEAKING_THRESHOLD } from "./callFeed";
import { MatrixClient } from "../client";
import { CallErrorCode, CallEvent, CallState, genCallID, MatrixCall, setTracksEnabled } from "./call";
import { CallErrorCode,
CallEvent,
CallEventHandlerMap,
CallState,
genCallID,
MatrixCall,
setTracksEnabled,
} from "./call";
import { RoomMember } from "../models/room-member";
import { Room } from "../models/room";
import { logger } from "../logger";
Expand Down Expand Up @@ -146,7 +153,10 @@ function getCallUserId(call: MatrixCall): string | null {
return call.getOpponentMember()?.userId || call.invitee || null;
}

export class GroupCall extends TypedEventEmitter<GroupCallEvent, GroupCallEventHandlerMap> {
export class GroupCall extends TypedEventEmitter<
GroupCallEvent | CallEvent,
GroupCallEventHandlerMap & CallEventHandlerMap
> {
// Config
public activeSpeakerInterval = 1000;
public retryCallInterval = 5000;
Expand Down

0 comments on commit 38a6949

Please sign in to comment.