You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Raise Hand API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. To use this api please use 'alpha' release of Azure Communication Services Calling Web SDK
10
+
The Raise Hand feature allows participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. This feature can be used in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11
+
You first need to import calling Features from the Calling SDK:
12
12
13
-
Raise Hand is an extended feature of the core `Call` API. You first need to import calling Features from the Calling SDK:
Currently ACS calls aren't allowed to change state of other participants, for example, lower all hands. But Teams calls allow it using these methods:
39
-
```js
35
+
This feature allows users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, changing the state of other participants is not allowed unless roles have been added.
36
+
37
+
To use this feature, you can use the following code:
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.
54
-
```js
52
+
With the Raise Hand API, you can subscribe to the `RaisedHandReceived` and `LoweredHandReceived` events to handle changes in the state of participants on a call. These events are triggered by a call instance and provide information about the participant whose state has changed.
53
+
54
+
To subscribe to these events, you can use the following code:
The `RaisedHandReceived` and `LoweredHandReceived` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the example above, we log a message to the console indicating that a participant has raised their hand.
64
+
65
+
To unsubscribe from the events, you can use the `off` method.
66
+
62
67
63
68
### List of all participants with active state
64
-
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:
65
-
```js
69
+
To get information about all participants that have raised hand state on current call, you can use the `getRaisedHands` api. he returned array is sorted by the order field.
70
+
Here's an example of how to use the `getRaisedHands` API:
The Raise Hand feature allows participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. This feature can be used in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11
+
You first need to import calling Features from the Calling SDK:
12
+
13
+
```swift
14
+
importAzureCommunicationCalling
15
+
```
16
+
17
+
Then you can get the feature API object from the call instance:
To change the Raise Hand state for the current participant, you can use the `raiseHand()` and `lowerHand()` methods.
27
+
```swift
28
+
//publish raise hand state for local participant
29
+
raisehandFeature.raiseHand(completionHandler: { (error) in
30
+
iflet error = error {
31
+
print ("Feature failed raise a hand %@", error asError)
32
+
}
33
+
})
34
+
35
+
//remove raise hand state for local participant
36
+
raisehandFeature.lowerHand(completionHandler: { (error) in
37
+
iflet error = error {
38
+
print ("Feature failed lower hand %@", error asError)
39
+
}
40
+
})
41
+
42
+
```
43
+
44
+
### Lower hands for other participants
45
+
This feature allows users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, changing the state of other participants is not allowed unless roles have been added.
46
+
47
+
To use this feature, you can use the following code:
48
+
```swift
49
+
50
+
// remove raise hand states for all participants on the call
51
+
raisehandFeature.lowerAllHands(completionHandler: { (error) in
52
+
iflet error = error {
53
+
print ("Feature failed lower all hands %@", error asError)
54
+
}
55
+
})
56
+
57
+
// remove raise hand states for all remote participants on the call
58
+
let identifiers = (call?.remoteParticipants.map {$0.identifier})!;
59
+
raisehandFeature.lowerHands(participants: identifiers, completionHandler: { (error) in
With the Raise Hand API, you can subscribe to the `RaisedHandReceived` and `LoweredHandReceived` events to handle changes in the state of participants on a call. These events are triggered by a call instance and provide information about the participant whose state has changed.
78
+
79
+
To subscribe to these events, you can use the following code:
os_log("Raise hand feature updated: %s is lowered hand", log:log, Utilities.toMri(args.identifier))
97
+
raiseHandCallFeature.raisedHands.forEach { raiseHand in
98
+
os_log("Raise hand active: %s", log:log, Utilities.toMri(raiseHand.identifier))
99
+
}
100
+
}
101
+
}
102
+
```
103
+
The `RaisedHandReceived` and `LoweredHandReceived` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the example above, we log a message to the console indicating that a participant has raised their hand.
104
+
105
+
To unsubscribe from the events, you can use the `off` method.
106
+
107
+
108
+
### List of all participants with active state
109
+
To get information about all participants that have raised hand state on current call, you can use the `getRaisedHands` api. he returned array is sorted by the order field.
110
+
Here's an example of how to use the `raisedHands` API:
> Raise Hand API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. To use this api please use 'alpha' release of Azure Communication Services Calling Web SDK
12
-
13
-
Raise Hand is an extended feature of the core `Call` API. You first need to import calling Features from the Calling SDK:
10
+
The Raise Hand feature allows participants in a call to indicate that they have a question, comment, or concern without interrupting the speaker or other participants. This feature can be used in any call type, including 1:1 calls and calls with many participants, in Azure Communication Service and in Teams calls.
11
+
You first need to import calling Features from the Calling SDK:
Currently ACS calls aren't allowed to change state of other participants, for example, lower all hands. But Teams calls allow it using these methods:
35
+
This feature allows users with the Organizer and Presenter roles to lower all hands for other participants on Teams calls. In Azure Communication calls, changing the state of other participants is not allowed unless roles have been added.
36
+
37
+
To use this feature, you can use the following code:
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.
50
+
With the Raise Hand API, you can subscribe to the `raisedHandChanged` and `loweredHandChanged` events to handle changes in the state of participants on a call. These events are triggered by a call instance and provide information about the participant whose state has changed.
51
+
52
+
To subscribe to these events, you can use the following code:
The `raisedHandChanged` and `loweredHandChanged` events contain an object with the `identifier` property, which represents the participant's communication identifier. In the example above, we log a message to the console indicating that a participant has raised their hand.
67
+
68
+
To unsubscribe from the events, you can use the `off` method.
61
69
62
70
### List of all participants with active state
63
-
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:
71
+
To get information about all participants that have raised hand state on current call, you can use the `getRaisedHands` api. he returned array is sorted by the order field.
72
+
Here's an example of how to use the `getRaisedHands` API:
0 commit comments