@100mslive/react-sdk 0.0.5-alpha.1 → 0.0.5-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/useVideo.d.ts +7 -2
- package/dist/hooks/useVideoList.d.ts +4 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.js +4 -4
- package/package.json +3 -3
package/dist/hooks/useVideo.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { HMSTrackID } from '@100mslive/hms-video-store';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param trackId {HMSTrackID}
|
|
5
|
+
* the returned ref can be used to set on a video element meant to display the video for the passed in track id. The hook will take care of attaching and detaching video, and will automatically detach when the video goes out of view to save on bandwidth.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useVideo: (trackId: HMSTrackID) => (node: any) => void;
|
|
@@ -7,6 +7,9 @@ interface UseVideoListProps {
|
|
|
7
7
|
maxTileCount?: number;
|
|
8
8
|
maxRowCount?: number;
|
|
9
9
|
maxColCount?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Given a screensharing peer the function should return true if their screenshare should be included for the video tile, and false otherwise. This can be useful if there are multiple screenshares in the room where you may want to show one in the center view and others in video list along side other tiles.
|
|
12
|
+
*/
|
|
10
13
|
showScreenFn?: (peer: HMSPeer) => boolean;
|
|
11
14
|
peers: HMSPeer[];
|
|
12
15
|
overflow?: 'scroll-x' | 'scroll-y' | 'hidden';
|
|
@@ -24,7 +27,7 @@ interface UseVideoListProps {
|
|
|
24
27
|
filterNonPublishingPeers?: boolean;
|
|
25
28
|
}
|
|
26
29
|
export declare const useVideoList: ({ maxTileCount, maxColCount, maxRowCount, showScreenFn, peers, overflow, aspectRatio, filterNonPublishingPeers, }: UseVideoListProps) => {
|
|
27
|
-
|
|
30
|
+
pagesWithTiles: (TrackWithPeer & {
|
|
28
31
|
width: number;
|
|
29
32
|
height: number;
|
|
30
33
|
})[][];
|