From 0507250b81f8c453379026a62675ee19ca451082 Mon Sep 17 00:00:00 2001 From: raviteja83 Date: Fri, 11 Aug 2023 13:24:06 +0530 Subject: [PATCH] fix: pin over spotlight --- apps/100ms-web/src/components/AppData/useUISettings.js | 2 +- .../src/Prebuilt/components/AppData/useUISettings.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/100ms-web/src/components/AppData/useUISettings.js b/apps/100ms-web/src/components/AppData/useUISettings.js index 0b019779fa..f39c484e4c 100644 --- a/apps/100ms-web/src/components/AppData/useUISettings.js +++ b/apps/100ms-web/src/components/AppData/useUISettings.js @@ -125,7 +125,7 @@ export const usePinnedTrack = () => { )?.id; return useHMSStore( selectTrackByID( - spotlightVideoTrackId || spotlightAudioTrackId || pinnedTrackId + pinnedTrackId || spotlightVideoTrackId || spotlightAudioTrackId ) ); }; diff --git a/packages/roomkit-react/src/Prebuilt/components/AppData/useUISettings.js b/packages/roomkit-react/src/Prebuilt/components/AppData/useUISettings.js index fe3cd90b3d..b1b3ee4d93 100644 --- a/packages/roomkit-react/src/Prebuilt/components/AppData/useUISettings.js +++ b/packages/roomkit-react/src/Prebuilt/components/AppData/useUISettings.js @@ -91,7 +91,7 @@ export const usePinnedTrack = () => { const spotlightPeerId = useHMSStore(selectSessionStore(SESSION_STORE_KEY.SPOTLIGHT)); const spotlightVideoTrackId = useHMSStore(selectVideoTrackByPeerID(spotlightPeerId))?.id; const spotlightAudioTrackId = useHMSStore(selectAudioTrackByPeerID(spotlightPeerId))?.id; - return useHMSStore(selectTrackByID(spotlightVideoTrackId || spotlightAudioTrackId || pinnedTrackId)); + return useHMSStore(selectTrackByID(pinnedTrackId || spotlightVideoTrackId || spotlightAudioTrackId)); }; export const useSubscribedNotifications = notificationKey => {