mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-31 12:47:58 +00:00
✨(perf) hide main layout when pip is open
avoid rendering main video tiles while pip is active
This commit is contained in:
@@ -35,6 +35,7 @@ import { useVideoResolutionSubscription } from '../hooks/useVideoResolutionSubsc
|
|||||||
import { SettingsDialogProvider } from '@/features/settings/components/SettingsDialogProvider'
|
import { SettingsDialogProvider } from '@/features/settings/components/SettingsDialogProvider'
|
||||||
import { IsIdleDisconnectModal } from '../components/IsIdleDisconnectModal'
|
import { IsIdleDisconnectModal } from '../components/IsIdleDisconnectModal'
|
||||||
import { RoomPiP } from '@/features/pip/components/RoomPiP'
|
import { RoomPiP } from '@/features/pip/components/RoomPiP'
|
||||||
|
import { useRoomPiP } from '@/features/pip/hooks/useRoomPiP'
|
||||||
import { getParticipantName } from '@/features/rooms/utils/getParticipantName'
|
import { getParticipantName } from '@/features/rooms/utils/getParticipantName'
|
||||||
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
|
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
|
||||||
import { ReactionPortals } from '@/features/reactions/components/ReactionPortals'
|
import { ReactionPortals } from '@/features/reactions/components/ReactionPortals'
|
||||||
@@ -228,6 +229,9 @@ export function VideoConference({ ...props }: VideoConferenceProps) {
|
|||||||
])
|
])
|
||||||
/* eslint-enable react-hooks/exhaustive-deps */
|
/* eslint-enable react-hooks/exhaustive-deps */
|
||||||
|
|
||||||
|
const { isOpen: isPiPOpen } = useRoomPiP()
|
||||||
|
const shouldRenderMainLayout = !isPiPOpen
|
||||||
|
|
||||||
const [isShareErrorVisible, setIsShareErrorVisible] = useState(false)
|
const [isShareErrorVisible, setIsShareErrorVisible] = useState(false)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -249,6 +253,8 @@ export function VideoConference({ ...props }: VideoConferenceProps) {
|
|||||||
/>
|
/>
|
||||||
<IsIdleDisconnectModal />
|
<IsIdleDisconnectModal />
|
||||||
<RoomContentArea>
|
<RoomContentArea>
|
||||||
|
{shouldRenderMainLayout && (
|
||||||
|
<>
|
||||||
{!focusTrack ? (
|
{!focusTrack ? (
|
||||||
<div
|
<div
|
||||||
className="lk-grid-layout-wrapper"
|
className="lk-grid-layout-wrapper"
|
||||||
@@ -276,6 +282,8 @@ export function VideoConference({ ...props }: VideoConferenceProps) {
|
|||||||
</FocusLayoutContainer>
|
</FocusLayoutContainer>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</RoomContentArea>
|
</RoomContentArea>
|
||||||
<ControlBar
|
<ControlBar
|
||||||
onDeviceError={(e) => {
|
onDeviceError={(e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user