Skip to content

Commit b2fee88

Browse files
authored
Merge pull request #239579 from jsaurezlee-msft/master
Windows SDK GA updates (#8)
2 parents 056c69f + f046b28 commit b2fee88

File tree

16 files changed

+917
-281
lines changed

16 files changed

+917
-281
lines changed

articles/communication-services/how-tos/calling-sdk/call-transcription.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.subservice: calling
99
ms.topic: how-to
1010
ms.date: 08/10/2021
1111
ms.custom: template-how-to
12-
zone_pivot_groups: acs-plat-ios-android
12+
zone_pivot_groups: acs-plat-ios-android-windows
1313

1414
#Customer intent: As a developer, I want to display the call transcription state on the client.
1515
---
@@ -36,6 +36,10 @@ When using call transcription you may want to let your users know that a call is
3636
[!INCLUDE [Call transcription client-side iOS](./includes/call-transcription/call-transcription-ios.md)]
3737
::: zone-end
3838

39+
::: zone pivot="platform-windows"
40+
[!INCLUDE [Call transcription client-side Windows](./includes/call-transcription/call-transcription-windows.md)]
41+
::: zone-end
42+
3943
## Next steps
4044
- [Learn how to manage video](./manage-video.md)
4145
- [Learn how to manage calls](./manage-calls.md)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
author: jsaurezlee-msft
3+
ms.service: azure-communication-services
4+
ms.topic: include
5+
ms.date: 05/30/2023
6+
ms.author: jsaurezlee
7+
---
8+
9+
[!INCLUDE [Install SDK](../install-sdk/install-sdk-windows.md)]
10+
11+
Call transcription is an extended feature of the core `Call` object. You first need to obtain the transcription feature object:
12+
13+
```csharp
14+
TranscriptionCallFeature transcriptionFeature = call.Features.Transcription;
15+
```
16+
17+
Then, to check if the call is being transcribed, inspect the `IsTranscriptionActive` property of `transcriptionFeature`. It returns `boolean`.
18+
19+
```csharp
20+
boolean isTranscriptionActive = transcriptionFeature.isTranscriptionActive;
21+
```
22+
23+
You can also subscribe to changes in transcription:
24+
25+
```csharp
26+
private async void Call__OnIsTranscriptionActiveChanged(object sender, PropertyChangedEventArgs args)
27+
boolean isTranscriptionActive = transcriptionFeature.IsTranscriptionActive();
28+
}
29+
30+
transcriptionFeature.IsTranscriptionActiveChanged += Call__OnIsTranscriptionActiveChanged;
31+
```

articles/communication-services/how-tos/calling-sdk/includes/dominant-speaker/dominant-speaker-android.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,32 @@ ms.author: jsaurezlee
77
---
88
[!INCLUDE [Install SDK](../install-sdk/install-sdk-android.md)]
99

10-
[!INCLUDE [public-preview-notes](../../../../includes/public-preview-include.md)]
11-
1210
[!INCLUDE [common](dominant-speaker-common.md)]
1311

1412
In order to use the Dominant Speakers call feature for Android, the first step is to obtain the Dominant Speakers feature API object:
1513

1614
```java
17-
DominantSpeakersFeature dominantSpeakersFeature = call.feature(Features.DominantSpeakers);
15+
DominantSpeakersFeature dominantSpeakersFeature = call.feature(Features.DOMINANT_SPEAKERS);
1816
```
1917
The Dominant Speakers feature object have the following API structure:
2018
- `OnDominantSpeakersChanged`: Event for listening for changes in the dominant speakers list.
2119
- `getDominantSpeakersInfo()`: Gets the `DominantSpeakersInfo` object. This object has:
2220
- `getSpeakers()`: A list of participant identifiers representing the dominant speakers list.
23-
- `getTimestamp()`: The date when the dominant speakers list was updated.
21+
- `getLastUpdatedAt()`: The date when the dominant speakers list was updated.
2422

2523
To subscribe to changes in the Dominant Speakers list:
2624

2725
```java
2826

2927
// Obtain the extended feature object from the call object.
30-
DominantSpeakersFeature dominantSpeakersFeature = call.feature(Features.DominantSpeakers);
28+
DominantSpeakersFeature dominantSpeakersFeature = call.feature(Features.DOMINANT_SPEAKERS);
3129
// Subscribe to the OnDominantSpeakersChanged event.
3230
dominantSpeakersFeature.addOnDominantSpeakersChangedListener(handleDominantSpeakersChangedlistener);
3331

3432
private void handleCallOnDominantSpeakersChanged(PropertyChangedEvent args) {
3533
// When the list changes, get the timestamp of the last change and the current list of Dominant Speakers
3634
DominantSpeakersInfo dominantSpeakersInfo = dominantSpeakersFeature.getDominantSpeakersInfo();
37-
Date timestamp = dominantSpeakersInfo.getTimestamp();
35+
Date timestamp = dominantSpeakersInfo.getLastUpdatedAt();
3836
List<CommunicationIdentifier> dominantSpeakers = dominantSpeakersInfo.getSpeakers();
3937
}
4038
```

articles/communication-services/how-tos/calling-sdk/includes/dominant-speaker/dominant-speaker-ios.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ ms.author: jsaurezlee
88

99
[!INCLUDE [Install SDK](../install-sdk/install-sdk-ios.md)]
1010

11-
[!INCLUDE [public-preview-notes](../../../../includes/public-preview-include.md)]
12-
1311
[!INCLUDE [common](dominant-speaker-common.md)]
1412

1513
In order to use the Dominant Speakers call feature for iOS, the first step is to obtain the Dominant Speakers feature API object:
@@ -21,7 +19,7 @@ The Dominant Speakers feature object have the following API structure:
2119
- `didChangeDominantSpeakers`: Event for listening for changes in the dominant speakers list.
2220
- `dominantSpeakersInfo`: Which gets the `DominantSpeakersInfo` object. This object has:
2321
- `speakers`: A list of participant identifiers representing the dominant speakers list.
24-
- `timestamp`: The date when the dominant speakers list was updated.
22+
- `lastUpdatedAt`: The date when the dominant speakers list was updated.
2523

2624
To subscribe to changes in the dominant speakers list:
2725

@@ -36,7 +34,7 @@ public class DominantSpeakersDelegate : DominantSpeakersCallFeatureDelegate
3634
public func dominantSpeakersCallFeature(_ dominantSpeakersCallFeature: DominantSpeakersCallFeature, didChangeDominantSpeakers args: PropertyChangedEventArgs) {
3735
// When the list changes, get the timestamp of the last change and the current list of Dominant Speakers
3836
let dominantSpeakersInfo = dominantSpeakersCallFeature.dominantSpeakersInfo
39-
let timestamp = dominantSpeakersInfo.timestamp
37+
let timestamp = dominantSpeakersInfo.lastUpdatedAt
4038
let dominantSpeakersList = dominantSpeakersInfo.speakers
4139
}
4240
}

