mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-08 16:20:28 +03:00
Fix the view to correctly display the active iframe based on which is currently hosting the active call (juggling views)
This commit is contained in:
parent
d488c24974
commit
5ab0b39152
1 changed files with 3 additions and 2 deletions
|
|
@ -50,7 +50,8 @@ export function CallView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||
const screenSize = useScreenSizeContext();
|
||||
const isMobile = screenSize === ScreenSize.Mobile;
|
||||
|
||||
const activeIframeDisplayRef = isPrimaryIframe ? primaryIframeRef : backupIframeRef;
|
||||
const activeIframeDisplayRef =
|
||||
isViewingActiveCall && isPrimaryIframe ? primaryIframeRef : backupIframeRef;
|
||||
|
||||
const applyFixedPositioningToIframe = useCallback(() => {
|
||||
const iframeElement = activeIframeDisplayRef?.current;
|
||||
|
|
@ -97,7 +98,7 @@ export function CallView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||
const iframeElement = activeIframeDisplayRef?.current;
|
||||
const hostElement = iframeHostRef?.current;
|
||||
|
||||
if (!isPrimaryIframe || (isViewingActiveCall && iframeElement && hostElement)) {
|
||||
if (room.isCallRoom() || (isViewingActiveCall && iframeElement && hostElement)) {
|
||||
applyFixedPositioningToIframe();
|
||||
|
||||
const resizeObserver = new ResizeObserver(debouncedApplyFixedPositioning);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue