From e667035910b68b3beef9cdebd8ad60fcd34c694c Mon Sep 17 00:00:00 2001 From: Kaustubh Kumar Date: Tue, 21 Nov 2023 11:05:50 +0530 Subject: [PATCH] fix: vb picker options --- .../src/Prebuilt/components/VirtualBackground/VBPicker.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/roomkit-react/src/Prebuilt/components/VirtualBackground/VBPicker.tsx b/packages/roomkit-react/src/Prebuilt/components/VirtualBackground/VBPicker.tsx index 96b50df908..6e156f285a 100644 --- a/packages/roomkit-react/src/Prebuilt/components/VirtualBackground/VBPicker.tsx +++ b/packages/roomkit-react/src/Prebuilt/components/VirtualBackground/VBPicker.tsx @@ -46,9 +46,7 @@ export const VBPicker = ({ background_media = [] }: VirtualBackground = {}) => { const roomState = useHMSStore(selectRoomState); const isLargeRoom = useHMSStore(selectIsLargeRoom); const addedPluginToVideoTrack = useRef(false); - const mediaList = background_media?.length - ? background_media.map((media: VirtualBackgroundMedia) => media?.url) - : defaultMedia; + const mediaList = [...background_media.map((media: VirtualBackgroundMedia) => media?.url), ...defaultMedia]; // Hidden in preview as the effect will be visible in the preview tile. Needed inside the room because the peer might not be on-screen const showVideoTile = isVideoOn && isLargeRoom && roomState !== HMSRoomState.Preview;