forked from github/cinny
Sets initial states so the iframes don't cause the other to fail with the npm embedded package
This commit is contained in:
@@ -266,6 +266,7 @@ export function RoomNavItem({
|
||||
if (room.isCallRoom() && activeCallRoomId !== room.roomId) {
|
||||
hangUp();
|
||||
setActiveCallRoomId(room.roomId);
|
||||
setViewedCallRoomId(room.roomId);
|
||||
if (mx.getRoom(viewedRoomId)?.isCallRoom()) {
|
||||
navigateRoom(room.roomId);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,8 @@ export function PersistentCallContainer({ children }: PersistentCallContainerPro
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe);
|
||||
if ((activeCallRoomId && !viewedCallRoomId) || activeCallRoomId)
|
||||
setupWidget(primaryWidgetApiRef, primarySmallWidgetRef, primaryIframeRef, isPrimaryIframe);
|
||||
setupWidget(backupWidgetApiRef, backupSmallWidgetRef, backupIframeRef, !isPrimaryIframe);
|
||||
}, [
|
||||
setupWidget,
|
||||
|
||||
Reference in New Issue
Block a user