Skip to content

Commit 0c620f2

Browse files
authored
Merge pull request #264 from Azure-Samples/mgamis/add-rooms-api-scripts-to-ui-quickstart
Provide Rooms API scripts to help create rooms and add users for UI Rooms quickstart
2 parents 847a6c9 + 8b9f8a6 commit 0c620f2

File tree

8 files changed

+369
-4
lines changed

8 files changed

+369
-4
lines changed

ui-library-quickstart-rooms/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ This code sample showcases the ability to join a Rooms call using the CallCompos
1818
- [Node.js](https://nodejs.org/en/) Active LTS and Maintenance LTS versions (8.11.1 and 10.14.1 recommended).
1919
- An active Communication Services resource. [Create a Communication Services resource](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource). You will need the endpoint value for the resource
2020
- An identity with both VoIP and Chat scopes. Generate an identity using the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/identity/quick-create-identity).
21-
- Generate Room ID and add the generated user ID to the Room to be able to join the call [Quickstart: Create and manage a room resource](https://docs.microsoft.com/en-us/azure/communication-services/quickstarts/rooms/get-started-rooms?pivots=programming-language-csharp).
21+
- Create a room and add you user id to the room using the provided sample scripts from this Rooms API [quickstart](https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/rooms/get-started-rooms?pivots=programming-language-javascript).
22+
- First, enter your connection string from your Communication Services resource in `node .\src\scripts\settings.js` to run the Rooms client scripts.
23+
- Run the sample script to create a room by running `node .\src\scripts\createRoom.js` and copy the room id.
24+
- Run the sample script to add the user as Presenter to the created room by running `node .\src\scripts\addParticipantToRoom.js <user id> <room id>`
25+
- You can also change the role of the user to Attendee or Consumer in `.\src\scripts\addParticipantToRoom.js` and rerun the script
2226

2327
## Run the code
2428

2529
1. Run `npm i` on the directory of the project to install dependencies
26-
2. Swap placeholders for identifiers in the code.
27-
- Go to the `src` folder and find the `app.tsx` file.
30+
2. Swap placeholders with values in the code.
31+
- Go to the `src` folder and find the `App.tsx` file.
2832
- Enter the `USER_ID` and `TOKEN` for the identity you created.
29-
- Also input value for the `ROOM_ID` to join the room and make sure the user is added to the room to be able to join the room.
33+
- Enter the generated `ROOM_ID` to join the room and make sure the user is added to the room to be able to join the room.
3034
- Optional: You can update the display name to match a string value of your choice.
3135
- Save the file.
3236
4. Run `npm run start`

0 commit comments

Comments
 (0)