Skip to content

Commit

Permalink
console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesBurnside authored Jan 30, 2024
1 parent b4a9de8 commit 135fcd6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-components/src/components/LocalVideoTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import {
import { VideoTile, VideoTileStylesProps } from './VideoTile';
/* @conditional-compile-remove(raise-hand) */
import { RaisedHand } from '../types';

let i = 0;

/**
* A memoized version of VideoTile for rendering local participant.
*
Expand Down Expand Up @@ -64,6 +67,8 @@ export const _LocalVideoTile = React.memo(
raisedHand
} = props;

console.log('LocalVideoTile re-rendered', i++);

const localVideoStreamProps: LocalVideoStreamLifecycleMaintainerProps = useMemo(
() => ({
isMirrored: localVideoViewOptions?.isMirrored,
Expand Down
4 changes: 4 additions & 0 deletions packages/react-components/src/components/RemoteVideoTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { _formatString } from '@internal/acs-ui-common';
/* @conditional-compile-remove(hide-attendee-name) */
import { useLocale } from '../localization';

let i = 0;

/**
* A memoized version of VideoTile for rendering remote participants. React.memo is used for a performance
* boost by memoizing the same rendered component to avoid rerendering a VideoTile when its position in the
Expand Down Expand Up @@ -87,6 +89,8 @@ export const _RemoteVideoTile = React.memo(
strings
} = props;

console.log('RemoteVideoTile re-rendered', i++);

const remoteVideoStreamProps: RemoteVideoStreamLifecycleMaintainerProps = useMemo(
() => ({
isMirrored: remoteVideoViewOptions?.isMirrored,
Expand Down
5 changes: 5 additions & 0 deletions packages/react-components/src/components/VideoGallery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ export interface VideoTileDrawerMenuProps {
*/
hostId?: string;
}

let i = 0;

/**
* VideoGallery represents a layout of video tiles for a specific call.
* It displays a {@link VideoTile} for the local user as well as for each remote participant who has joined the call.
Expand Down Expand Up @@ -353,6 +356,8 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
localVideoTileSize = 'followDeviceOrientation'
} = props;

console.log('VideoGallery re-rendered', i++);

const ids = useIdentifiers();
const theme = useTheme();
const localeStrings = useLocale().strings.videoGallery;
Expand Down

0 comments on commit 135fcd6

Please sign in to comment.