Skip to content

Commit 3c9c10f

Browse files
Fix local participant's display name in together mode (#5927)
1 parent 2649201 commit 3c9c10f

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "",
5+
"comment": "Fix Local Participant's display name in Together Mode",
6+
"packageName": "@azure/communication-react",
7+
"email": "2684369+JamesBurnside@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "",
5+
"comment": "Fix Local Participant's display name in Together Mode",
6+
"packageName": "@azure/communication-react",
7+
"email": "2684369+JamesBurnside@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/TogetherModeOverlay.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,14 @@ export const TogetherModeOverlay = memo(
8585

8686
const updatedSignals: { [key: string]: TogetherModeParticipantStatus } = {};
8787
for (const p of participantsWithVideoAvailable) {
88-
const { userId, reaction, raisedHand, spotlight, isMuted, displayName } = p;
88+
const { userId, reaction, raisedHand, spotlight, isMuted } = p;
8989
const seatingPosition = togetherModeSeatPositions[userId];
90+
const isLocalParticipant = p.userId === localParticipant.userId;
91+
const displayName = p.displayName
92+
? p.displayName
93+
: isLocalParticipant
94+
? locale.strings.videoGallery.localVideoLabel
95+
: locale.strings.videoGallery.displayNamePlaceholder;
9096
if (seatingPosition) {
9197
updatedSignals[userId] = {
9298
id: userId,
@@ -126,6 +132,7 @@ export const TogetherModeOverlay = memo(
126132
togetherModeParticipantStatus,
127133
togetherModeSeatPositions,
128134
reactionResources,
135+
locale.strings.videoGallery.localVideoLabel,
129136
locale.strings.videoGallery.displayNamePlaceholder,
130137
hoveredParticipantID
131138
]);

0 commit comments

Comments
 (0)