articles/communication-services/how-tos/calling-sdk/includes/dominant-speaker/dominant-speaker-windows.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,31 @@ ms.author: jsaurezlee
88

99
[!INCLUDE [Install SDK](../install-sdk/install-sdk-windows.md)]
1010

11-
[!INCLUDE [public-preview-notes](../../../../includes/public-preview-include.md)]
12-
1311
[!INCLUDE [common](dominant-speaker-common.md)]
1412

1513
In order to use the Dominant Speakers call feature for Windows, the first step is to obtain the Dominant Speakers feature API object:
1614

1715
```csharp
18-
DominantSpeakersCallFeature dominantSpeakersFeature = (DominantSpeakersCallFeature)call.GetCallFeatureExtension(HandleType.DominantSpeakersCallFeature);
16+
DominantSpeakersCallFeature dominantSpeakersFeature = call.Features.DominantSpeakers;
1917
```
2018

2119
The Dominant Speakers feature object have the following API structure:
2220
- `OnDominantSpeakersChanged`: Event for listening for changes in the dominant speakers list.
2321
- `DominantSpeakersInfo`: Gets the `DominantSpeakersInfo` object. This object has:
2422
- `Speakers`: A list of participant identifiers representing the dominant speakers list.
25-
- `Timestamp`: The date when the dominant speakers list was updated.
23+
- `LastUpdatedAt`: The date when the dominant speakers list was updated.
2624

2725
To subscribe to changes in the dominant speakers list:
2826
```csharp
2927
// Obtain the extended feature object from the call object.
30-
DominantSpeakersFeature dominantSpeakersFeature = (DominantSpeakersCallFeature)call.GetCallFeatureExtension(HandleType.DominantSpeakersCallFeature);
28+
DominantSpeakersFeature dominantSpeakersFeature = call.Features.DominantSpeakers;
3129
// Subscribe to the OnDominantSpeakersChanged event.
3230
dominantSpeakersFeature.OnDominantSpeakersChanged += DominantSpeakersFeature__OnDominantSpeakersChanged;
3331

3432
private void DominantSpeakersFeature__OnDominantSpeakersChanged(object sender, PropertyChangedEventArgs args) {
3533
// When the list changes, get the timestamp of the last change and the current list of Dominant Speakers
3634
DominantSpeakersInfo dominantSpeakersInfo = dominantSpeakersFeature.DominantSpeakersInfo;
37-
DateTimeOffset date = dominantSpeakersInfo.Timestamp;
35+
DateTimeOffset date = dominantSpeakersInfo.LastUpdatedAt;
3836
IReadOnlyList<ICommunicationIdentifier> speakersList = dominantSpeakersInfo.Speakers;
3937
}
4038
```

articles/communication-services/how-tos/calling-sdk/includes/install-sdk/install-sdk-windows.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.author: rifox
99

1010
### Creating the Visual Studio project
1111

