@100mslive/react-sdk 0.0.4 → 0.0.5-alpha.3

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.
@@ -1,10 +1,14 @@
1
1
  import React from 'react';
2
- import { HMSStore, HMSActions, HMSNotification, HMSNotifications, HMSStatsStore, HMSStats, HMSStoreWrapper } from '@100mslive/hms-video-store';
2
+ import { HMSStore, HMSActions, HMSNotification, HMSNotifications, HMSStatsStore, IStoreReadOnly, HMSStats, HMSStoreWrapper } from '@100mslive/hms-video-store';
3
+ import { EqualityChecker, StateSelector } from 'zustand';
4
+ export interface IHMSReactStore<S extends HMSStore | HMSStatsStore> extends IStoreReadOnly<S> {
5
+ <U>(selector: StateSelector<S, U>, equalityFn?: EqualityChecker<U>): U;
6
+ }
3
7
  export interface HMSRoomProviderProps {
4
8
  actions?: HMSActions;
5
9
  store?: HMSStoreWrapper;
6
10
  notifications?: HMSNotifications;
7
- webrtcInternals?: HMSStats;
11
+ stats?: HMSStats;
8
12
  isHMSStatsOn?: boolean;
9
13
  }
10
14
  export declare const HMSRoomProvider: React.FC<HMSRoomProviderProps>;
@@ -12,8 +16,8 @@ export declare const HMSRoomProvider: React.FC<HMSRoomProviderProps>;
12
16
  * `useHMSStore` is a read only hook which can be passed a selector to read data.
13
17
  * The hook can only be used in a component if HMSRoomProvider is present in its ancestors.
14
18
  */
15
- export declare const useHMSStore: <StateSlice>(selector: import("zustand").StateSelector<HMSStore, StateSlice>, equalityFn?: import("zustand").EqualityChecker<StateSlice>) => StateSlice;
16
- export declare const useHMSStatsStore: <StateSlice>(selector: import("zustand").StateSelector<HMSStatsStore, StateSlice>, equalityFn?: import("zustand").EqualityChecker<StateSlice>) => StateSlice | undefined;
19
+ export declare const useHMSStore: <StateSlice>(selector: StateSelector<HMSStore, StateSlice>, equalityFn?: EqualityChecker<StateSlice>) => StateSlice;
20
+ export declare const useHMSStatsStore: <StateSlice>(selector: StateSelector<HMSStatsStore, StateSlice>, equalityFn?: EqualityChecker<StateSlice>) => StateSlice | undefined;
17
21
  /**
18
22
  * `useHMSVanillaStore` is a read only hook which returns the vanilla HMSStore.
19
23
  * Usage:
@@ -32,3 +36,4 @@ export declare const useHMSActions: () => HMSActions;
32
36
  * `useHMSNotifications` is a read only hook which gives the latest notification(HMSNotification) received.
33
37
  */
34
38
  export declare const useHMSNotifications: () => HMSNotification | null;
39
+ export declare const useIsHMSStatsOn: () => boolean;
@@ -4,14 +4,15 @@ interface UseVideoListProps {
4
4
  /**
5
5
  * Max tiles in a page. Overrides maxRowCount and maxColCount
6
6
  */
7
- maxTileCount: number;
8
- maxRowCount: number;
9
- maxColCount: number;
10
- width: number;
11
- height: number;
7
+ maxTileCount?: number;
8
+ maxRowCount?: number;
9
+ maxColCount?: number;
12
10
  showScreenFn?: (peer: HMSPeer) => boolean;
13
11
  peers: HMSPeer[];
14
12
  overflow?: 'scroll-x' | 'scroll-y' | 'hidden';
13
+ /**
14
+ * Aspect ratio of VideoTiles
15
+ */
15
16
  aspectRatio?: {
16
17
  width: number;
17
18
  height: number;
@@ -22,10 +23,11 @@ interface UseVideoListProps {
22
23
  */
23
24
  filterNonPublishingPeers?: boolean;
24
25
  }
25
- export declare const useVideoList: ({ maxTileCount, maxColCount, maxRowCount, width, height, showScreenFn, peers, overflow, aspectRatio, filterNonPublishingPeers, }: UseVideoListProps) => {
26
+ export declare const useVideoList: ({ maxTileCount, maxColCount, maxRowCount, showScreenFn, peers, overflow, aspectRatio, filterNonPublishingPeers, }: UseVideoListProps) => {
26
27
  chunkedTracksWithPeer: (TrackWithPeer & {
27
28
  width: number;
28
29
  height: number;
29
30
  })[][];
31
+ ref: React.MutableRefObject<any>;
30
32
  };
31
33
  export {};