Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MatrixRTC: additional TS docs for IMembershipManager interface #4613

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions src/matrixrtc/MembershipManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,30 @@ import { MembershipConfig } from "./MatrixRTCSession.ts";
* @internal
*/
export interface IMembershipManager {
/**
* Returns true if we intend to be participating in the MatrixRTC session.
* This is determined by checking if the relativeExpiry has been set.
toger5 marked this conversation as resolved.
Show resolved Hide resolved
*/
isJoined(): boolean;
/**
* Start sending all necessary events to make this user participant in the RTC session.
* @param fociPreferred the list of preferred foci to use in the joined RTC membership event.
* @param fociActive the active focus to use in the joined RTC membership event.
*/
join(fociPreferred: Focus[], fociActive?: Focus): void;
/**
* Send all necessary events to make this user leave the RTC session
* @param timeout
toger5 marked this conversation as resolved.
Show resolved Hide resolved
*/
leave(timeout: number | undefined): Promise<boolean>;
/**
* call this if the MatrixRTC session members have changed
*/
onRTCSessionMemberUpdate(memberships: CallMembership[]): Promise<void>;
/**
* Returns the used active focus in the currently joined session.
* @returns undefined if not joined.
toger5 marked this conversation as resolved.
Show resolved Hide resolved
*/
getActiveFocus(): Focus | undefined;
}

Expand Down Expand Up @@ -102,10 +119,6 @@ export class LegacyMembershipManager implements IMembershipManager {
private getOldestMembership: () => CallMembership | undefined,
) {}

/*
* Returns true if we intend to be participating in the MatrixRTC session.
* This is determined by checking if the relativeExpiry has been set.
*/
public isJoined(): boolean {
return this.relativeExpiry !== undefined;
}
Expand Down
Loading