(feat): add call popout
This commit is contained in:
parent
18e507b439
commit
4f82b9c85b
6 changed files with 497 additions and 4 deletions
|
|
@ -109,6 +109,7 @@ type CallStore = {
|
|||
layoutVersion: number;
|
||||
screenRef: React.RefObject<HTMLDivElement | null> | null;
|
||||
runtime: Runtime | null;
|
||||
lastFocusedParticipantId: number | null;
|
||||
};
|
||||
|
||||
let _keyProvider: ExternalE2EEKeyProvider | null = null;
|
||||
|
|
@ -695,6 +696,7 @@ export function focusParticipant(
|
|||
) {
|
||||
useCall.setState({
|
||||
focusedParticipantId: participantId,
|
||||
lastFocusedParticipantId: participantId,
|
||||
focusedParticipantType: type,
|
||||
view: "focused",
|
||||
});
|
||||
|
|
@ -855,6 +857,7 @@ export async function disconnect() {
|
|||
watchedStreamParticipantIds: [],
|
||||
pendingWatchedParticipantIds: [],
|
||||
activeScreenShareParticipantIds: [],
|
||||
lastFocusedParticipantId: null,
|
||||
});
|
||||
|
||||
getRoom().remoteParticipants.forEach((participant) => {
|
||||
|
|
@ -1016,6 +1019,7 @@ export function resetCallState() {
|
|||
watchedStreamParticipantIds: [],
|
||||
pendingWatchedParticipantIds: [],
|
||||
activeScreenShareParticipantIds: [],
|
||||
lastFocusedParticipantId: null,
|
||||
});
|
||||
|
||||
syncParticipantState();
|
||||
|
|
@ -1076,6 +1080,7 @@ export const useCall = create<CallStore>(() => ({
|
|||
layoutVersion: 0,
|
||||
screenRef: null,
|
||||
runtime: null,
|
||||
lastFocusedParticipantId: null,
|
||||
}));
|
||||
|
||||
// Register app-level call listeners and wire React dependencies into the store.
|
||||
|
|
|
|||
Loading…
Reference in a new issue