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 => {