1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-30 02:21:17 +03:00

New group call experience: Starting and ending calls (#9318)

* Create m.room calls in video rooms, and m.prompt calls otherwise

* Terminate a call when the last person leaves

* Hook up the room header button to a unified CallView component

* Write more tests
This commit is contained in:
Robin
2022-09-27 07:54:51 -04:00
committed by GitHub
parent 54b79c7667
commit ace6591f43
15 changed files with 695 additions and 512 deletions

View File

@ -156,6 +156,16 @@ export class CallStore extends AsyncStoreWithClient<{}> {
return this.calls.get(roomId) ?? null;
}
/**
* Determines whether the given room has an active call.
* @param roomId The room's ID.
* @returns Whether the given room has an active call.
*/
public hasActiveCall(roomId: string): boolean {
const call = this.get(roomId);
return call !== null && this.activeCalls.has(call);
}
private onRoom = (room: Room) => this.updateRoom(room);
private onRoomState = (event: MatrixEvent, state: RoomState) => {