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

262 lines (261 loc) 13.2 kB
import { HMSTranscriptionMode } from '../internal'; import { HMSAudioTrack, HMSGenericTypes, HMSPeer, HMSPeerID, HMSRoleName, HMSScreenVideoTrack, HMSStore, HMSTrack, HMSVideoTrack } from '../schema'; /** * Select the {@link HMSPeer} object given a peer ID. */ export declare const selectPeerByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSPeer | null>; /** * Select a particular key from ui app data by passed in key. * if key is not passed, full data is returned. */ export declare const selectAppData: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, any>; /** * Select a particular key from session store by passed in key. * if key is not passed, full data is returned. */ export declare function selectSessionStore<T extends HMSGenericTypes = { sessionStore: Record<string, any>; }>(): (store: HMSStore<T>) => T['sessionStore'] | undefined; export declare function selectSessionStore<T extends HMSGenericTypes = { sessionStore: Record<string, any>; }, K extends keyof T['sessionStore'] = keyof T['sessionStore']>(key: K): (store: HMSStore<T>) => T['sessionStore'][K] | undefined; export declare const selectAppDataByPath: (...keys: string[]) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, Record<string, any> | undefined, (res: Record<string, any> | undefined) => Record<string, any> | undefined>; /** * Select the name of a {@link HMSPeer} given a peer ID. */ export declare const selectPeerNameByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, string | undefined>; export declare const selectPeerTypeByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../internal").HMSPeerType | undefined>; /** * Select the {@link HMSTrack} object given a track ID. */ export declare const selectTrackByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | HMSVideoTrack | HMSScreenVideoTrack | null>; /** * Select the {@link HMSVideoTrack} object given a track ID. */ export declare const selectVideoTrackByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSVideoTrack | null>; /** * Select the {@link HMSAudioTrack} object given a track ID. */ export declare const selectAudioTrackByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | null>; /** * Select the {@link HMSScreenAudioTrack} object given a track ID. */ export declare const selectScreenAudioTrackByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | null>; /** * Select the {@link HMSScreenVideoTrack} object given a track ID. */ export declare const selectScreenVideoTrackByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSScreenVideoTrack | null>; /** * Select the primary video track of a peer given a peer ID. */ export declare const selectVideoTrackByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSVideoTrack | undefined>; /** * Select the primary audio track of a peer given a peer ID. */ export declare const selectAudioTrackByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | undefined>; /** * Select the camera stream of a peer given a peer ID. * This is the primary video track of a peer. */ export declare const selectCameraStreamByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSVideoTrack | undefined>; /** * Select an array of auxiliary tracks of a peer given a peer ID. */ export declare const selectAuxiliaryTracksByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSTrack[]>; /** * Select the audio level of a track given a track ID. */ export declare const selectTrackAudioByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number>; /** * Select audio level of audioTrack of a peer given a peer IDß. */ export declare const selectPeerAudioByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number>; export declare const selectConnectionQualityByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../internal").HMSConnectionQuality | undefined>; /** * Select the first auxiliary audio track of a peer given a peer ID. */ export declare const selectAuxiliaryAudioByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | undefined>; export declare const selectVideoPlaylistVideoTrackByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSVideoTrack | undefined>; export declare const selectVideoPlaylistAudioTrackByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | undefined>; export declare const selectAudioPlaylistTrackByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSAudioTrack | undefined>; export declare const selectScreenSharesByPeerId: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, { video: HMSScreenVideoTrack; audio: import("../schema").HMSScreenAudioTrack; }>; /** * Select the screen share video track of a peer given a peer ID. */ export declare const selectScreenShareByPeerID: (id?: string) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSScreenVideoTrack, (res: { video: HMSScreenVideoTrack; audio: import("../schema").HMSScreenAudioTrack; }) => HMSScreenVideoTrack>; /** * Select the screen share audio track of a peer given a peer ID. */ export declare const selectScreenShareAudioByPeerID: (id?: string) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSScreenAudioTrack, (res: { video: HMSScreenVideoTrack; audio: import("../schema").HMSScreenAudioTrack; }) => import("../schema").HMSScreenAudioTrack>; /** * Select a boolean denoting whether a peer has unmuted audio and sharing it to other peers. */ export declare const selectIsPeerAudioEnabled: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean>; /** * Select a boolean denoting whether a peer has unmuted video and sharing it to other peers. */ export declare const selectIsPeerVideoEnabled: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean>; /** * Select a boolean denoting whether you've muted an audio track locally(only for you) given a track ID. */ export declare const selectIsAudioLocallyMuted: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean | undefined>; /** * Select a boolean denoting whether you've muted the primary audio track of a peer locally(only for you) given a peer ID. */ export declare const selectIsLocallyMutedByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean | undefined>; /** * Select a boolean denoting whether you've muted the screen share audio track of a peer locally(only for you) given a peer ID. */ export declare const selectIsScreenShareLocallyMutedByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean | undefined>; /** * Select the local audio volume of an audio track given a track ID. * * NOTE: **Volume** of a track is different from **Audio Level** of a track, * - Audio Level measures the audio of a track and it comes from 100ms's servers. * - Volume is how loud you hear the audio of a track, this is controlled by you at the client side. */ export declare const selectAudioTrackVolume: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number | undefined>; /** * Select the local audio volume of the primary audio track of a peer given a peer ID. */ export declare const selectAudioVolumeByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number | undefined>; /** * Select the local audio volume of the screen share of a peer given a peer ID. */ export declare const selectScreenshareAudioVolumeByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number | undefined>; /** * Select the current simulcast layer of a track given a track ID. */ export declare const selectSimulcastLayerByTrack: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../internal").HMSSimulcastLayer | undefined>; export declare const selectBroadcastMessages: import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSMessage[], (res: import("../schema").HMSMessage[]) => import("../schema").HMSMessage[]>; export declare const selectBroadcastMessagesUnreadCount: import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number, (res: import("../schema").HMSMessage[]) => number>; export declare const selectMessagesByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSMessage[] | undefined>; export declare const selectMessagesByRole: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSMessage[] | undefined>; export declare const selectMessagesUnreadCountByRole: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number>; export declare const selectMessagesUnreadCountByPeerID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, number>; /** * Select an array of peers of a particular role * @param role HMSRoleName * @returns HMSPeer[] */ export declare const selectPeersByRole: (role: HMSRoleName) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>; /** * Select an array of peers of a particular role * @param roles HMSRoleName[] * @returns HMSPeer[] */ export declare const selectPeersByRoles: (roles: HMSRoleName[]) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>; /** * Selects the peer metadata for the passed in peer and returns it as JSON. If metadata is not present * or conversion to JSON gives an error, an empty object is returned. * Please directly use peer.metadata in case the metadata is not JSON by design. */ export declare const selectPeerMetadata: (peerId: HMSPeerID) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, any, (res: HMSPeer | null) => any>; export declare const selectHasPeerHandRaised: (peerId: HMSPeerID) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean, (res: HMSPeer | null) => boolean>; export declare const selectPeerName: (peerId: HMSPeerID) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, string | undefined, (res: HMSPeer | null) => string | undefined>; export declare const selectPollByID: (id?: string | undefined) => import("./common").StoreSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../internal").HMSPoll | null>; export declare const selectMessageByMessageID: (id: string) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, import("../schema").HMSMessage, (res: Record<string, import("../schema").HMSMessage>) => import("../schema").HMSMessage>; export declare const selectIsTranscriptionAllowedByMode: (mode: HMSTranscriptionMode) => import("reselect").OutputSelector<HMSStore<{ sessionStore: Record<string, any>; }>, boolean, (res: import("../internal").HMSRole | null) => boolean>;