Skip to content

Commit

Permalink
Merge branch 'main' into abr-minor-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Hrashi100ms authored Dec 7, 2023
2 parents 5797943 + 3ab7fcd commit ab8b576
Show file tree
Hide file tree
Showing 155 changed files with 6,608 additions and 1,371 deletions.
6 changes: 5 additions & 1 deletion .github/styles/Vocab/HMSVocab/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,8 @@ unobserve
qp
rehype
num
url
url
answer_max_len
answer_min_len
userid
peerid
8 changes: 6 additions & 2 deletions docs/android/v2/release-notes/release-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ import AndroidSdkVersionShield from '@/common/android-sdk-version-shield.md';
| live.100ms:hls-player-stats: |<AndroidSdkVersionShield />
| live.100ms:virtual-background: |<AndroidSdkVersionShield />|

## v2.8.2 2023-12-01
## v2.8.3 - 2023-12-06
### Fixed
- `HMSTextureRenderer` class was sending wrong values in `onResolutionChange` of `VideoViewStateChangeListener` in certain cases

## v2.8.2 - 2023-12-01
### Added
- Support for using TextureView to render webrtc video

### Fixed
- Issue where camera was publishing in 1:1 aspect ratio if 9:16 publish is set on some devices

## v2.8.1 2023-11-16
## v2.8.1 - 2023-11-16
### Fixed
- Publisher and Subscriber stats are sent according to whether they're enabled in flags on the dashboard.

Expand Down
50 changes: 50 additions & 0 deletions docs/api-reference/javascript/v2/home/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,22 @@ Select the current [[]](/api-reference/javascript/v2/interfaces/HMSException) ob

---

### selectHMSBroadcastMessages

**selectHMSBroadcastMessages**(`state`): [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)[]

#### Parameters

| Name | Type |
| :------ | :-------------------------------------------------------------------------------------------------------------- |
| `state` | [`HMSStore`](/api-reference/javascript/v2/interfaces/HMSStore)<{ `sessionStore`: `Record`<`string`, `any`\> }\> |

#### Returns

