Skip to content

Commit ad0eaad

Browse files
Merge pull request #230841 from pavelprystinka/feture/ui_library_rooms_call
Quickstart UI library Android and iOS Rooms integration
2 parents d208ec2 + f98cc5d commit ad0eaad

File tree

2 files changed

+70
-3
lines changed
  • articles/communication-services/quickstarts/ui-library/includes/get-started-call

2 files changed

+70
-3
lines changed

articles/communication-services/quickstarts/ui-library/includes/get-started-call/android.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,60 @@ CallCompositeRemoteOptions remoteOptions = new CallCompositeRemoteOptions(
337337
communicationTokenCredential,
338338
"DISPLAY_NAME");
339339
```
340-
---
341-
342-
---
343340

344341
#### Get a Microsoft Teams meeting link
345342

346343
You can get a Microsoft Teams meeting link by using Graph APIs. This process is detailed in [Graph documentation](/graph/api/onlinemeeting-createorget?preserve-view=true&tabs=http&view=graph-rest-beta).
347344

348345
The Communication Services Call SDK accepts a full Microsoft Teams meeting link. This link is returned as part of the `onlineMeeting` resource, under the [joinWebUrl property](/graph/api/resources/onlinemeeting?preserve-view=true&view=graph-rest-beta). You also can get the required meeting information from the **Join Meeting** URL in the Teams meeting invite itself.
349346

347+
---
348+
349+
### Set up a Rooms call
350+
351+
[!INCLUDE [Public Preview Notice](../../../../includes/public-preview-include.md)]
352+
353+
To set up a ACS Rooms call, initialize a `CallCompositeRoomLocator`, supply it to the `CallCompositeRemoteOptions` object and set `CallCompositeParticipantRole` to the `CallCompositeLocalOptions` by `setRoleHint()`.
354+
`CallComposite` will use role hint before connecting to the call. Once call is connected, actual up-to-date participant role is retrieved from ACS.
355+
356+
357+
For more information about Rooms, how to create and manage one see [Rooms Quickstart](../../../rooms/get-started-rooms.md)
358+
359+
#### [Kotlin](#tab/kotlin)
360+
361+
```kotlin
362+
val locator = CallCompositeRoomLocator("<ROOM_ID>")
363+
364+
val remoteOptions = CallCompositeRemoteOptions(
365+
locator,
366+
communicationTokenCredential,
367+
"DISPLAY_NAME",
368+
)
369+
370+
val localOptions = CallCompositeLocalOptions().setRoleHint(participantRole)
371+
372+
val callComposite = CallCompositeBuilder().build()
373+
callComposite.launch(context, remoteOptions, localOptions)
374+
```
375+
376+
#### [Java](#tab/java)
377+
378+
```java
379+
CallCompositeJoinLocator locator = new CallCompositeRoomLocator("<ROOM_ID>");
380+
381+
CallCompositeRemoteOptions remoteOptions = new CallCompositeRemoteOptions(
382+
locator,
383+
communicationTokenCredential,
384+
"DISPLAY_NAME");
385+
386+
CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions().setRoleHint(participantRole);
387+
388+
CallComposite callComposite = new CallCompositeBuilder().build();
389+
callComposite.launch(context, remoteOptions, localOptions);
390+
```
391+
392+
---
393+
350394
### Launch the composite
351395

352396
To launch the call UI, inside the `startCallComposite` function, call `launch` on the `CallComposite` instance.

articles/communication-services/quickstarts/ui-library/includes/get-started-call/ios.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,29 @@ You can get a Microsoft Teams meeting link by using Graph APIs. This process is
211211
212212
The Communication Services Call SDK accepts a full Microsoft Teams meeting link. This link is returned as part of the `onlineMeeting` resource, under the [joinWebUrl property](/graph/api/resources/onlinemeeting?preserve-view=true&view=graph-rest-beta). You also can get the required meeting information from the **Join Meeting** URL in the Teams meeting invite itself.
213213
214+
### Set up a Rooms call
215+
216+
[!INCLUDE [Public Preview Notice](../../../../includes/public-preview-include.md)]
217+
218+
To set up a ACS Rooms call, inside the `startCallComposite` function, initialize a `RemoteOptions` instance for the `.roomCall` locator. Replace `<ROOM_ID>` with the Room ID for your call. Initialize a `LocalOptions` instance with `roleHint`.
219+
220+
Replace `<DISPLAY_NAME>` with your name.
221+
222+
`CallComposite` will use role hint before connecting to the call. Once call is connected, actual up-to-date participant role is retrieved from ACS.
223+
224+
225+
For more information about Rooms, how to create and manage one see [Rooms Quickstart](../../../rooms/get-started-rooms.md)
226+
227+
```swift
228+
let remoteOptions = RemoteOptions(for: .roomCall(roomId: "<ROOM_ID>"),
229+
credential: communicationTokenCredential,
230+
displayName: "<DISPLAY_NAME>")
231+
let localOptions = LocalOptions(roleHint: participantRole)
232+
233+
let callComposite = CallComposite()
234+
callComposite.launch(remoteOptions: remoteOptions, localOptions: localOptions)
235+
```
236+
214237
### Launch the composite
215238
216239
Inside the `startCallComposite` function, call `launch` on the `CallComposite` instance:

0 commit comments

Comments
 (0)