Skip to content

Commit e8c7c1e

Browse files
committed
Edited display name
1 parent 6e9364f commit e8c7c1e

File tree

4 files changed

+137
-0
lines changed

4 files changed

+137
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Display name changed
3+
titleSuffix: An Azure Communication Services how-to guide
4+
description: Use Azure Communication Services SDKs to subscript events that participants' display name change
5+
author: fuyan
6+
ms.author: fuyan
7+
ms.service: azure-communication-services
8+
ms.subservice: calling
9+
ms.topic: how-to
10+
ms.date: 05/06/2025
11+
ms.custom: template-how-to
12+
zone_pivot_groups: acs-plat-web-ios-android-windows
13+
14+
#Customer intent: As a developer, I want to learn how to send and receive Media access state using SDK.
15+
---
16+
17+
# Display name changed
18+
::: zone pivot="platform-android"
19+
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
20+
::: zone-end
21+
22+
::: zone pivot="platform-ios"
23+
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
24+
::: zone-end
25+
26+
::: zone pivot="platform-windows"
27+
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
28+
::: zone-end
29+
30+
This article describes how you can subscribe the Teams participants' display name changed events showing the old, new values and the reason of the name change.
31+
32+
## Prerequisites
33+
34+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
35+
- A deployed Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
36+
- A user access token to enable the calling client. For more information, see [Create and manage access tokens](../../quickstarts/identity/access-tokens.md).
37+
- Optional: Complete the article [Add voice calling to your app](../../quickstarts/voice-video-calling/getting-started-with-calling.md).
38+
39+
## Support
40+
41+
The following tables define support for display name change during Teams interop call/meeting in Azure Communication Services.
42+
43+
### Identities and call types
44+
45+
The following table shows media access support for specific call types and identities.
46+
47+
|Identities | Teams meeting | Room | 1:1 call | Group call | 1:1 Teams interop call | Group Teams interop call |
48+
|-----------------------------|---------------|------|----------|------------|------------------------|--------------------------|
49+
|Communication Services user | ✔️ | | | | ✔️ | ✔️ |
50+
|Microsoft 365 user | ✔️ | | | | ✔️ | ✔️ |
51+
52+
### Operations
53+
54+
The following table shows support for individual APIs in the Calling SDK related to individual identity types. The media access feature only supports these operations in Teams meetings.
55+
56+
|Operations | Communication Services user | Microsoft 365 user |
57+
|-----------------------------|---------------|--------------------------|
58+
| Check if Teams participant has display name changed | ✔️ | ✔️ |
59+
| Get notification that Teams participant display name changed | ✔️ | ✔️ |
60+
61+
62+
### SDKs
63+
64+
The following tables show support for the display name change in individual Azure Communication Services SDKs.
65+
66+
| Support status | Web | Web UI | iOS | iOS UI | Android | Android UI | Windows |
67+
|----------------|-----|--------|--------|--------|----------|--------|---------|
68+
| Is Supported | ✔️ | | | | | | |
69+
70+
::: zone pivot="platform-web"
71+
[!INCLUDE [Display name changed Client-side JavaScript](./includes/displayname-changed/displayname-changed-web.md)]
72+
::: zone-end
73+
74+
75+
## Next steps
76+
- [Learn how to manage calls](./manage-calls.md)
77+
- [Learn how to manage video](./manage-video.md)
78+
79+
## Related articles
80+
81+
To do, add Teams client doc here.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
author: fuyan
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 05/06/2025
6+
ms.author: fuyan
7+
---
8+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-web.md)]
9+
10+
## Implement display name change
11+
12+
`DisplayNameChanged` is an `event` and `hasDisplayNameChanged` is a property of the class `RemoteParticipant`. You can get remote participants on `Call` object `remoteParticipants` property from the Calling SDK:
13+
14+
```js
15+
const remoteParticipants = call.remoteParticipants;
16+
```
17+
18+
### Check if remote participant has display name change
19+
20+
Use the `hasDisplayNameChanged` property of the class `RemoteParticipant` to check if display name has changed.
21+
22+
```js
23+
// check if remoteParticipant has display name changed
24+
const hasDisplayNameChanged = remoteParticipant.hasDisplayNameChanged;
25+
```
26+
27+
### Get notification that display name changed
28+
29+
Use the `PropertyChangedEventWithArgs` listener to subscribe the display name change event
30+
31+
```js
32+
// get notification of a remote participant display name changed
33+
remoteParticipant.on('displayNameChanged', (args: {newValue?: string, oldValue?: string, reason?: DisplayNameChangedReason}) => {
34+
console.log(`Display name changed from ${oldValue} to ${newValue} due to ${reason}`);
35+
});
36+
```
37+
38+
## SDK compatibility
39+
40+
The following table shows the minimum version of SDKs that support individual APIs.
41+
42+
| Operations | Web | Web UI | iOS | iOS UI | Android | Android UI | Windows |
43+
|-------------|-----|--------|-----|--------|---------|------------|---------|
44+
|hasDisplayNameChanged property |1.34.1|||||||
45+
|DisplayNameChanged event |1.34.1|||||||
46+
47+

articles/communication-services/how-tos/calling-sdk/includes/events/events-web.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,13 @@ remoteParticipant.on('displayNameChanged', () => {
404404
});
405405
```
406406
407+
```javascript
408+
remoteParticipant.on('displayNameChanged', (args: {newValue?: string, oldValue?: string, reason?: DisplayNameChangedReason}) => {
409+
remoteParticipant.nameLabel.innerText = remoteParticipant.displayName;
410+
console.log(`Display name changed from ${oldValue} to ${newValue} due to ${reason}`);
411+
});
412+
```
413+
407414
### Event: `isSpeakingChanged`
408415
409416
The `isSpeakingChanged` when the dominant speaker in a call changes.

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,8 @@ items:
11681168
href: how-tos/calling-sdk/together-mode.md
11691169
- name: Control media access
11701170
href: how-tos/calling-sdk/media-access.md
1171+
- name: Display name changed
1172+
href: how-tos/calling-sdk/displayname-changed.md
11711173
- name: Job Router
11721174
items:
11731175
- name: Overview

0 commit comments

Comments
 (0)