Skip to content

Commit 28ca634

Browse files
author
Jill Grant
authored
Merge pull request #277221 from pavelprystinka/pavelprystinka/rooms_call
Update rooms call connection
2 parents 39755b1 + 8aff46f commit 28ca634

File tree

2 files changed

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

2 files changed

+30
-21
lines changed

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

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,24 @@ The Communication Services Call SDK accepts a full Microsoft Teams meeting link.
350350

351351
[!INCLUDE [Public Preview Notice](../../../../includes/public-preview-include.md)]
352352

353-
To set up a Azure Communication Services 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 Azure Communication Services.
355-
353+
To set up a Azure Communication Services Rooms call, initialize a `CallCompositeRoomLocator` with a room ID.
354+
While on the setup screen, `CallComposite` will enable camera and microphone to all participants with any room role. Actual up-to-date participant role and capabilities are retrieved from Azure Communication Services once call is connected.
356355

357356
For more information about Rooms, how to create and manage one see [Rooms Quickstart](../../../rooms/get-started-rooms.md)
358357

359358
#### [Kotlin](#tab/kotlin)
360359

361360
```kotlin
361+
// Optionally, if user is a Consumer role, disable camera and microphone buttons on the setup screen:
362+
val setupScreenOptions = CallCompositeSetupScreenOptions()
363+
.setCameraButtonEnabled(false)
364+
.setMicrophoneButtonEnabled(false)
365+
366+
367+
val callComposite = CallCompositeBuilder()
368+
.setupScreenOptions(setupScreenOptions)
369+
.build()
370+
362371
val locator = CallCompositeRoomLocator("<ROOM_ID>")
363372

364373
val remoteOptions = CallCompositeRemoteOptions(
@@ -367,26 +376,28 @@ val remoteOptions = CallCompositeRemoteOptions(
367376
"DISPLAY_NAME",
368377
)
369378

370-
val localOptions = CallCompositeLocalOptions().setRoleHint(participantRole)
371-
372-
val callComposite = CallCompositeBuilder().build()
373-
callComposite.launch(context, remoteOptions, localOptions)
379+
callComposite.launch(context, remoteOptions)
374380
```
375381

376382
#### [Java](#tab/java)
377383

378384
```java
385+
// Optionally, if user is a Consumer role, disable camera and microphone buttons on the setup screen:
386+
CallCompositeSetupScreenOptions setupScreenOptions = new CallCompositeSetupScreenOptions()
387+
.setCameraButtonEnabled(false)
388+
.setMicrophoneButtonEnabled(false);
389+
390+
CallComposite callComposite = new CallCompositeBuilder()
391+
.setupScreenOptions(setupScreenOptions)
392+
.build();
393+
379394
CallCompositeJoinLocator locator = new CallCompositeRoomLocator("<ROOM_ID>");
380395

381396
CallCompositeRemoteOptions remoteOptions = new CallCompositeRemoteOptions(
382397
locator,
383398
communicationTokenCredential,
384399
"DISPLAY_NAME");
385-
386-
CallCompositeLocalOptions localOptions = new CallCompositeLocalOptions().setRoleHint(participantRole);
387-
388-
CallComposite callComposite = new CallCompositeBuilder().build();
389-
callComposite.launch(context, remoteOptions, localOptions);
400+
callComposite.launch(context, remoteOptions);
390401
```
391402

392403
---

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,23 +215,21 @@ The Communication Services Call SDK accepts a full Microsoft Teams meeting link.
215215
216216
[!INCLUDE [Public Preview Notice](../../../../includes/public-preview-include.md)]
217217
218-
To set up a Azure Communication Services 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 Azure Communication Services.
223-
218+
To set up a Azure Communication Services Rooms call, initialize a `CallCompositeRoomLocator` with a room ID.
219+
While on the setup screen, `CallComposite` will enable camera and microphone to all participants with any room role. Actual up-to-date participant role and capabilities are retrieved from Azure Communication Services once call is connected.
224220
225221
For more information about Rooms, how to create and manage one see [Rooms Quickstart](../../../rooms/get-started-rooms.md)
226222
227223
```swift
228224
let remoteOptions = RemoteOptions(for: .roomCall(roomId: "<ROOM_ID>"),
229225
credential: communicationTokenCredential,
230226
displayName: "<DISPLAY_NAME>")
231-
let localOptions = LocalOptions(roleHint: participantRole)
232227
233-
let callComposite = CallComposite()
234-
callComposite.launch(remoteOptions: remoteOptions, localOptions: localOptions)
228+
// Optionally, if user is a Consumer role, disable camera and microphone buttons on the setup screen:
229+
let setupScreenOptions = SetupScreenOptions(cameraButtonEnabled: false, microphoneButtonEnabled: false)
230+
let callCompositeOptions = CallCompositeOptions(setupScreenOptions: setupScreenOptions)
231+
232+
let callComposite = CallComposite(withOptions: callCompositeOptions)
235233
```
236234
237235
### Launch the composite

0 commit comments

Comments
 (0)