diff --git a/src/frontend/src/features/rooms/livekit/components/ScreenShareVideoTrack.tsx b/src/frontend/src/features/rooms/livekit/components/ScreenShareVideoTrack.tsx new file mode 100644 index 00000000..5bafb478 --- /dev/null +++ b/src/frontend/src/features/rooms/livekit/components/ScreenShareVideoTrack.tsx @@ -0,0 +1,26 @@ +import { VideoTrack } from '@livekit/components-react' +import { type TrackReference } from '@livekit/components-core' +import { memo } from 'react' + +interface ScreenShareVideoTrackProps { + trackRef: TrackReference + onSubscriptionStatusChanged: (subscribed: boolean) => void + manageSubscription?: boolean +} + +// Zoom/pan updates the wrapper transform only; skip VideoTrack re-renders. +export const ScreenShareVideoTrack = memo( + ({ + trackRef, + onSubscriptionStatusChanged, + manageSubscription, + }: ScreenShareVideoTrackProps) => ( + + ) +) + +ScreenShareVideoTrack.displayName = 'ScreenShareVideoTrack' diff --git a/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomableVideo.tsx b/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomableVideo.tsx index bfbf2d77..68ca349a 100644 --- a/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomableVideo.tsx +++ b/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomableVideo.tsx @@ -1,11 +1,11 @@ import { css } from '@/styled-system/css' -import { VideoTrack } from '@livekit/components-react' import { type TrackReference } from '@livekit/components-core' import { useEffect, useRef } from 'react' import { useTranslation } from 'react-i18next' import { useScreenShareZoom } from '../hooks/useScreenShareZoom' import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce' import { ScreenShareZoomControls } from './ScreenShareZoomControls' +import { ScreenShareVideoTrack } from './ScreenShareVideoTrack' interface ScreenShareZoomableVideoProps { trackRef: TrackReference @@ -86,7 +86,7 @@ export const ScreenShareZoomableVideo = ({ transition: zoom.isDragging ? 'none' : 'transform 150ms ease-out', }} > -