Skip to content

Commit 543be20

Browse files
authored
Merge pull request #209329 from radubulboaca/master
add call role info & sdk references
2 parents 67469a0 + 5651175 commit 543be20

File tree

7 files changed

+73
-1
lines changed

7 files changed

+73
-1
lines changed

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-call-android.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,28 @@ call.addOnStateChangedListener { args: PropertyChangedEvent? ->
5353
args!!
5454
)
5555
}
56+
```
57+
58+
To display the role of the local call participant or remote call participants, subscribe to the handler below. Learn more about roles and permissions for room call participants [here](../../../concepts/rooms/room-concept.md#predefined-participant-roles-and-permissions).
59+
60+
```java
61+
// Get your role in the call
62+
call.getRole();
63+
64+
// Subscribe to changes for your role in a call
65+
private void isCallRoleChanged(PropertyChangedEvent propertyChangedEvent) {
66+
// handle self-role change
67+
}
68+
69+
call.addOnRoleChangedListener(isCallRoleChanged);
70+
71+
// Subscribe to role changes for remote participants
72+
private void isRoleChanged(PropertyChangedEvent propertyChangedEvent) {
73+
// handle remote participant role change
74+
}
75+
76+
remoteParticipant.addOnRoleChangedListener(isRoleChanged);
77+
78+
// Get role of the remote participant
79+
remoteParticipant.getRole();
5680
```

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-call-ios.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,17 @@ func setCallAndObserver(call:Call!, error:Error?) {
9999
}
100100
}
101101
```
102+
103+
To display the role of the local call participant or remote call participants, subscribe to the handler below. Learn more about roles and permissions for room call participants [here](../../../concepts/rooms/room-concept.md#predefined-participant-roles-and-permissions).
104+
105+
```swift
106+
// Subscribe to changes for your role in a call
107+
public func call(_ call: Call, didChangeRole args: PropertyChangedEventArgs) {
108+
// handle self-role change
109+
}
110+
111+
// Subscribe to role changes for remote participants
112+
func remoteParticipant(_ remoteParticipant: RemoteParticipant, didChangeRole args: PropertyChangedEventArgs) {
113+
// handle remote participant role change
114+
}
115+
```

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-call-web.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,21 @@ const context = { roomId: '<RoomId>' }
2525
const call = callAgent.join(context);
2626

2727
```
28+
29+
To display the role of the local call participant or remote call participants, subscribe to the handler below. Learn more about roles and permissions for room call participants [here](../../../concepts/rooms/room-concept.md#predefined-participant-roles-and-permissions).
30+
31+
```js
32+
// Subscribe to changes for your role in a call
33+
const callRoleChangedHandler = () => {
34+
console.log(call.role);
35+
};
36+
37+
call.on('roleChanged', callRoleChangedHandler);
38+
39+
// Subscribe to role changes for remote participants
40+
const subscribeToRemoteParticipant = (remoteParticipant) => {
41+
remoteParticipant.on('roleChanged', () => {
42+
console.log(remoteParticipant.role);
43+
});
44+
}
45+
```

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-java.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,4 +190,8 @@ If you wish to disband an existing `room`, you may issue an explicit delete requ
190190

191191
```java
192192
roomsClient.deleteRoomWithResponse(roomId, Context.NONE);
193-
```
193+
```
194+
195+
## Reference documentation
196+
197+
Read about the full set of capabilities of Azure Communication Services rooms from the [Java SDK reference](https://docs.microsoft.com/java/api/overview/azure/communication-rooms-readme) or [REST API reference](https://docs.microsoft.com/rest/api/communication/rooms).

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-javascript.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,7 @@ If you wish to disband an existing `room`, you may issue an explicit delete requ
161161
// deletes the specified room
162162
await roomsClient.deleteRoom(roomId);
163163
```
164+
165+
## Reference documentation
166+
167+
Read about the full set of capabilities of Azure Communication Services rooms from the [JavaScript SDK reference](https://docs.microsoft.com/javascript/api/overview/azure/communication-rooms-readme) or [REST API reference](https://docs.microsoft.com/rest/api/communication/rooms).

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-net.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,7 @@ If you wish to disband an existing `room`, you may issue an explicit delete requ
145145
```csharp
146146
Response deleteRoomResponse = await roomsClient.DeleteRoomAsync(createdRoomId);
147147
```
148+
149+
## Reference documentation
150+
151+
Read about the full set of capabilities of Azure Communication Services rooms from the [.NET SDK reference](https://docs.microsoft.com/dotnet/api/azure.communication.rooms) or [REST API reference](https://docs.microsoft.com/rest/api/communication/rooms).

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-python.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,7 @@ If you wish to disband an existing `room`, you may issue an explicit delete requ
164164
```python
165165
self.rooms_client.delete_room(room_id=room)
166166
```
167+
168+
## Reference documentation
169+
170+
Read about the full set of capabilities of Azure Communication Services rooms from the [Python SDK reference](https://docs.microsoft.com/python/api/overview/azure/communication-rooms-readme) or [REST API reference](https://docs.microsoft.com/rest/api/communication/rooms).

0 commit comments

Comments
 (0)