Skip to content

Commit 1c9d22a

Browse files
committed
update raise hand feature after arb
1 parent cd9bf1a commit 1c9d22a

File tree

4 files changed

+53
-46
lines changed

4 files changed

+53
-46
lines changed

articles/communication-services/how-tos/calling-sdk/includes/raise-hand/raise-hand-android.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ Currently ACS calls aren't allowed to change state of other participants, for ex
3939
```java
4040
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND);
4141
//lower all hands on the call
42-
raiseHandFeature.lowerHandForEveryone();
42+
raiseHandFeature.lowerAllHands();
4343
//or we can provide array of CommunicationIdentifier to specify list of participants
4444
List<CommunicationIdentifier> identifiers = new ArrayList<>();
4545
CommunicationUserIdentifier acsUser = new CommunicationUserIdentifier(<USER_ID>);
4646
MicrosoftTeamsUserIdentifier teamsUser = new MicrosoftTeamsUserIdentifier(<USER_ID>);
4747
identifiers.add(new CommunicationUserIdentifier("<USER_ID>"));
4848
identifiers.add(new MicrosoftTeamsUserIdentifier("<USER_ID>"));
49-
raiseHandFeature.lowerHand(identifiers);
49+
raiseHandFeature.lowerHands(identifiers);
5050
```
5151

