Skip to content

Commit 4a22e35

Browse files
authored
Capabilities Doc Native
1 parent b7ed14b commit 4a22e35

File tree

3 files changed

+187
-0
lines changed

3 files changed

+187
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
author: DaybreakQuip
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 05/21/2024
6+
ms.author: zehangzheng
7+
---
8+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-android.md)]
9+
[!INCLUDE [Public Preview Disclaimer](../../../../includes/public-preview-include-document.md)]
10+
11+
Capabilities feature is an extended feature of the core `Call` API and allows you to obtain the capabilities of the local participant in the current call.
12+
13+
The feature allows you to register for an event listener, to listen to capability changes.
14+
15+
In order to use the Capabilities call feature for Windows, the first step is to obtain the Capabilities feature API object:
16+
17+
## Obtaining capabilities feature
18+
```java
19+
private CapabilitiesCallFeature capabilitiesCallFeature;
20+
capabilitiesCallFeature = call.feature(Features.CAPABILITIES);
21+
```
22+
23+
## Get the capabilities of the local participant
24+
Capabilities object has the capabilities of the local participants and is of type `ParticipantCapability`. Properties of Capabilities include:
25+
26+
- *isAllowed* indicates if a capability can be used.
27+
- *reason* indicates capability resolution reason.
28+
29+
```java
30+
List<ParticipantCapability> capabilities = capabilitiesCallFeature.getCapabilities();
31+
```
32+
33+
## Subscribe to `capabilitiesChanged` event
34+
```java
35+
36+
capabilitiesCallFeature.addOnCapabilitiesChangedListener(this::OnCapabilitiesChanged);
37+
38+
private void OnCapabilitiesChanged(CapabilitiesChangedEvent args)
39+
{
40+
String event = String.format("Capabilities Event: %s", args.getReason().toString());
41+
Log.i("CapabilitiesInfo", event);
42+
for (ParticipantCapability capability : args.getChangedCapabilities())
43+
{
44+
Log.i("CapabilitiesInfo", capability.getType().toString() + " is " capability.getReason().toString());
45+
}
46+
}
47+
```
48+
49+
## Capabilities Exposed
50+
- *TurnVideoOn*: Ability to turn video on
51+
- *UnmuteMicrophone*: Ability to unmute microphone
52+
- *ShareScreen*: Ability to share screen
53+
- *RemoveParticipant*: Ability to remove a participant
54+
- *HangUpForEveryone*: Ability to hang up for everyone
55+
- *AddCommunicationUser*: Ability to add a communication user
56+
- *AddTeamsUser*: Ability to add Teams User
57+
- *AddPhoneNumber*: Ability to add phone number
58+
- *ManageLobby*: Ability to manage lobby
59+
- *SpotlightParticipant*: Ability to spotlight Participant
60+
- *RemoveParticipantSpotlight*: Ability to remove Participant spotlight
61+
- *BlurBackground*: Ability to blur background
62+
- *CustomBackground*: Ability to apply a custom background
63+
- *StartLiveCaptions*: Ability to start live captions
64+
- *RaiseHand*: Ability to raise hand
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
author: DaybreakQuip
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 05/21/2024
6+
ms.author: zehangzheng
7+
---
8+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-ios.md)]
9+
[!INCLUDE [Public Preview Disclaimer](../../../../includes/public-preview-include-document.md)]
10+
11+
Capabilities feature is an extended feature of the core `Call` API and allows you to obtain the capabilities of the local participant in the current call.
12+
13+
The feature allows you to register for an event listener, to listen to capability changes.
14+
15+
In order to use the Capabilities call feature for Windows, the first step is to obtain the Capabilities feature API object:
16+
17+
## Obtaining capabilities feature
18+
```swift
19+
let capabilitiesCallFeature =call.feature(Features.capabilities)
20+
```
21+
22+
## Get the capabilities of the local participant
23+
Capabilities object has the capabilities of the local participants and is of type `ParticipantCapability`. Properties of Capabilities include:
24+
25+
- *isAllowed* indicates if a capability can be used.
26+
- *reason* indicates capability resolution reason.
27+
28+
```swift
29+
var capabilities = capabilitiesCallFeature.capabilities
30+
```
31+
32+
## Subscribe to `capabilitiesChanged` event
33+
```swift
34+
35+
capabilitiesCallFeature.delegate = CapabilitiesCallDelegate()
36+
37+
public class CapabilitiesCallDelegate : CapabilitiesCallFeatureDelegate
38+
{
39+
public func capabilitiesCallFeature(_ capabilitiesCallFeature: CapabilitiesCallFeature, didChangeCapabilities args: CapabilitiesChangedEventArgs) {
40+
let changedReason = args.reason
41+
let changedCapabilities = args.changedCapabilities
42+
}
43+
}
44+
```
45+
46+
## Capabilities Exposed
47+
- *TurnVideoOn*: Ability to turn video on
48+
- *UnmuteMicrophone*: Ability to unmute microphone
49+
- *ShareScreen*: Ability to share screen
50+
- *RemoveParticipant*: Ability to remove a participant
51+
- *HangUpForEveryone*: Ability to hang up for everyone
52+
- *AddCommunicationUser*: Ability to add a communication user
53+
- *AddTeamsUser*: Ability to add Teams User
54+
- *AddPhoneNumber*: Ability to add phone number
55+
- *ManageLobby*: Ability to manage lobby
56+
- *SpotlightParticipant*: Ability to spotlight Participant
57+
- *RemoveParticipantSpotlight*: Ability to remove Participant spotlight
58+
- *BlurBackground*: Ability to blur background
59+
- *CustomBackground*: Ability to apply a custom background
60+
- *StartLiveCaptions*: Ability to start live captions
61+
- *RaiseHand*: Ability to raise hand
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
author: DaybreakQuip
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 05/21/2024
6+
ms.author: zehangzheng
7+
---
8+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-windows.md)]
9+
[!INCLUDE [Public Preview Disclaimer](../../../../includes/public-preview-include-document.md)]
10+
11+
Capabilities feature is an extended feature of the core `Call` API and allows you to obtain the capabilities of the local participant in the current call.
12+
13+
The feature allows you to register for an event listener, to listen to capability changes.
14+
15+
In order to use the Capabilities call feature for Windows, the first step is to obtain the Capabilities feature API object:
16+
17+
## Obtaining capabilities feature
18+
```C#
19+
private CapabilitiesCallFeature capabilitiesCallFeature;
20+
capabilitiesCallFeature = call.Features.Capabilities;
21+
```
22+
23+
## Get the capabilities of the local participant
24+
Capabilities object has the capabilities of the local participants and is of type `ParticipantCapability`. Properties of Capabilities include:
25+
26+
- *isAllowed* indicates if a capability can be used.
27+
- *reason* indicates capability resolution reason.
28+
29+
```C#
30+
var capabilities = capabilitiesCallFeature.Capabilities;
31+
```
32+
33+
## Subscribe to `capabilitiesChanged` event
34+
```C#
35+
capabilitiesCallFeature.CapabilitiesChanged += Call__OnCapabilitiesChangedAsync;
36+
37+
private async void Call__OnCapabilitiesChangedAsync(object sender, CapabilitiesChangedEventArgs args)
38+
{
39+
foreach (var capability in args.ChangedCapabilities)
40+
{
41+
//Prints out capability kind and resolution reason in console
42+
Trace.WriteLine(capability.Kind.ToString() + " is " + capability.Reason.ToString());
43+
}
44+
}
45+
```
46+
47+
## Capabilities Exposed
48+
- *TurnVideoOn*: Ability to turn video on
49+
- *UnmuteMicrophone*: Ability to unmute microphone
50+
- *ShareScreen*: Ability to share screen
51+
- *RemoveParticipant*: Ability to remove a participant
52+
- *HangUpForEveryone*: Ability to hang up for everyone
53+
- *AddCommunicationUser*: Ability to add a communication user
54+
- *AddTeamsUser*: Ability to add Teams User
55+
- *AddPhoneNumber*: Ability to add phone number
56+
- *ManageLobby*: Ability to manage lobby
57+
- *SpotlightParticipant*: Ability to spotlight Participant
58+
- *RemoveParticipantSpotlight*: Ability to remove Participant spotlight
59+
- *BlurBackground*: Ability to blur background
60+
- *CustomBackground*: Ability to apply a custom background
61+
- *StartLiveCaptions*: Ability to start live captions
62+
- *RaiseHand*: Ability to raise hand

0 commit comments

Comments
 (0)