@@ -22,14 +22,18 @@ import { memoizedConvertToVideoTileReaction } from './utils/participantListSelec
2222import { memoizedConvertAllremoteParticipantsBetaRelease } from './utils/participantListSelectorUtils' ;
2323/* @conditional -compile-remove(reaction) */
2424import { memoizedConvertAllremoteParticipantsBeta } from './utils/participantListSelectorUtils' ;
25+ /* @conditional -compile-remove(spotlight) */
26+ import { memoizedSpotlight } from './utils/participantListSelectorUtils' ;
2527/* @conditional -compile-remove(raise-hand) */
2628import { getLocalParticipantRaisedHand } from './baseSelectors' ;
2729/* @conditional -compile-remove(reaction) */
2830import { getLocalParticipantReactionState } from './baseSelectors' ;
31+ /* @conditional -compile-remove(spotlight) */
32+ import { getSpotlightedParticipants } from './baseSelectors' ;
2933import { toFlatCommunicationIdentifier } from '@internal/acs-ui-common' ;
3034import { getParticipantCount } from './baseSelectors' ;
3135import { isMicrosoftTeamsAppIdentifier , isPhoneNumberIdentifier } from '@azure/communication-common' ;
32- import { ParticipantRole } from '@azure/communication-calling' ;
36+ import { ParticipantRole , SpotlightedParticipant } from '@azure/communication-calling' ;
3337/* @conditional -compile-remove(hide-attendee-name) */
3438import { maskDisplayNameWithRole } from './utils/callUtils' ;
3539import { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers' ;
@@ -38,7 +42,8 @@ const convertRemoteParticipantsToParticipantListParticipants = (
3842 remoteParticipants : RemoteParticipantState [ ] ,
3943 localUserCanRemoveOthers : boolean ,
4044 isHideAttendeeNamesEnabled ?: boolean ,
41- localUserRole ?: ParticipantRole
45+ localUserRole ?: ParticipantRole ,
46+ spotlightedParticipants ?: SpotlightedParticipant [ ]
4247) : CallParticipantListParticipant [ ] => {
4348 const conversionCallback = (
4449 memoizeFn : ( ...args : any [ ] ) => CallParticipantListParticipant
@@ -79,6 +84,11 @@ const convertRemoteParticipantsToParticipantListParticipants = (
7984 ) ;
8085 /* @conditional -compile-remove(reaction) */
8186 const remoteParticipantReaction = memoizedConvertToVideoTileReaction ( participant . reactionState ) ;
87+ /* @conditional -compile-remove(spotlight) */
88+ const spotlight = memoizedSpotlight (
89+ spotlightedParticipants ,
90+ toFlatCommunicationIdentifier ( participant . identifier )
91+ ) ;
8292 return memoizeFn (
8393 toFlatCommunicationIdentifier ( participant . identifier ) ,
8494 displayName ,
@@ -90,7 +100,9 @@ const convertRemoteParticipantsToParticipantListParticipants = (
90100 participant . raisedHand ,
91101 localUserCanRemoveOthers ,
92102 /* @conditional -compile-remove(reaction) */
93- remoteParticipantReaction
103+ remoteParticipantReaction ,
104+ /* @conditional -compile-remove(spotlight) */
105+ spotlight
94106 ) ;
95107 } )
96108 . sort ( ( a , b ) => {
@@ -146,7 +158,9 @@ export const participantListSelector: ParticipantListSelector = createSelector(
146158 /* @conditional -compile-remove(hide-attendee-name) */
147159 isHideAttendeeNamesEnabled ,
148160 /* @conditional -compile-remove(reaction) */
149- getLocalParticipantReactionState
161+ getLocalParticipantReactionState ,
162+ /* @conditional -compile-remove(spotlight) */
163+ getSpotlightedParticipants
150164 ] ,
151165 (
152166 userId ,
@@ -161,7 +175,9 @@ export const participantListSelector: ParticipantListSelector = createSelector(
161175 /* @conditional -compile-remove(hide-attendee-name) */
162176 isHideAttendeeNamesEnabled ,
163177 /* @conditional -compile-remove(reaction) */
164- localParticipantReactionState
178+ localParticipantReactionState ,
179+ /* @conditional -compile-remove(spotlight) */
180+ spotlightedParticipants
165181 ) : {
166182 participants : CallParticipantListParticipant [ ] ;
167183 myUserId : string ;
@@ -175,7 +191,9 @@ export const participantListSelector: ParticipantListSelector = createSelector(
175191 /* @conditional -compile-remove(hide-attendee-name) */
176192 isHideAttendeeNamesEnabled ,
177193 /* @conditional -compile-remove(hide-attendee-name) */
178- role
194+ role ,
195+ /* @conditional -compile-remove(spotlight) */
196+ spotlightedParticipants
179197 )
180198 : [ ] ;
181199 /* @conditional -compile-remove(reaction) */
@@ -191,7 +209,9 @@ export const participantListSelector: ParticipantListSelector = createSelector(
191209 // Local participant can never remove themselves.
192210 isRemovable : false ,
193211 /* @conditional -compile-remove(reaction) */
194- reaction : localParticipantReaction
212+ reaction : localParticipantReaction ,
213+ /* @conditional -compile-remove(spotlight) */
214+ isSpotlighted : memoizedSpotlight ( spotlightedParticipants , userId )
195215 } ) ;
196216 /* @conditional -compile-remove(total-participant-count) */
197217 const totalParticipantCount = partitipantCount ;
0 commit comments