diff --git a/docs/server-side/v2/api-reference/Rooms/create-via-api.mdx b/docs/server-side/v2/api-reference/Rooms/create-via-api.mdx index 5d07a575a9..160ce85b68 100644 --- a/docs/server-side/v2/api-reference/Rooms/create-via-api.mdx +++ b/docs/server-side/v2/api-reference/Rooms/create-via-api.mdx @@ -28,11 +28,13 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms' \ "name": "new-room-1662723668", "enabled": true, "description": "This is a sample description for the room", - "customer": "627cdddff2e4e30487862ad1", + "customer_id": "627cdddff2e4e30487862ad1", + "app_id":"62510797903d857ab8ec3ba5", "recording_info": { "enabled": false }, "template_id": "63188115d11d6db790c73c60", + "template": "sample-template-name", "region": "us", "created_at": "2022-09-09T11:41:08.082Z", "updated_at": "2022-09-09T11:41:08.074Z" @@ -43,15 +45,17 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms' \ ## Main Arguments -| Name | Type | Description | Required | -| :------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| name
| `string` | An alias you can assign to 100ms rooms. This is `case-insensitive`.

Accepted characters are `a-z, A-Z, 0-9, and . - : _`. If not provided, this is generated automatically.

**Note**: If `Create room request` is triggered with an existing room name, then the corresponding room ID is returned. | No | -| description
| `string` | A string to describe your room's usage. For example "9PM English Class Batch 2" | No | -| template_id
| `string` | Template ID of template you wish to associate with the room. You can get template ID either from the templates section on the [dashboard](https://dashboard.100ms.live/dashboard) or use the [Template API](../policy/retrieve-a-template).

**Note**: `default template` will be assigned if template is not specified in the `create room request`. | No | -| recording_info
| `object` | Object of type `recording_info`. This object contains information for enabling recording/setting storage location for recordings.

Check the [recording_info arguments](#recording-info-arguments) below for more information. | No | -| region
| `string` | Region in which you want to create a room.

`eu` - European Union

`in` - India

`us` - United States


`auto` Fallback to region of the template (default value) | No | +| Name | Type | Description | Required | +|:---------------------|:----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------| +| name
| `string` | An alias you can assign to 100ms rooms. This is `case-insensitive`.

Accepted characters are `a-z, A-Z, 0-9, and . - : _`. If not provided, this is generated automatically.

**Note**: If `Create room request` is triggered with an existing room name, then the corresponding room ID is returned. | No | +| description
| `string` | A string to describe your room's usage. For example "9PM English Class Batch 2" | No | +| template_id
| `string` | Template ID of template you wish to associate with the room. You can get template ID either from the templates section on the [dashboard](https://dashboard.100ms.live/dashboard) or use the [Template API](../policy/retrieve-a-template).

**Note**: `default template` will be assigned if template is not specified in the `create room request`. | No | +| recording_info
| `object` | Object of type `recording_info`. This object contains information for enabling recording/setting storage location for recordings.

Check the [recording_info arguments](#recording-info-arguments) below for more information. | No | +| region
| `string` | Region in which you want to create a room.

`eu` - European Union

`in` - India

`us` - United States


`auto` Fallback to region of the template (default value) | No | +| large_room
| `boolean` | Enable this flag if the requirement is to support more than 2500 peers in the room. You are also required to update to latest SDKs to support this functionality. By default, this value is set to `false`. Learn more about it in the [large room creation guide](/server-side/v2/how-to-guides/create-large-rooms). | No | +| size
| `int` | This value is used to define the maximum number of peers expected to be joining the given room. Following are the acceptable ranges:

With `large_room: false`, Minimum `size` = 0; Maximum `size` = 2500

With `large_room: true`, Minimum `size` = 0; Maximum `size` = 20000 | No | -> **Warning:** If you create a room with the name of an existing room, the same room will be updated with the new configuration passed in the request payload.
For example, if the existing room was assigned to template-ABC earlier and in the request payload you've used template-DEF, then template-DEF will be assigned to the existing room. +> **Warning:** If you create a room with the name of an existing room, the same room will be updated with the new configuration passed in the request payload.
For example, if the existing room was assigned to **'template-ABC'** earlier and in the request payload you've used **'template-DEF'**, then **'template-DEF'** will be assigned to the existing room. ## recording_info arguments @@ -59,7 +63,7 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms' \ | Name | Type | Description | Required | | :---------- | :-------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | -| enabled | `boolean` | Enable SFU recording. Disabled by default.

**Note:** This argument is only applicable to enable/disable [SFU recording](/server-side/v2/Destinations/recording). Refer to [RTMP Streaming & Browser Recording](/server-side/v2/Destinations/rtmp-streaming-and-browser-recording) guide for other options. | No | +| enabled | `boolean` | Enable SFU recording. Disabled by default.

**Note:** This argument is only applicable to enable/disable [SFU recording](/server-side/v2/Destinations/recording). Refer to [RTMP Streaming & Browser Recording](/server-side/v2/api-reference/external-streams/overview) guide for other options. | No | | upload_info | `object` | Object of type `upload_info`. This object contains information on recordings storage location.

If you want to store recording with 100ms, and not use your own storage (s3/gs/oss), don't add this to the object.

Check the [upload_info object](#upload-info-arguments) below for more information. | No | `recording_info` in the room acts as an atomic property. It depends on the recording settings defined in a template as below: diff --git a/docs/server-side/v2/api-reference/Rooms/disable-or-enable.mdx b/docs/server-side/v2/api-reference/Rooms/disable-or-enable.mdx index dd52bf2ecb..adcf0c4abe 100644 --- a/docs/server-side/v2/api-reference/Rooms/disable-or-enable.mdx +++ b/docs/server-side/v2/api-reference/Rooms/disable-or-enable.mdx @@ -36,7 +36,9 @@ curl --location --request POST 'https://api.100ms.live/v2/rooms/' \ "template": "", "region": "", "created_at": "2022-09-06T05:08:31.935Z", - "updated_at": "2022-09-08T14:58:25.629819038Z" + "updated_at": "2022-09-08T14:58:25.629819038Z", + "customer": "627cdddff2e4e30487862ad1", + "large_room": false } ``` diff --git a/docs/server-side/v2/api-reference/Rooms/list-rooms.mdx b/docs/server-side/v2/api-reference/Rooms/list-rooms.mdx index 871a505ac4..58ae4fd618 100644 --- a/docs/server-side/v2/api-reference/Rooms/list-rooms.mdx +++ b/docs/server-side/v2/api-reference/Rooms/list-rooms.mdx @@ -38,7 +38,7 @@ curl --location --request GET 'https://api.100ms.live/v2/rooms' \ "name": "test-room", "enabled": true, "description": "This is a test room", - "customer": "627cda********a39291b", + "customer_id": "627cda********a39291b", "recording_source_template": true, "template_id": "627cd********784227d3", "template": "default_createown_e319635a-****-****-****-ae9e95891e31", @@ -46,13 +46,14 @@ curl --location --request GET 'https://api.100ms.live/v2/rooms' \ "created_at": "2022-06-29T03:34:30.194Z", "key": "627***********a39291b:test-room", "updated_at": "0001-01-01T00:00:00Z" + "large_room": false }, { "id": "627cda81********6b077bc33", "name": "4b2705aa-****-****-****-f470c06d0c03", "enabled": true, "description": "This is a test room", - "customer": "627cd********037a39291b", + "customer_id": "627cd********037a39291b", "recording_source_template": false, "recording": { "enabled": false @@ -63,6 +64,8 @@ curl --location --request GET 'https://api.100ms.live/v2/rooms' \ "created_at": "2022-05-12T09:59:29.343Z", "key": "627cda********037a39291b:4b2705aa-****-****-****-f470c06d0c03", "updated_at": "0001-01-01T00:00:00Z" + "large_room": true, + "size":19000 } ], "last": "627cda81bd4f3b56b077bc33" diff --git a/docs/server-side/v2/api-reference/Rooms/object.mdx b/docs/server-side/v2/api-reference/Rooms/object.mdx index 31e9fe7983..e9f8c7da50 100644 --- a/docs/server-side/v2/api-reference/Rooms/object.mdx +++ b/docs/server-side/v2/api-reference/Rooms/object.mdx @@ -8,16 +8,19 @@ nav: 2.2 ## Object | Argument | Description | -| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | id | Unique identifier for the room | | name | Alias for the room | | enabled | Indicates whether the room is enabled or disabled.

**Note:** If you disable a room, that room can be used for only the current session and users will not be able to join the room later. You can use the [Disable/Enable a room API](/server-side/v2/Rooms/disable-or-enable) with the `enabled` param set to `true` to enable the room again. | | description | Description for the room | -| customer | Unique identifier for your account | +| customer_id | Unique identifier for your account | +| customer (deprecated) | Unique identifier for your account same as `customer_id` | | recording_info | Indicates whether the recording is enabled or disabled.

**Note:** `enabled` [argument](/server-side/v2/Rooms/create-via-api#recording-info-arguments) in this object is only applicable to enable/disable [SFU recording](/server-side/v2/Destinations/recording). Refer to [RTMP Streaming & Browser Recording](/server-side/v2/Destinations/rtmp-streaming-and-browser-recording) guide for other options. | | template_id | Identifier for the template used for this room | | template (deprecated) | Name for the template (This field is deprecated. To find template name, fetch template using template_id) | | region | The region in which the room has to be created | +| large_room | Indicates whether the room is capable of supporting large number of peers (>2500) on the conferencing / live streaming setup or not. The client side SDKs are required to be updated to a certain version to support this update. Learn more about enabling large rooms [here](/server-side/v2/how-to-guides/create-large-rooms) | +| size | Indicates the maximum number of peers who can join the given room | ## Postman collection diff --git a/docs/server-side/v2/api-reference/Rooms/overview.mdx b/docs/server-side/v2/api-reference/Rooms/overview.mdx index fa56c86d9a..d7459b4ed3 100644 --- a/docs/server-side/v2/api-reference/Rooms/overview.mdx +++ b/docs/server-side/v2/api-reference/Rooms/overview.mdx @@ -24,6 +24,11 @@ Room APIs will enable you to script actions from the server side based on your b You can control peer behavior and build interactivity scenarios in an active room with the help of [active room APIs](/server-side/v2/active-rooms/overview). +> **Note on large rooms** +> +> If you wish to create a room which can support large number of peers (>2500), you'll be required to create large rooms which are specially optimised to handle a large count as well as use certain specific client SDKs versions. Follow this [guide](/server-side/v2/how-to-guides/create-large-rooms) on creating large rooms. +> + ## Postman collection You can use our Postman collection to start exploring 100ms APIs. diff --git a/docs/server-side/v2/api-reference/Rooms/retrieve-room.mdx b/docs/server-side/v2/api-reference/Rooms/retrieve-room.mdx index 094a2b193e..c60d798e77 100644 --- a/docs/server-side/v2/api-reference/Rooms/retrieve-room.mdx +++ b/docs/server-side/v2/api-reference/Rooms/retrieve-room.mdx @@ -23,7 +23,7 @@ curl --location --request GET 'https://api.100ms.live/v2/rooms/' \ "name": "sampleroom", "enabled": true, "description": "This is sample description for room", - "customer": "627cdddff2e4e30487862ad1", + "customer_id": "627cdddff2e4e30487862ad1", "recording_source_template": false, "recording_info": { "enabled": true, diff --git a/docs/server-side/v2/changelog/release-notes.mdx b/docs/server-side/v2/changelog/release-notes.mdx index ad2a040413..a71f689953 100644 --- a/docs/server-side/v2/changelog/release-notes.mdx +++ b/docs/server-side/v2/changelog/release-notes.mdx @@ -5,7 +5,10 @@ nav: 5.1 This Changelog highlights notable changes to the 100ms server-side API, such as API additions, improvements, and deprecations. Also, we've included developer experience improvements to this page to keep you on track with items that will enhance your integration journey. -### 2023-08-01 +## 2023-10-11 +- Added support for large room creation through the [Room API](/server-side/v2/api-reference/Rooms/overview). Learn more about it in [this guide](/server-side/v2/how-to-guides/create-large-rooms). + +## 2023-08-01 - Added Optimisations to reduce RTMP streaming and recording start delay ## 2023-07-25 diff --git a/docs/server-side/v2/how-to-guides/create-large-rooms.mdx b/docs/server-side/v2/how-to-guides/create-large-rooms.mdx new file mode 100644 index 0000000000..e887179fb5 --- /dev/null +++ b/docs/server-side/v2/how-to-guides/create-large-rooms.mdx @@ -0,0 +1,137 @@ +--- +title: Create large rooms +nav: 8 +--- + +This guide will help you create large rooms which support a conferencing or HLS viewer count of up to **20,000** peers. Integration of multiple SFU instances in a mesh configuration, alongside optimized signaling mechanisms, facilitates efficient management of extensive peer lists and related actions like room joining and hand-raising. This scalability enhancement is particularly valuable for webinar and live streaming scenarios in 100ms rooms. + +Essentially, two implementation details need attention. + + +Creation of a room which has the required optimisations to support a large number of peers. + +[Create a large room →](#create-a-large-room) + + + +Utilisation of first class APIs in the SDKs to handle hand-raise and peer list functionalities. + +[Implement functionalities →](#client-side-implementation) + + + + +## Create a large room + +Standard 100ms rooms handle up to 2500 peers. Large rooms need to be created with special scale optimizations to handle a large number of peers while functioning similarly to standard 100ms rooms. Use 100ms' server-side [Create Room API](/server-side/v2/api-reference/Rooms/create-via-api) to create a room with the `large_room` flag enabled. Use the `size` field to define the maximum number of expected peers in that room. +The following cURL example illustrates how to create a large room. + + + +```bash +curl --location --request POST 'https://api.100ms.live/v2/rooms' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "name": "new-large-room-081023", + "description": "This is a sample description for the room", + "template_id": "", + "large_room": true, + "size":20000 +}' +``` + + + +```json +{ + "id": "631b2654f771854d9bf633df", + "name": "new-large-room-081023", + "enabled": true, + "description": "This is a sample description for the room", + "customer_id": "627cdddff2e4e30487862ad1", + "customer":"627cdddff2e4e30487862ad1", + "app_id":"62510797903d857ab8ec3ba5", + "recording_info": { + "enabled": false + }, + "template_id": "63188115d11d6db790c73c60", + "template": "sample-template-name", + "region": "us", + "size": 20000, + "large_room": true, + "created_at": "2022-09-09T11:41:08.082Z", + "updated_at": "2022-09-09T11:41:08.074Z" +} +``` + + +When using the above API, following points need to be noted: +1. The range of values for `size` can go up to 20,000 when the `large_room` flag is enabled. Expect the following error if a value larger than 20,000 is used. + ```json + { + "code": 400, + "message": "Invalid body param", + "details": [ + "Invalid body param: room size greater than 20000" + ] +} +``` +2. All rooms which require the `size` to be greater than 2500 need to have the `large_room` flag enabled. Expect the following error if a value larger than 2500 is used without enabling the flag. +```json +{ + "code": 400, + "message": "Invalid body param", + "details": [ + "Invalid body param: room size greater than 2500, set large_room flag as true" + ] +} +``` +3. The client side SDK optimisations only kick in if the `large_room` flag is enabled. Additionally, large rooms cannot be created through the 100ms dashboard yet. + +> **Note** +> +> - Large rooms support only 200 publishing peers. Publishing peers are defined as peers with audio and video publishing permissions. +> - Large rooms support a maximum of 200 hand-raises at a single point of time. +> + +## Client-side implementation + +In order to take advantage of these large rooms, you are required to use platform SDKs whose versions are higher than or equal to: +1. For Web - `@100mslive/hms-video-store v0.10.17` and `@100mslive/react-sdk v0.8.17` +2. For Android - `@live.100ms/android-sdk v2.7.7` +3. For iOS - `v1.1.0` +4. For React Native - `@100mslive/react-native-hms v2.0.0-alpha.0` + +### Handling peer hand-raise function +100ms now supports first class APIs for hand-raise functionality. The following can be accomplished using them: +- How to raise and lower hand +- How to lower hand of a remote peer +- How to know when a peer raises or lowers their hand + +Follow the given documentation to implement the above functionalities. +- On [Web](/javascript/v2/how-to-guides/build-interactive-features/handraise) +- On [Android](/android/v2/how-to-guides/interact-with-room/peer/large-room) +- On [iOS](/ios/v2/how-to-guides/interact-with-room/peer/large-room) +- On [React Native](/react-native/v2/how-to-guides/interact-with-room/peer/large-room) + + +### Working with the peer list +If the room is very large, it is difficult to fetch each and every peer. To get the **list of peers** or the **peer count** of the room, use the following documentation: + +- On [Web](/javascript/v2/how-to-guides/set-up-video-conferencing/peerlist-optimizations) +- On [Android](/android/v2/how-to-guides/interact-with-room/peer/large-room#how-to-get-total-peer-count-of-the-room) +- On [iOS](/ios/v2/how-to-guides/interact-with-room/peer/large-room#how-to-get-peer-list-iterator-in-a-large-room) +- On [React Native](/react-native/v2/how-to-guides/interact-with-room/peer/large-room#how-to-get-total-peer-count-of-the-room) + + +> **Note** +> +> There will be no changes in functionality of the APIs shared above, if `large_room` flag is not enabled. +> + + + + + +