12-
For UWP app, in Visual Studio 2019, create a new `Blank App (Universal Windows)` project. After entering the project name, feel free to pick any Windows SDK greater than `10.0.17134`.
12+
For UWP app, in Visual Studio 2022, create a new `Blank App (Universal Windows)` project. After entering the project name, feel free to pick any Windows SDK greater than `10.0.17134`.
1313

1414
For WinUI 3 app, create a new project with the `Blank App, Packaged (WinUI 3 in Desktop)` template to set up a single-page WinUI 3 app. [Windows App SDK version 1.2 preview 2](https://learn.microsoft.com/windows/apps/windows-app-sdk/preview-channel#version-12-preview-2-120-preview2) and above is required.
1515
### Install the package and dependencies with NuGet Package Manager
@@ -18,8 +18,7 @@ The Calling SDK APIs and libraries are publicly available via a NuGet package.
1818
The following steps exemplify how to find, download, and install the Calling SDK NuGet package.
1919

2020
1. Open NuGet Package Manager (`Tools` -> `NuGet Package Manager` -> `Manage NuGet Packages for Solution`)
21-
2. Click on `Browse` and then type `Azure.Communication.Calling` in the search box.
22-
3. Make sure that `Include prerelease` check box is selected.
23-
4. Click on the `Azure.Communication.Calling` package, select `Azure.Communication.Calling` [1.0.0-beta.33](https://www.nuget.org/packages/Azure.Communication.Calling/1.0.0-beta.33) or newer version.
21+
2. Click on `Browse` and then type `Azure.Communication.Calling.WindowsClient` in the search box.
22+
4. Click on the `Azure.Communication.Calling.WindowsClient` package, select `Azure.Communication.Calling` [1.0.0](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.0.0) or newer version.
2423
5. Select the checkbox corresponding to the CS project on the right-side tab.
25-
6. Click on the `Install` button.
24+
6. Click on the `Install` button.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following steps inform the C# compiler about these namespaces allowing Visua
4444

4545
```csharp
4646
using Azure.Communication;
47-
using Azure.Communication.Calling;
47+
using Azure.Communication.Calling.WindowsClient;
4848
```
4949

5050
Keep `MainPage.xaml.cs` or `MainWindows.xaml.cs` open. The next steps will add more code to it.
@@ -85,30 +85,30 @@ The following classes and interfaces handle some of the major features of the Az
8585
| ------------------------------------- | ------------------------------------------------------------ |
8686
| `CallClient` | The `CallClient` is the main entry point to the Calling client library. |
8787
| `CallAgent` | The `CallAgent` is used to start and join calls. |
88-
| `Call` | The `Call` is used to manage placed or joined calls. |
88+
| `CommunicationCall` | The `CommunicationCall` is used to manage placed or joined calls. |
8989
| `CommunicationTokenCredential` | The `CommunicationTokenCredential` is used as the token credential to instantiate the `CallAgent`.|
9090
| `CallAgentOptions` | The `CallAgentOptions` contains information to identify the caller. |
9191
| `HangupOptions` | The `HangupOptions` informs if a call should be terminated to all its participants. |
9292

9393
## Initialize the CallAgent
9494

95-
To create a `CallAgent` instance from `CallClient`, you must use `CallClient.CreateCallAgent` method that asynchronously returns a `CallAgent` object once it's initialized.
95+
To create a `CallAgent` instance from `CallClient`, you must use `CallClient.CreateCallAgentAsync` method that asynchronously returns a `CallAgent` object once it's initialized.
9696

97-
To create `CallAgent`, you must pass a `CommunicationTokenCredential` object and a `CallAgentOptions` object. Keep in mind that `CommunicationTokenCredential` throws if a malformed token is passed.
97+
To create `CallAgent`, you must pass a `CallTokenCredential` object and a `CallAgentOptions` object. Keep in mind that `CallTokenCredential` throws if a malformed token is passed.
9898

9999
The following code should be added inside and helper function to be called in app initialization.
100100

101101
```csharp
102102
var callClient = new CallClient();
103-
this.deviceManager = await callClient.GetDeviceManager();
103+
this.deviceManager = await callClient.GetDeviceManagerAsync();
104104

105-
var tokenCredential = new CommunicationTokenCredential("<AUTHENTICATION_TOKEN>");
105+
var tokenCredential = new CallTokenCredential("<AUTHENTICATION_TOKEN>");
106106
var callAgentOptions = new CallAgentOptions()
107107
{
108108
DisplayName = "<DISPLAY_NAME>"
109109
};
110110

111-
this.callAgent = await callClient.CreateCallAgent(tokenCredential, callAgentOptions);
111+
this.callAgent = await callClient.CreateCallAgentAsync(tokenCredential, callAgentOptions);
112112
```
113113

114114
Change the `<AUTHENTICATION_TOKEN>` with a valid credential token for your resource. Refer to the [user access token](../../../../quickstarts/identity/access-tokens.md) documentation if a credential token has to be sourced.

0 commit comments

Comments
 (0)