You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
### Added
13
13
14
+
- Added support for multiple content shares in meetings through the `ContentShareProvider`. The provider now accepts a `maxContentShares` prop (default: 1, range 1-2) to specify the maximum number of concurrent content shares allowed.
15
+
- Added new collections in `ContentShareState` to track multiple content shares: `tiles`, `tileIdToAttendeeId`, and `attendeeIdToTileId`.
16
+
- Added optional `tileId` prop to the `ContentShare` component to specify which content share to render.
17
+
- Added `canStartContentShare` state to control when content sharing is allowed based on the current number of shares and configured maximum.
18
+
- Maintained backward compatibility by keeping `tileId` and `sharingAttendeeId` properties, which now point to the most recently started content share when multiple shares are present.
Copy file name to clipboardExpand all lines: src/components/sdk/ContentShare/ContentShare.mdx
+66-3Lines changed: 66 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,16 @@ import { ContentShare } from './';
5
5
6
6
# ContentShare
7
7
8
-
The `ContentShare` component renders a `ContentTile` for the active content share video, remote or local.
8
+
The `ContentShare` component renders a `ContentTile` for a content share video, remote or local.
9
9
10
10
If used within the `VideoGrid` component, it will automatically place the active tile in the featured grid slot. It takes precedence over the featured video tile.
11
11
12
12
Once a meeting session has been started, a user can start and stop content sharing by using the `useContentShareControls` hook.
13
13
14
+
## Multiple Content Shares
15
+
16
+
With the support for multiple content shares, you can now specify which content share tile to render by providing the `tileId` prop. If no `tileId` is provided, the component will render the default content share tile from (`const { tileId } = useContentShareState()`).
17
+
14
18
## Importing
15
19
16
20
```javascript
@@ -19,26 +23,85 @@ import { ContentShare } from 'amazon-chime-sdk-component-library-react';
Copy file name to clipboardExpand all lines: src/components/sdk/VideoTileGrid/VideoTileGrid.mdx
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ import { VideoTileGrid } from './';
5
5
6
6
# VideoTileGrid
7
7
8
-
The `VideoTileGrid` component renders all meeting session video tiles in a responsive grid layout. This includes the local tile, remote tiles, and content share tile. By default a user joins without video, so in order to see the VideoTileGrid there must be at least one video tile being shared. To start sharing a video, see the [LocalVideo](?path=/docs/sdk-components-localvideo--page) component.
8
+
The `VideoTileGrid` component renders all meeting session video tiles in a responsive grid layout. This includes the local tile, remote tiles, and content share tile. By default a user joins without video, so in order to see the VideoTileGrid there must be at least one video tile being shared. To start sharing a video, see the [LocalVideo](?path=/docs/sdk-components-localvideo--page) component.
9
9
10
10
## Importing
11
11
@@ -19,7 +19,7 @@ import { VideoTileGrid } from 'amazon-chime-sdk-component-library-react';
19
19
importReactfrom'react';
20
20
import {
21
21
MeetingProvider,
22
-
VideoTileGrid
22
+
VideoTileGrid,
23
23
} from'amazon-chime-sdk-component-library-react';
24
24
25
25
constApp= () => (
@@ -29,6 +29,44 @@ const App = () => (
29
29
);
30
30
```
31
31
32
+
## Content Share Behavior
33
+
34
+
The `VideoTileGrid` component does not support displaying multiple content shares simultaneously:
35
+
36
+
- It can display only one content share tile at a time in the featured area
37
+
- When multiple content shares are active, only the most recently started content share is displayed, and earlier shares are ignored
38
+
- The grid size calculation always allocates exactly one tile space for content sharing (when content is present), regardless of how many content share tiles actually exist
39
+
40
+
This means that even if there are multiple content share tiles available through `useContentShareState()`, the VideoTileGrid will only render one of them.
41
+
42
+
### Custom Handling of Multiple Content Shares
43
+
44
+
If you need to support multiple simultaneous content shares, you'll need to implement a custom grid using `useContentShareState` hook and `ContentShare` sdk component.
If you opt out of using `MeetingProvider`, you can drop in a `ContentShareProvider` and use its state. Make sure that its dependencies are rendered higher in the tree.
0 commit comments