Skip to content

Commit 54c7d89

Browse files
authored
Merge pull request #255760 from jamescadd/main
Adds Calling reactions page
2 parents f503d02 + af88e80 commit 54c7d89

File tree

9 files changed

+100
-55
lines changed

9 files changed

+100
-55
lines changed

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

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -371,58 +371,4 @@ Check is screen sharing is on. It returns `Boolean`.
371371

372372
```js
373373
const isScreenSharingOn = call.isScreenSharingOn;
374-
```
375-
## Send or receive a reaction from other participants
376-
> [!NOTE]
377-
> This API is provided as a preview for developers and may change based on feedback that we receive. To use this api please use 'beta' release of Azure Communication Services Calling Web SDK version 1.18.1 or higher
378-
379-
Within ACS you can send and receive reactions when on a group call:
380-
- Like :+1:
381-
- Love :heart:
382-
- Applause :clap:
383-
- Laugh :smile:
384-
- Surprise :open_mouth:
385-
386-
To send a reaction you'll use the `sendReaction(reactionMessage)` API. To receive a reaction message will be built with Type `ReactionMessage` which uses `Reaction` enums as an attribute.
387-
388-
You'll need to subscribe for events which provide the subscriber event data as:
389-
```javascript
390-
export interface ReactionEventPayload {
391-
/**
392-
* identifier for a participant
393-
*/
394-
identifier: CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier;
395-
/**
396-
* reaction type received
397-
*/
398-
reactionMessage: ReactionMessage;
399-
}
400-
```
401-
402-
You can determine which reaction is coming from which participant with `identifier` attribute and gets the reaction type from `ReactionMessage`.
403-
404-
### Sample on how to send a reaction in a meeting
405-
```javascript
406-
const reaction = call.feature(SDK.Features.Reaction);
407-
const reactionMessage: SDK.ReactionMessage = {
408-
reactionType: 'like'
409-
};
410-
await reaction.sendReaction(reactionMessage);
411-
```
412-
413-
### Sample on how to receive a reaction in a meeting
414-
```javascript
415-
const reaction = call.feature(SDK.Features.Reaction);
416-
reaction.on('reaction', event => {
417-
// user identifier
418-
console.log("User Mri - " + event.identifier);
419-
// received reaction
420-
console.log("User Mri - " + event.reactionMessage.reactionType);
421-
// reaction message
422-
console.log("reaction message - " + JSON.stringify(event.reactionMessage));
423-
}
424-
```
425-
426-
### Key things to note about using Reactions:
427-
- For teams interoperability scenarios, the functionality of the feature depends on the meeting poilicy for the reaction capability.
428-
- On direct 1:1 calls between a CTE user and a teams user, the reaction functionality is disabled.
374+
```
1.7 KB
Loading
1.9 KB
Loading
1.42 KB
Loading
1.55 KB
Loading
2.01 KB
Loading
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
author: jamescadd
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 10/20/2023
6+
ms.author: jacadd
7+
---
8+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-web.md)]
9+
10+
## Send or receive a reaction from other participants
11+
> [!NOTE]
12+
> This API is provided as a preview for developers and may change based on feedback that we receive. To use this api please use 'beta' release of Azure Communication Services Calling Web SDK version 1.18.1 or higher
13+
14+
Within ACS you can send and receive reactions when on a group call:
15+
- Like :::image type="icon" source="media/reaction-like.png":::
16+
- Love :::image type="icon" source="media/reaction-love.png":::
17+
- Applause :::image type="icon" source="media/reaction-applause.png":::
18+
- Laugh :::image type="icon" source="media/reaction-laugh.png":::
19+
- Surprise :::image type="icon" source="media/reaction-surprise.png":::
20+
21+
To send a reaction, use the `sendReaction(reactionMessage)` API. To receive a reaction, the message will be built with Type `ReactionMessage` that uses `Reaction` enums as an attribute.
22+
23+
You need to subscribe for events that provide the subscriber event data:
24+
```javascript
25+
export interface ReactionEventPayload {
26+
/**
27+
* identifier for a participant
28+
*/
29+
identifier: CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier;
30+
/**
31+
* reaction type received
32+
*/
33+
reactionMessage: ReactionMessage;
34+
}
35+
```
36+
37+
You can determine which reaction is coming from which participant with `identifier` attribute and gets the reaction type from `ReactionMessage`.
38+
39+
### Sample on how to send a reaction in a meeting
40+
```javascript
41+
const reaction = call.feature(SDK.Features.Reaction);
42+
const reactionMessage: SDK.ReactionMessage = {
43+
reactionType: 'like'
44+
};
45+
await reaction.sendReaction(reactionMessage);
46+
```
47+
48+
### Sample on how to receive a reaction in a meeting
49+
```javascript
50+
const reaction = call.feature(SDK.Features.Reaction);
51+
reaction.on('reaction', event => {
52+
// user identifier
53+
console.log("User Mri - " + event.identifier);
54+
// received reaction
55+
console.log("User Mri - " + event.reactionMessage.reactionType);
56+
// reaction message
57+
console.log("reaction message - " + JSON.stringify(event.reactionMessage));
58+
}
59+
```
60+
61+
### Key things to note about using Reactions:
62+
- For Microsoft Teams interoperability scenarios, the functionality of the feature depends on the meeting policy for the reaction capability.
63+
- Reactions are supported in the Web Calling SDK.
64+
- Reactions are not currently supported in the Native SDKs.
65+
- Reactions are supported for Microsoft Teams Meeting interoperability, Azure Communication Services Rooms, and Group Calls.
66+
- Reactions are not supported for 1:1 calls.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Reactions
3+
titleSuffix: An Azure Communication Services how-to guide
4+
description: Use Azure Communication Services SDKs to send and receive reactions.
5+
author: jamescadd
6+
manager: chpalm
7+
ms.author: jacadd
8+
ms.service: azure-communication-services
9+
ms.subservice: calling
10+
ms.topic: how-to
11+
ms.date: 10/20/2023
12+
ms.custom: template-how-to
13+
---
14+
15+
# Reactions
16+
In this article, you learn how to implement the reactions capability with Azure Communication Services Calling SDKs. This capability allows users in a group call or meeting to send and receive reactions with participants in Azure Communication Services and Microsoft Teams. Reactions for users in Microsoft Teams are controlled by the configuration and policy settings in Teams. Additional information is available in [Manage reactions in Teams meetings and webinars](/microsoftteams/manage-reactions-meetings) and [Meeting options in Microsoft Teams](https://support.microsoft.com/en-us/office/meeting-options-in-microsoft-teams-53261366-dbd5-45f9-aae9-a70e6354f88e)
17+
18+
[!INCLUDE [Public Preview Disclaimer](../../includes/public-preview-include-document.md)]
19+
20+
## Prerequisites
21+
22+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23+
- A deployed Communication Services resource. [Create a Communication Services resource](../../quickstarts/create-communication-resource.md).
24+
- A user access token to enable the calling client. For more information, see [Create and manage access tokens](../../quickstarts/identity/access-tokens.md).
25+
- Optional: Complete the quickstart to [add voice calling to your application](../../quickstarts/voice-video-calling/getting-started-with-calling.md)
26+
27+
[!INCLUDE [Spotlight Client-side JavaScript](./includes/reactions/reactions-web.md)]
28+
29+
## Next steps
30+
- [Learn how to manage calls](./manage-calls.md)
31+
- [Learn how to manage video](./manage-video.md)

articles/communication-services/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ items:
308308
href: how-tos/calling-sdk/record-calls.md
309309
- name: Raise Hand
310310
href: how-tos/calling-sdk/raise-hand.md
311+
- name: Reactions
312+
href: how-tos/calling-sdk/reactions.md
311313
- name: Spotlight
312314
href: how-tos/calling-sdk/spotlight.md
313315
- name: Show transcription state

0 commit comments

Comments
 (0)