@@ -8,33 +8,31 @@ ms.author: jsaurezlee
8
8
9
9
[ !INCLUDE [ Install SDK] ( ../install-sdk/install-sdk-windows.md )]
10
10
11
- [ !INCLUDE [ public-preview-notes] ( ../../../../includes/public-preview-include.md )]
12
-
13
11
[ !INCLUDE [ common] ( dominant-speaker-common.md )]
14
12
15
13
In order to use the Dominant Speakers call feature for Windows, the first step is to obtain the Dominant Speakers feature API object:
16
14
17
15
``` csharp
18
- DominantSpeakersCallFeature dominantSpeakersFeature = ( DominantSpeakersCallFeature ) call .GetCallFeatureExtension ( HandleType . DominantSpeakersCallFeature ) ;
16
+ DominantSpeakersCallFeature dominantSpeakersFeature = call .Features . DominantSpeakers ;
19
17
```
20
18
21
19
The Dominant Speakers feature object have the following API structure:
22
20
- ` OnDominantSpeakersChanged ` : Event for listening for changes in the dominant speakers list.
23
21
- ` DominantSpeakersInfo ` : Gets the ` DominantSpeakersInfo ` object. This object has:
24
22
- ` 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.
26
24
27
25
To subscribe to changes in the dominant speakers list:
28
26
``` csharp
29
27
// Obtain the extended feature object from the call object.
30
- DominantSpeakersFeature dominantSpeakersFeature = ( DominantSpeakersCallFeature ) call .GetCallFeatureExtension ( HandleType . DominantSpeakersCallFeature ) ;
28
+ DominantSpeakersFeature dominantSpeakersFeature = call .Features . DominantSpeakers ;
31
29
// Subscribe to the OnDominantSpeakersChanged event.
32
30
dominantSpeakersFeature .OnDominantSpeakersChanged += DominantSpeakersFeature__OnDominantSpeakersChanged ;
33
31
34
32
private void DominantSpeakersFeature__OnDominantSpeakersChanged (object sender , PropertyChangedEventArgs args ) {
35
33
// When the list changes, get the timestamp of the last change and the current list of Dominant Speakers
36
34
DominantSpeakersInfo dominantSpeakersInfo = dominantSpeakersFeature .DominantSpeakersInfo ;
37
- DateTimeOffset date = dominantSpeakersInfo .Timestamp ;
35
+ DateTimeOffset date = dominantSpeakersInfo .LastUpdatedAt ;
38
36
IReadOnlyList < ICommunicationIdentifier > speakersList = dominantSpeakersInfo .Speakers ;
39
37
}
40
38
```
0 commit comments