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

499 lines (498 loc) • 20.1 kB
import { HMSRole, HMSTranscriptionMode, HMSWhiteboard } from '../internal'; import { HMSException, HMSMessage, HMSPeer, HMSPeerID, HMSRoom, HMSRoomState, HMSStore, HMSVideoTrack } from '../schema'; /** * Select the current {@link HMSRoom} object to which you are connected. * @param store */ export declare const selectRoom: (store: HMSStore) => HMSRoom; /** * Select the current {@link HMSException[]} object to monitor the error logs * @param store */ export declare const selectErrors: (store: HMSStore) => HMSException[]; /** * It will help to get the all the error */ export declare const selectRecentError: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSException | null | undefined, (res: HMSException[]) => HMSException | null | undefined>; /** * Select the ID of the current room to which you are connected. */ export declare const selectRoomID: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string, (res: HMSRoom) => string>; /** * @internal */ export declare const selectPeersMap: (store: HMSStore) => Record<HMSPeerID, HMSPeer>; /** * @internal */ export declare const selectMessagesMap: (store: HMSStore) => Record<string, HMSMessage>; /** * Select IDs of messages you've sent or received sorted chronologically. */ export declare const selectMessageIDsInOrder: (store: HMSStore) => string[]; /** * @internal */ export declare const selectTracksMap: (store: HMSStore) => Record<string, import("../schema").HMSTrack>; /** * Select your media settings * i.e., choosen audio input device, audio output device and video input device, audio mode * @param store */ export declare const selectLocalMediaSettings: (store: HMSStore) => import("../schema").HMSMediaSettings; /** * select appData. * @internal */ export declare const selectFullAppData: (store: HMSStore) => Record<string, any> | undefined; /** * Select the available audio input, audio output and video input devices on your machine. * @param store * @returns An object of array of available audio input, audio output and video input devices. * ``` * type DeviceMap = { * audioInput: InputDeviceInfo[]; * audioOutput: MediaDeviceInfo[]; * videoInput: InputDeviceInfo[]; * } * ``` */ export declare const selectDevices: (store: HMSStore) => import("../internal").DeviceMap; export declare const selectSpeakers: (store: HMSStore) => Record<string, import("../schema").HMSSpeaker>; export declare const selectConnectionQualities: (store: HMSStore) => Record<string, import("../internal").HMSConnectionQuality>; /** * Select a boolean flag denoting whether you've joined a room. * NOTE: Returns true only after join, returns false during preview. */ export declare const selectIsConnectedToRoom: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean | undefined, (res: HMSRoom) => boolean | undefined>; /** * selectPeerCount gives the number of peers Inside the room. This doesn't count the local peer if * they're still in preview and haven't yet joined the room. Note that this will not necessarily equal the * number of peers received through selectPeers, it's possible to know total number of people in the room * without having details of everyone depending on dashboard settings. */ export declare const selectPeerCount: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, number, (res1: boolean | undefined, res2: HMSRoom) => number>; /** * Select an array of peers(remote peers and your local peer) present in the room. */ export declare const selectPeers: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer[], (res1: HMSRoom, res2: Record<string, HMSPeer>, res3: boolean) => HMSPeer[]>; /** * Select the local peer object object assigned to you. */ export declare const selectLocalPeer: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer | undefined, (res1: HMSRoom, res2: Record<string, HMSPeer>) => HMSPeer | undefined>; /** * Select the peer ID of your local peer. */ export declare const selectLocalPeerID: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string, (res: HMSRoom) => string>; /** * Select the peer name of your local peer. */ export declare const selectLocalPeerName: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string | undefined, (res: HMSPeer | undefined) => string | undefined>; /** * Select the role name of your local peer. */ export declare const selectLocalPeerRoleName: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string | undefined, (res: HMSPeer | undefined) => string | undefined>; /** * Select the track ID of your local peer's primary audio track */ export declare const selectLocalAudioTrackID: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string | undefined, (res: HMSPeer | undefined) => string | undefined>; /** * Select the track ID of your local peer's primary video track */ export declare const selectLocalVideoTrackID: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string | undefined, (res: HMSPeer | undefined) => string | undefined>; /** * Select an array of track IDs of all your local peer's tracks */ export declare const selectLocalTrackIDs: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string[], (res1: string | undefined, res2: string | undefined, res3: string[] | undefined) => string[]>; /** * Select remote peers(other users you're connected with via the internet) present in the room. */ export declare const selectRemotePeers: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>; /** * Select the peer who's speaking the loudest at the moment */ export declare const selectDominantSpeaker: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer | null, (res1: Record<string, HMSPeer>, res2: Record<string, import("../schema").HMSSpeaker>) => HMSPeer | null>; /** * Select a boolean denoting whether your local audio is unmuted * and the audio from your microphone is shared to remote peers */ export declare const selectIsLocalAudioEnabled: (store: HMSStore) => boolean; /** * Select a boolean denoting whether your local video is unmuted * and the video from your camera is shared to remote peers */ export declare const selectIsLocalVideoEnabled: (store: HMSStore) => boolean; /** * Select a boolean denoting whether you've chosen to unmute and share your local video. * * NOTE: Once you call `hmsActions.setLocalVideoEnabled(true)`to unmute your local video, * it takes some time to fetch your video from your video source. * This displayEnabled property gives immediate feedback for a more interactive UI, * without waiting for the video source */ export declare const selectIsLocalVideoDisplayEnabled: (store: HMSStore) => boolean | undefined; /** * Select a boolean denoting whether your screen is shared to remote peers in the room. */ export declare const selectIsLocalScreenShared: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res1: HMSPeer | undefined, res2: Record<string, import("../schema").HMSTrack>) => boolean>; /** * Select the first peer who is currently sharing their screen. */ export declare const selectPeerScreenSharing: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer | undefined, (res1: Record<string, HMSPeer>, res2: Record<string, import("../schema").HMSTrack>) => HMSPeer | undefined>; /** * Select a boolean denoting whether someone is sharing screen in the room. */ export declare const selectIsSomeoneScreenSharing: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSPeer | undefined) => boolean>; /** * Select the first peer who is currently sharing their audio only screen */ export declare const selectPeerSharingAudio: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer | undefined, (res1: Record<string, HMSPeer>, res2: Record<string, import("../schema").HMSTrack>) => HMSPeer | undefined>; /** * Select an array of peers who are currently sharing their screen. */ export declare const selectPeersScreenSharing: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer[], (res1: Record<string, HMSPeer>, res2: Record<string, import("../schema").HMSTrack>) => HMSPeer[]>; export declare const selectPeerSharingVideoPlaylist: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer | undefined, (res1: Record<string, HMSPeer>, res2: Record<string, import("../schema").HMSTrack>) => HMSPeer | undefined>; export declare const selectPeerSharingAudioPlaylist: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer | undefined, (res1: Record<string, HMSPeer>, res2: Record<string, import("../schema").HMSTrack>) => HMSPeer | undefined>; /** * Select an array of tracks that have been degraded(receiving lower video quality/no video) due to bad network locally. */ export declare const selectDegradedTracks: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSVideoTrack[], (res: import("../schema").HMSTrack[]) => HMSVideoTrack[]>; /** * Select the number of messages(sent and received). */ export declare const selectHMSMessagesCount: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, number, (res: string[]) => number>; /** * Select the number of unread messages. */ export declare const selectUnreadHMSMessagesCount: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, number, (res: Record<string, HMSMessage>) => number>; /** * Select an array of messages in the room(sent and received). */ export declare const selectHMSMessages: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSMessage[], (res1: string[], res2: Record<string, HMSMessage>) => HMSMessage[]>; export declare const selectHMSBroadcastMessages: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSMessage[], (res: HMSMessage[]) => HMSMessage[]>; /** * Select the number of unread broadcast messages */ export declare const selectUnreadHMSBroadcastMessagesCount: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, number, (res: HMSMessage[]) => number>; /** * Select the current state of the room. */ export declare const selectRoomState: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSRoomState, (res: HMSRoom) => HMSRoomState>; /** * Select a boolean denoting whether the room is in Preview state. */ export declare const selectIsInPreview: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRoomState) => boolean>; export declare const selectRoomStarted: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRoom) => boolean>; export declare const selectIsTranscriptionEnabled: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRoom) => boolean>; /** * Select available roles in the room as a map between the role name and {@link HMSRole} object. */ export declare const selectRolesMap: (store: HMSStore) => Record<string, HMSRole>; /** * Select an array of names of available roles in the room. */ export declare const selectAvailableRoleNames: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string[], (res: Record<string, HMSRole>) => string[]>; /** * Select the {@link HMSRole} object of your local peer. */ export declare const selectLocalPeerRole: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSRole | null, (res1: HMSPeer | undefined, res2: Record<string, HMSRole>) => HMSRole | null>; export declare const selectPreviewRoleName: (store: HMSStore) => string | undefined; /** * Select the {@link HMSRole} used for preview. * */ export declare const selectPreviewRole: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSRole | null, (res1: string | undefined, res2: Record<string, HMSRole>) => HMSRole | null>; /** * Select a boolean denoting whether if your local peer is allowed to subscribe to any other role. */ export declare const selectIsAllowedToSubscribe: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRole | null) => boolean>; /** * Select the permissions which determine what actions the local peer can do. */ export declare const selectPermissions: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, { endRoom: boolean; removeOthers: boolean; unmute: boolean; mute: boolean; changeRole: boolean; hlsStreaming: boolean; rtmpStreaming: boolean; browserRecording: boolean; pollRead: boolean; pollWrite: boolean; whiteboard?: import("../internal").HMSPermissionType[] | undefined; transcriptions?: Record<HMSTranscriptionMode, import("../internal").HMSPermissionType[]> | undefined; } | undefined, (res: HMSRole | null) => { endRoom: boolean; removeOthers: boolean; unmute: boolean; mute: boolean; changeRole: boolean; hlsStreaming: boolean; rtmpStreaming: boolean; browserRecording: boolean; pollRead: boolean; pollWrite: boolean; whiteboard?: import("../internal").HMSPermissionType[] | undefined; transcriptions?: Record<HMSTranscriptionMode, import("../internal").HMSPermissionType[]> | undefined; } | undefined>; export declare const selectRecordingState: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, import("../internal").HMSRecording, (res: HMSRoom) => import("../internal").HMSRecording>; export declare const selectRTMPState: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, import("../internal").HMSRTMP, (res: HMSRoom) => import("../internal").HMSRTMP>; export declare const selectHLSState: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, import("../internal").HMSHLS, (res: HMSRoom) => import("../internal").HMSHLS>; export declare const selectTranscriptionsState: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, import("../internal").HMSTranscriptionInfo[] | undefined, (res: HMSRoom) => import("../internal").HMSTranscriptionInfo[] | undefined>; export declare const selectSessionId: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string, (res: HMSRoom) => string>; export declare const selectRoomStartTime: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, Date | undefined, (res: HMSRoom) => Date | undefined>; export declare const selectIsLargeRoom: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRoom) => boolean>; export declare const selectIsEffectsEnabled: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRoom) => boolean>; export declare const selectIsVBEnabled: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, boolean, (res: HMSRoom) => boolean>; export declare const selectEffectsKey: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, string | undefined, (res: HMSRoom) => string | undefined>; export declare const selectTemplateAppData: (store: HMSStore) => Record<string, string>; /** @deprecated - use `selectSessionStore` instead */ export declare const selectSessionMetadata: (store: HMSStore) => any; export declare const selectPollsMap: (store: HMSStore) => Record<string, import("../internal").HMSPoll>; export declare const selectPolls: (store: HMSStore) => import("../internal").HMSPoll[]; export declare const selectHandRaisedPeers: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSPeer[], (res: HMSPeer[]) => HMSPeer[]>; /** select a map of all the whiteboards in the session */ export declare const selectWhiteboards: (store: HMSStore) => Record<string, HMSWhiteboard>; /** select the primary/first whiteboard of a session */ export declare const selectWhiteboard: import("reselect").OutputSelector<HMSStore<{ /** * It will help to get the all the error */ sessionStore: Record<string, any>; }>, HMSWhiteboard | undefined, (res: Record<string, HMSWhiteboard>) => HMSWhiteboard | undefined>;