UNPKG

@100mslive/hms-video-store

Version:

@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow

47 lines (46 loc) 2.76 kB
import { HMSPeer } from '../schema'; export declare const selectRoleByRoleName: (roleName: string) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSRole, (res: Record<string, import("../schema").HMSRole>) => import("../schema").HMSRole>; export declare const selectIsRoleAllowedToPublish: (roleName: string) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSPublishAllowed, (res: import("../schema").HMSRole) => import("../schema").HMSPublishAllowed>; export declare const selectIsLocalVideoPluginPresent: (pluginName: string) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, boolean, (res: string[]) => boolean>; export declare const selectIsLocalAudioPluginPresent: (pluginName: string) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, boolean, (res: string[]) => boolean>; /** * Selects the first peer passing the condition given by the argument predicate function * * Ex: to select a peer whose metadata has spotlight set to true(assuming peer.metadata is a valid json string), use * ```js * const spotlightPeer = useHMSStore(selectPeerByCondition(peer => JSON.parse(peer.metadata).spotlight)) * ``` */ export declare const selectPeerByCondition: (predicate: (peer: HMSPeer) => boolean) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, HMSPeer | undefined, (res: HMSPeer[]) => HMSPeer | undefined>; /** * Selects all peers passing the condition given by the argument predicate function * * Ex: to select peers with isHandRaised set to true in their metadata(assuming peer.metadata is a valid json string), use * ```js * const handRaisedPeers = useHMSStore(selectPeersByCondition(peer => JSON.parse(peer.metadata).isHandRaised)) * ``` */ export declare const selectPeersByCondition: (predicate: (peer: HMSPeer) => boolean) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>; /** * Returns a boolean to indicate if the local peer joined within the past `timeMs` milliseconds. * * Ex: to know if the local peer joined within the last one second * ```js * const joinedWithinASecond = useHMSStore(selectDidIJoinWithin(1000)); * ``` */ export declare const selectDidIJoinWithin: (timeMs: number) => import("reselect").OutputSelector<import("../schema").HMSStore<{ sessionStore: Record<string, any>; }>, boolean | undefined, (res: import("../schema").HMSRoom) => boolean | undefined>;