[`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)[]

---

### selectHMSMessages

**selectHMSMessages**(`state`): [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)[]
Expand Down Expand Up @@ -1309,6 +1325,22 @@ Select the track ID of your local peer's primary video track

---

### selectMessageByMessageID

**selectMessageByMessageID**(`id`): `OutputSelector`<[`HMSStore`](/api-reference/javascript/v2/interfaces/HMSStore)<{ `sessionStore`: `Record`<`string`, `any`\> }\>, [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage), (`res`: `Record`<`string`, [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)\>) => [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)\>

#### Parameters

| Name | Type |
| :--- | :------- |
| `id` | `string` |

#### Returns

`OutputSelector`<[`HMSStore`](/api-reference/javascript/v2/interfaces/HMSStore)<{ `sessionStore`: `Record`<`string`, `any`\> }\>, [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage), (`res`: `Record`<`string`, [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)\>) => [`HMSMessage`](/api-reference/javascript/v2/interfaces/HMSMessage)\>

---

### selectMessageIDsInOrder

**selectMessageIDsInOrder**(`store`): `string`[]
Expand Down Expand Up @@ -2330,6 +2362,24 @@ Select the [HMSTrack](/api-reference/javascript/v2/home/content#hmstrack) object

---

### selectUnreadHMSBroadcastMessagesCount

**selectUnreadHMSBroadcastMessagesCount**(`state`): `number`

Select the number of unread broadcast messages

#### Parameters

| Name | Type |
| :------ | :-------------------------------------------------------------------------------------------------------------- |
| `state` | [`HMSStore`](/api-reference/javascript/v2/interfaces/HMSStore)<{ `sessionStore`: `Record`<`string`, `any`\> }\> |

#### Returns

`number`

---

### selectUnreadHMSMessagesCount

**selectUnreadHMSMessagesCount**(`state`): `number`
Expand Down
46 changes: 32 additions & 14 deletions docs/api-reference/javascript/v2/interfaces/HMSActions.md
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,10 @@ Send a plain text message to all the other participants in the room.

#### Parameters

| Name | Type | Description |
| :-------- | :------- | :---------------------------------------------------------------- |
| `message` | `string` | string message to broadcast |
| `type?` | `string` | type of message, for example image, video etc. - optional defaults to chat |
| Name | Type | Description |
| :-------- | :------- | :-------------------------------------------------------------------------- |
| `message` | `string` | string message to broadcast |
| `type?` | `string` | type of message. For example: image, video etc. - optional defaults to chat |

#### Returns

Expand All @@ -679,11 +679,11 @@ Send a plain text message to all the other participants in the room.

#### Parameters

| Name | Type | Description |
| :-------- | :------- | :---------------------------------------------------------------- |
| `message` | `string` | |
| `peerID` | `string` | id of the peer to which message has to be sent |
| `type?` | `string` | type of message, for example image, video etc. - optional defaults to chat |
| Name | Type | Description |
| :-------- | :------- | :-------------------------------------------------------------------------- |
| `message` | `string` | |
| `peerID` | `string` | id of the peer to which message has to be sent |
| `type?` | `string` | type of message. For example: image, video etc. - optional defaults to chat |

#### Returns

Expand All @@ -697,11 +697,11 @@ Send a plain text message to all the other participants in the room.

#### Parameters

| Name | Type | Description |
| :-------- | :--------- | :---------------------------------------------------------------- |
| `message` | `string` | string message to send |
| `roles` | `string`[] | roles to which to send the message |
| `type?` | `string` | type of message, for example: image, video etc. - optional defaults to chat |
| Name | Type | Description |
| :-------- | :--------- | :-------------------------------------------------------------------------- |
| `message` | `string` | string message to send |
| `roles` | `string`[] | roles to which to send the message |
| `type?` | `string` | type of message. For example: image, video etc. - optional defaults to chat |

#### Returns

Expand Down Expand Up @@ -970,6 +970,24 @@ found in store, no change in store will take place.

---

### setPlaylistSettings

**setPlaylistSettings**(`settings`): `void`

Method to override the default settings for playlist tracks

#### Parameters

| Name | Type |
| :--------- | :-------------------- |
| `settings` | `HMSPlaylistSettings` |

#### Returns

`void`

---

### setPreferredLayer

**setPreferredLayer**(`trackId`, `layer`): `Promise`<`void`\>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ When a peer joins the room for the first time or when a device change happens,
after selecting the mic for audio input, we try to find the matching output device
for selecting the speaker(on browsers where speaker selection is possible).

For example, if the headset mic is selected, the headset speaker will also be selected,
For example: if the headset mic is selected, the headset speaker will also be selected,
if the laptop default mix is selected, the corresponding laptop speaker will be selected.

This is useful because if a non-matching pair is selected, it might lead to an echo in the room.
Expand All @@ -48,7 +48,7 @@ and always go for the default device selection as given by the browser.
There are two ways to use this, you can pass in 'all' which will disable the above behaviour for all devices.
Or you can pass in an array of labels which will be string matched to disable the behavior for specific devices.

For example, ["Yeti Stereo Microphone"], as Yeti shows up often in audio output even when no device is plugged into its headphone jack.
For example: ["Yeti Stereo Microphone"], as Yeti shows up often in audio output even when no device is plugged into its headphone jack.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ nav: '4.57'

this can be used to identify the shared tab, if
the shared tab has set a captureHandle on its end as well as communicate
with the tab for example using broadcast channel.
with the tab, for example using broadcast channel.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ isAllowedToPublish can be used to decide whether to show the toggle buttons in t
This hook can be used to apply css properties on an element based on the current audio level for the passed in track.
It doesn't return the audio level as it's optimised for performance. As audio level could be changing frequently we
want to minimise the number of components an audio level change causes to re render.
An example use of this hook will be to apply box-shadow on parent tile based on audio level.
An e.g. use of this hook will be to apply box-shadow on parent tile based on audio level.

#### Parameters

Expand Down
108 changes: 73 additions & 35 deletions docs/flutter/v2/quickstart/prebuilt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,49 @@ Please follow the below instructions to test the app for iOS target platform

1. Add the target platform version as (`platform :ios, '12.0'`) in "ios/Podfile"

```json
platform :ios, '12.0'
```
```json
platform :ios, '12.0'
```

2. Allow camera, recording audio and internet permissions by adding the below snippet to the `ios/Runner/info.plist` file.

<br />

```xml section=iosPermissions
<key>NSMicrophoneUsageDescription</key>
<string>{YourAppName} wants to use your microphone</string>
<key>NSCameraUsageDescription</key>
<string>{YourAppName} wants to use your camera</string>
<key>NSLocalNetworkUsageDescription</key>
<string>{YourAppName} App wants to use your local network</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>{YourAppName} needs access to bluetooth to connect to nearby devices.</string>
```

3. Add the below snippet to the `ios/Podfile` in post_install section:

```json
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: PermissionGroup.camera
'PERMISSION_CAMERA=1',
## dart: PermissionGroup.microphone
'PERMISSION_MICROPHONE=1',
## dart: PermissionGroup.bluetooth
'PERMISSION_BLUETOOTH=1',
]
end
```

For more details regarding permission handling checkout the `permission_handler` docs [here](https://pub.dev/packages/permission_handler).

2. To add PIP support in your iOS app:
4. To add PIP support in your iOS app:

- Minimum Requirements:
- Minimum iOS version required to support PiP is iOS 15
Expand All @@ -150,40 +188,23 @@ After you receive permission from Apple, add the Entitlement to your app by open

![Entitlements](/docs/v2/flutter-multitasking-camera-entitlement.png)

3. To add screen share support in iOS app, checkout the docs [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/screen-share#ios-setup)
5. To add screen share support in iOS app, checkout the docs [here](https://www.100ms.live/docs/flutter/v2/how-to-guides/set-up-video-conferencing/screen-share#ios-setup)

4. Pass the `iOSScreenshareConfig` in `HMSPrebuiltOptions` parameter of `HMSPrebuilt` widget to enable screen share in your app.
6. Pass the `iOSScreenshareConfig` in `HMSPrebuiltOptions` parameter of `HMSPrebuilt` widget to enable screen share in your app.

```dart
// Pass the correct App Group & Preferred Extension parameters in HMSIOSScreenshareConfig class.
HMSPrebuilt(
roomCode: meetingLinkController.text.trim(),
options: HMSPrebuiltOptions(
iOSScreenshareConfig: HMSIOSScreenshareConfig(
appGroup: "appGroup", // App Group value linked to your Apple Developer Account
preferredExtension: "preferredExtension" // Name of the Broadcast Upload Extension Target created in Xcode
)));
```
```dart
// Pass the correct App Group & Preferred Extension parameters in HMSIOSScreenshareConfig class.
HMSPrebuilt(
roomCode: meetingLinkController.text.trim(),
options: HMSPrebuiltOptions(
iOSScreenshareConfig: HMSIOSScreenshareConfig(
appGroup: "appGroup", // App Group value linked to your Apple Developer Account
preferredExtension: "preferredExtension" // Name of the Broadcast Upload Extension Target created in Xcode
)));
```

</Tab>

### Leave Room callback

Sometimes your apps need to do some cleanup when the user leaves the room. To do this, you can use the `onLeave` callback of `HMSPrebuilt` widget.
You need to pass a function to the `onLeave` callback which will be called when the user leaves the room.

```dart
void performCleanup() {
// Do some cleanup here
}
HMSPrebuilt(
roomCode: "abc-defg-hij",
///This function will be called when the user leaves the room
onLeave: performCleanup
);
```

### Add the 100ms room kit to your app

We will be adding a join button to the app, on the button click we will route the user to the 100ms room kit. To do this, follow the steps below:
Expand Down Expand Up @@ -219,18 +240,35 @@ Scaffold(
```dart
import 'package:hms_room_kit/hms_room_kit.dart';
///For screenshare pass the config as mentioned above
onPressed: () async => {
await Navigator.push(
context,
MaterialPageRoute(
///To know about how to get the room codes check the docs here: https://www.100ms.live/docs/get-started/v2/get-started/prebuilt/room-codes/room-code-auth
builder: (context) => const HMSPrebuilt(roomCode: "Enter your room code here")
),
),
}
```

To know about how to get the room codes check the docs [here](https://www.100ms.live/docs/get-started/v2/get-started/prebuilt/room-codes/room-code-auth)

### Leave Room callback

Sometimes your apps need to do some cleanup when the user leaves the room. To do this, you can use the `onLeave` callback of `HMSPrebuilt` widget.
You need to pass a function to the `onLeave` callback which will be called when the user leaves the room.

```dart
void performCleanup() {
// Do some cleanup here
}
HMSPrebuilt(
roomCode: "abc-defg-hij",
///This function will be called when the user leaves the room
onLeave: performCleanup
);
```

### Checkout the 100ms Apps powered by hms_room_kit on App store / Play store

You can download & check out the 100ms Flutter app -
Expand Down
Loading

0 comments on commit ab8b576

Please sign in to comment.