5252
### Handle changed states
53-
The `Raise Hand` API allows you to subscribe to `raiseHandChanged` events. A `raiseHandChanged` event comes from a `call` instance and contain information about participant and new state.
53+
The `Raise Hand` API allows you to subscribe to `raiseHandChanged` or `loweredHandChanged` events. Event comes from a `call` instance and contain information about participant and new state.
5454
```java
5555
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND)
5656

5757
// event example : {identifier: CommunicationIdentifier, isRaised: true, order:1}
58-
call.feature(Features.RAISE_HAND).addOnRaiseHandReceivedListener(raiseHandEvent -> {
58+
call.feature(Features.RAISE_HAND).addOnRaisedHandReceivedListener(raiseHandEvent -> {
5959
Log.i(TAG, String.format("Raise Hand: %s : %s", Utilities.toMRI(raiseHandEvent.getIdentifier()), raiseHandEvent.isRaised()));
6060
});
6161
```
@@ -64,24 +64,17 @@ call.feature(Features.RAISE_HAND).addOnRaiseHandReceivedListener(raiseHandEvent
6464
To get information about all participants that have Raise Hand state on current call, you can use this api array is sorted by order field:
6565
```java
6666
RaiseHandFeature raiseHandFeature = call.feature(Features.RAISE_HAND);
67-
List<RaiseHand> activeStates = raiseHandFeature.getStatus();
67+
List<RaiseHand> activeStates = raiseHandFeature.getRaisedHands();
6868
```
6969

7070
### Order of raised Hands
7171
It possible to get order of all raised hand states on the call, this order is started from 1.
72-
There are two ways: get all raise hand state on the call or use `raiseHandChanged` event subscription.
7372
In event subscription when any participant will lower a hand - call will generate only one event, but not for all participants with order above.
7473

7574
```java
7675
const raiseHandFeature = call.feature(Features.RaiseHand );
77-
for (RaiseHand state : raiseHandFeature.getStatus() {
76+
for (RaiseHand state : raiseHandFeature.getRaisedHands() {
7877
CommunicationIdentifier identifier = state.getIdentifier();
7978
int order = state.getOrder();
8079
}
81-
82-
83-
// event example: {identifier: CommunicationIdentifier, isRaised: true, order:1}
84-
call.feature(Features.RAISE_HAND).addOnRaiseHandReceivedListener(raiseHandEvent -> {
85-
Log.i(TAG, String.format("Raise Hand: %s : %s", Utilities.toMRI(raiseHandEvent.getIdentifier()), raiseHandEvent.getOrder()));
86-
});
8780
```

articles/communication-services/how-tos/calling-sdk/includes/raise-hand/raise-hand-ios.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ Currently ACS calls aren't allowed to change state of other participants, for ex
5050
```swift
5151

5252
// remove raise hand states for all participants on the call
53-
raisehandFeature.lowerHandForEveryone(completionHandler: { (error) in
53+
raisehandFeature.lowerAllHands(completionHandler: { (error) in
5454
if let error = error {
5555
print ("Feature failed lower all hands %@", error as Error)
5656
}
5757
})
5858

5959
// remove raise hand states for all remote participants on the call
6060
let identifiers = (call?.remoteParticipants.map {$0.identifier})!;
61-
raisehandFeature.lowerHand(participants: identifiers, completionHandler: { (error) in
61+
raisehandFeature.lowerHands(participants: identifiers, completionHandler: { (error) in
6262
if let error = error {
6363
print ("Feature failed lower hands %@", error as Error)
6464
}
@@ -67,7 +67,7 @@ raisehandFeature.lowerHand(participants: identifiers, completionHandler: { (erro
6767
// remove raise hand state of specific user
6868
var identifiers : [CommunicationIdentifier] = []
6969
identifiers.append(CommunicationUserIdentifier("<USER_ID>"))
70-
raisehandFeature.lowerHand(participants: identifiers, completionHandler: { (error) in
70+
raisehandFeature.lowerHands(participants: identifiers, completionHandler: { (error) in
7171
if let error = error {
7272
print ("Feature failed lower hands %@", error as Error)
7373
}
@@ -76,7 +76,7 @@ raisehandFeature.lowerHand(participants: identifiers, completionHandler: { (erro
7676
```
7777

7878
### Handle changed states
79-
The `Raise Hand` API allows you to subscribe to `didReceiveRaiseHandEvent` events. A `didReceiveRaiseHandEvent` event comes from a `call` instance and contain information about participant and new state.
79+
The `Raise Hand` API allows you to subscribe to `didReceiveRaisedHand` and `didReceiveLoweredHand` events. Event comes from a `call` instance and contain information about participant and new state.
8080
```swift
8181
self.callObserver = CallObserver(view:self)
8282

@@ -85,10 +85,16 @@ raisehandFeature!.delegate = self.callObserver
8585

8686
public class CallObserver : NSObject, RaiseHandCallFeatureDelegate
8787
{
88-
// event example : {identifier: CommunicationIdentifier, isRaised: true, order:1}
89-
public func raiseHandCallFeature(_ raiseHandCallFeature: RaiseHandCallFeature, didReceiveRaiseHandEvent args: RaiseHandEvent) {
90-
os_log("Raise hand feature updated: %s : %d", log:log, Utilities.toMri(args.identifier), args.isRaised)
91-
raiseHandCallFeature.status.forEach { raiseHand in
88+
// event example : {identifier: CommunicationIdentifier}
89+
public func raiseHandCallFeature(_ raiseHandCallFeature: RaiseHandCallFeature, didReceiveRaisedHand args: RaisedHandChangedEventArgs) {
90+
os_log("Raise hand feature updated: %s is raised hand", log:log, Utilities.toMri(args.identifier))
91+
raiseHandCallFeature.raisedHands.forEach { raiseHand in
92+
os_log("Raise hand active: %s", log:log, Utilities.toMri(raiseHand.identifier))
93+
}
94+
}
95+
public func raiseHandCallFeature(_ raiseHandCallFeature: RaiseHandCallFeature, didReceiveLoweredHand args: LoweredHandChangedEventArgs) {
96+
os_log("Raise hand feature updated: %s is lowered hand", log:log, Utilities.toMri(args.identifier))
97+
raiseHandCallFeature.raisedHands.forEach { raiseHand in
9298
os_log("Raise hand active: %s", log:log, Utilities.toMri(raiseHand.identifier))
9399
}
94100
}
@@ -99,19 +105,19 @@ public class CallObserver : NSObject, RaiseHandCallFeatureDelegate
99105
To get information about all participants that have Raise Hand state on current call, you can use this api array is sorted by order field:
100106
```swift
101107
raisehandFeature = self.call!.feature(Features.raiseHand)
102-
raisehandFeature.status.forEach { raiseHand in
108+
raisehandFeature.raisedHands.forEach { raiseHand in
103109
os_log("Raise hand active: %s", log:log, Utilities.toMri(raiseHand.identifier))
104110
}
105111
```
106112

107113
### Order of raised Hands
108114
It possible to get order of all raised hand states on the call, order is started from 1 and will be sorted.
109-
There are two ways: get all raise hand state on the call or use `didReceiveRaiseHandEvent` event subscription.
115+
There are two ways: get all raise hand state on the call or use `didReceiveRaisedHand` event subscription.
110116
In event subscription when any participant will lower a hand - call will generate only one event, but not for all participants with order above.
111117

112118
```swift
113119
raisehandFeature = self.call!.feature(Features.raiseHand)
114-
raisehandFeature.status.forEach { raiseHand in
120+
raisehandFeature.raisedHands.forEach { raiseHand in
115121
os_log("Raise hand active: %s with order %d", log:log, Utilities.toMri(raiseHand.identifier), raiseHand.order)
116122
}
117123
```

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,47 +39,50 @@ Currently ACS calls aren't allowed to change state of other participants, for ex
3939
```js
4040
const raiseHandFeature = call.feature(Features.RaiseHand );
4141
//lower all hands on the call
42-
raiseHandFeature.lowerHandForEveryone();
42+
raiseHandFeature.lowerAllHands();
4343
//or we can provide array of CommunicationIdentifier to specify list of participants
4444
CommunicationUserIdentifier acsUser = new CommunicationUserIdentifier(<USER_ID>);
4545
MicrosoftTeamsUserIdentifier teamsUser = new MicrosoftTeamsUserIdentifier(<USER_ID>)
4646
CommunicationIdentifier participants[] = new CommunicationIdentifier[]{ acsUser, teamsUser };
47-
raiseHandFeature.lowerHand(participants);
47+
raiseHandFeature.lowerHands(participants);
4848
```
4949

5050
### Handle changed states
51-
The `Raise Hand` API allows you to subscribe to `raiseHandChanged` events. A `raiseHandChanged` event comes from a `call` instance and contain information about participant and new state.
51+
The `Raise Hand` API allows you to subscribe to `raisedHandEvent` or `loweredHandEvent` events. Events comes from a `call` instance and contain information about participant.
5252
```js
5353
const raiseHandFeature = call.feature(Features.RaiseHand );
5454

55-
// event : {identifier: CommunicationIdentifier, isRaised: true, order:1}
56-
const isRaiseHandChangedHandler = (event) => {
57-
console.log(`Participant ${event.identifier} ${event.isRaised ? "Raised" : "Lower"} hand`);
55+
// event : {identifier: CommunicationIdentifier}
56+
const raisedHandChangedHandler = (event) => {
57+
console.log(`Participant ${event.identifier} raised hand`);
58+
};
59+
const loweredHandChangedHandler = (event) => {
60+
console.log(`Participant ${event.identifier} lowered hand`);
5861
};
59-
raiseHandFeature.feature(SDK.Features.RaiseHand).on('raiseHandChanged', isRaiseHandChangedHandler):
62+
raiseHandFeature.feature(SDK.Features.RaiseHand).on('raisedHandEvent', raisedHandChangedHandler):
63+
raiseHandFeature.feature(SDK.Features.RaiseHand).on('loweredHandEvent', loweredHandChangedHandler):
6064
```
6165

6266
### List of all participants with active state
6367
To get information about all participants that have Raise Hand state on current call, you can use this api array is sorted by order field:
6468
```js
6569
const raiseHandFeature = call.feature(Features.RaiseHand );
66-
let activeStates = raiseHandFeature.getStatus();
70+
let activeStates = raiseHandFeature.getRaisedHands();
6771
```
6872

6973
### Order of raised Hands
7074
It possible to get order of all raised hand states on the call, this order is started from 1.
71-
There are two ways: get all raise hand state on the call or use `raiseHandChanged` event subscription.
7275
In event subscription when any participant will lower a hand - call will generate only one event, but not for all participants with order above.
7376

7477
```js
7578
const raiseHandFeature = call.feature(Features.RaiseHand );
7679

7780
// event : {identifier: CommunicationIdentifier, isRaised: true, order:1}
78-
const isRaiseHandChangedHandler = (event) => {
81+
const raiseHandChangedHandler = (event) => {
7982
console.log(`List of participants with raised hand`);
80-
for (let state : raiseHandFeature.getStatus()) {
83+
for (let state : raiseHandFeature.getRaisedHands()) {
8184
console.log(`Participant ${state.identifier} has order ${state.order}`);
8285
}
8386
};
84-
raiseHandFeature.feature(SDK.Features.RaiseHand).on('raiseHandChanged', isRaiseHandChangedHandler):
87+
raiseHandFeature.feature(SDK.Features.RaiseHand).on('raisedHandEvent', raiseHandChangedHandler):
8588
```

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,49 +42,54 @@ Currently ACS calls aren't allowed to change state of other participants, for ex
4242
```csharp
4343

4444
// remove raise hand states for all participants on the call
45-
raiseHandCallFeature.LowerHandForEveryoneAsync();
45+
raiseHandCallFeature.LowerAllHandsAsync();
4646

4747
// remove raise hand states for all remote participants on the call
4848
var participants = call.RemoteParticipants;
4949
var identifiers = participants.Select(p => p.Identifier).ToList().AsReadOnly();
50-
raiseHandCallFeature.LowerHandAsync(identifiers);
50+
raiseHandCallFeature.LowerHandsAsync(identifiers);
5151

5252
// remove raise hand state of specific user
5353
var identifiers = new List<CallIdentifier>();
5454
identifiers.Add(new UserCallIdentifier("USER_ID"));
55-
raiseHandCallFeature.LowerHandAsync(identifiers);
55+
raiseHandCallFeature.LowerHandsAsync(identifiers);
5656
```
5757

5858
### Handle changed states
59-
The `Raise Hand` API allows you to subscribe to `didReceiveRaiseHandEvent` events. A `didReceiveRaiseHandEvent` event comes from a `call` instance and contain information about participant and new state.
59+
The `Raise Hand` API allows you to subscribe to `RaisedHandReceived` events. A `LoweredhandReceived` event comes from a `call` instance and contain information about participant and new state.
6060
```swift
6161
raiseHandCallFeature = (RaiseHandCallFeature)call.GetCallFeatureExtension(CallFeatureType.RaiseHand);
62-
raiseHandCallFeature.OnRaiseHandReceived += OnRaiseHandChange;
62+
raiseHandCallFeature.RaisedHandReceived += OnRaisedHandChange;
63+
raiseHandCallFeature.LoweredHandReceived += OnLoweredHandChange;
6364

64-
private async void OnRaiseHandChange(object sender, RaiseHandEvent raiseHandEvent)
65+
private async void OnRaisedHandChange(object sender, RaisedHandChangedEventArgs args)
6566
{
66-
Trace.WriteLine("RaiseHandEvent: participant " + raiseHandEvent.Identifier + " is raised hand " + raiseHandEvent.IsRaised);
67+
Trace.WriteLine("RaiseHandEvent: participant " + args.Identifier + " is raised hand");
68+
}
69+
70+
private async void OnLoweredHandChange(object sender, RaisedHandChangedEventArgs args)
71+
{
72+
Trace.WriteLine("RaiseHandEvent: participant " + args.Identifier + " is lowered hand");
6773
}
6874
```
6975

7076
### List of all participants with active state
7177
To get information about all participants that have Raise Hand state on current call, you can use this api array is sorted by order field:
7278
```swift
7379
raiseHandCallFeature = (RaiseHandCallFeature)call.GetCallFeatureExtension(CallFeatureType.RaiseHand);
74-
foreach (RaiseHand rh in raiseHandCallFeature.Status.ToList())
80+
foreach (RaiseHand rh in raiseHandCallFeature.RaisedHands.ToList())
7581
{
7682
Trace.WriteLine("Participant " + rh.Identifier.RawId + " has raised hand ");
7783
}
7884
```
7985

8086
### Order of raised Hands
8187
It possible to get order of all raised hand states on the call, order is started from 1 and will be sorted.
82-
There are two ways: get all raise hand state on the call or use `didReceiveRaiseHandEvent` event subscription.
8388
In event subscription when any participant will lower a hand - call will generate only one event, but not for all participants with order above.
8489

8590
```swift
8691
raiseHandCallFeature = (RaiseHandCallFeature)call.GetCallFeatureExtension(CallFeatureType.RaiseHand);
87-
foreach (RaiseHand rh in raiseHandCallFeature.Status.ToList())
92+
foreach (RaiseHand rh in raiseHandCallFeature.RaisedHands.ToList())
8893
{
8994
Trace.WriteLine(rh.Order + ". " + rh.Identifier.RawId);
9095
}

0 commit comments

Comments
 (0)