Skip to content

Commit

Permalink
Merge branch 'main' into WEB-2312-screenshare-props
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 committed Oct 10, 2023
2 parents 5ed29ff + 8c09b9d commit 1a3bdea
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion docs/javascript/v2/quickstart/prebuilt-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,29 @@ npm run dev

![Join](/docs/v2/prebuilt-room.png)

The Prebuilt component behaves like the 100ms sample app which can be forked from this [GitHub repository](https://github.com/100mslive/100ms-web).
The Prebuilt component behaves like the 100ms sample app which can be forked from this [GitHub repository](https://github.com/100mslive/100ms-web).

There are two ways to join the room - using the roomCode prop, or using the roomId and role in combination instead. The props are listed in the below section.

## Props for HMSPrebuilt

<br />
HMSPrebuilt accepts the following props:

`roomCode` (optional if roomId and role are being used instead)
- The room code of the room you want to join. You can get the room code from the [100ms dashboard](https://dashboard.100ms.live). This prop can be skipped if the roomId and role are being provided instead.

`logo` (optional)
- An image URL as a string which is displayed in the preview screen and header.

`authToken` (optional)
- Can be copied from the developer section of the [dashboard](https://dashboard.100ms.live). Read more about it [here](/get-started/v2/get-started/security-and-tokens#auth-token-for-client-sdks).

`roomId` (optional unless roomCode is not being used)
- The room ID of the room you want to join. You can get the room ID from the [dashboard](https://dashboard.100ms.live). It should be specified with the role prop if the room code is not being provided.

`role` (optional unless roomId is specified)
- A string specifying the role of the peer. Should be specified if the roomId is being used to join the room.

`onLeave` (optional)
- A callback function that will be executed after the peer leaves the call, the session ends or if the peer gets kicked out.

0 comments on commit 1a3bdea

Please sign in to comment.