UNPKG

@100mslive/react-native-room-kit

Version:

100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.

500 lines 18.9 kB
import { HMSRoom, HMSLocalPeer } from '@100mslive/react-native-hms'; import type { HMSLocalAudioStats, HMSLocalVideoStats, HMSMessage, HMSNoiseCancellationPlugin, HMSPeer, HMSPoll, HMSPollQuestion, HMSRemoteAudioStats, HMSRemoteVideoStats, HMSRole, HMSRoleChangeRequest, HMSSDK, HMSSessionStore, HMSSpeaker, HMSWhiteboard } from '@100mslive/react-native-hms'; import type { HMSVirtualBackgroundPlugin } from '../../modules/videoPluginWrapper'; import type { Layout } from '@100mslive/types-prebuilt'; import type { ChatBottomSheetTabs, HMSIOSScreenShareConfig, ModalTypes, OnLeaveHandler, PeerTrackNode, PipModes } from '../../utils/types'; import { HmsStateActionTypes, PollsStateActionTypes } from '../actionTypes'; import type { AddPollQuestionAction, SetPollConfigAction, SetPollNameAction, DeletePollQuestionAction, SetDeleteConfirmationVisible, SetSelectedQuestionIndexAction, SetQuestionTypeAction, SetQuestionTitleAction, AddQuestionOptionAction, DeleteQuestionOptionAction, EditQuestionOptionAction, SetQuestionSkippable, SetQuestionResponseEditable, SetQuestionSavedAction, SetLaunchingPollAction, ClearPollsStateAction, AddPollAction, UpdatePollAction, SetSelectedPollIdAction, AddPollQuestionResponseAction, SetPollQuestionResponseAction, RemovePollQuestionResponseAction, SetQuestionPointWeightageAction, SetQuestionCorrectOptionAction, PushToNavigationStackAction, PopFromNavigationStackAction, ReplaceTopOfNavigationStackAction, AddLeaderboardAction, ResetNavigationStackAction } from '../actionTypes'; import { MeetingState } from '../../types'; import type { ChatState, Notification, PinnedMessage } from '../../types'; export declare const setPrebuiltData: (data: { roomCode?: string; token?: string; options?: { userName?: string; userId?: string; debugMode?: boolean; endPoints?: { init: string; token: string; layout: string; }; ios?: HMSIOSScreenShareConfig; }; }) => { type: HmsStateActionTypes; payload: { roomCode?: string; token?: string; options?: { userName?: string; userId?: string; debugMode?: boolean; endPoints?: { init: string; token: string; layout: string; }; ios?: HMSIOSScreenShareConfig; }; }; }; export declare const setOnLeaveHandler: (onLeave?: OnLeaveHandler) => { type: HmsStateActionTypes; payload: { onLeave: OnLeaveHandler | undefined; }; }; export declare const clearStore: () => { type: HmsStateActionTypes; }; export declare const setRoomLocallyMuted: (roomLocallyMuted: boolean) => { type: HmsStateActionTypes; roomLocallyMuted: boolean; }; export declare const setIsLocalVideoMutedState: (isLocalVideoMuted: boolean | undefined) => { type: HmsStateActionTypes; isLocalVideoMuted: boolean | undefined; }; export declare const setIsLocalAudioMutedState: (isLocalAudioMuted: boolean | undefined) => { type: HmsStateActionTypes; isLocalAudioMuted: boolean | undefined; }; export declare const setIsLocalScreenSharedState: (isLocalScreenShared: boolean | undefined) => { type: HmsStateActionTypes; isLocalScreenShared: boolean | undefined; }; export declare const setHMSRoleState: (roles: HMSRole[]) => { type: HmsStateActionTypes; roles: HMSRole[]; }; export declare const setHMSRoomState: (room: HMSRoom | null) => { type: HmsStateActionTypes; room: HMSRoom | null; }; export declare const setHMSLocalPeerState: (localPeer: HMSLocalPeer | null) => { type: HmsStateActionTypes; localPeer: HMSLocalPeer | null; }; export declare const setHMSInstance: (hmsInstance: HMSSDK) => { type: string; payload: { hmsInstance: HMSSDK; }; }; export declare const addMessage: (data: HMSMessage) => { type: string; payload: HMSMessage; }; export declare const addPinnedMessages: (data: PinnedMessage[]) => { type: string; payload: PinnedMessage[]; }; export declare const clearMessageData: () => { type: string; }; export declare const setPeerState: (data: { peerState: PeerTrackNode[]; }) => { type: string; payload: { peerState: PeerTrackNode[]; }; }; export declare const changePipModeStatus: (pipModeStatus: PipModes) => { type: string; payload: { pipModeStatus: PipModes; }; }; export declare const clearPeerData: () => { type: string; }; export declare const saveUserData: (data: { hmsInstance?: HMSSDK; hmsSessionStore?: HMSSessionStore; spotlightTrackId?: string | null; isHLSFlow?: boolean; roles?: HMSRole[]; }) => { type: string; payload: { hmsInstance?: HMSSDK; hmsSessionStore?: HMSSessionStore; spotlightTrackId?: string | null; isHLSFlow?: boolean; roles?: HMSRole[]; }; }; export declare const clearHmsReference: () => { type: string; }; export declare const resetJoinConfig: () => { type: string; }; export declare const changeMirrorCamera: (value: boolean) => { type: string; payload: { mirrorCamera: boolean; }; }; export declare const changeShowStats: (value: boolean) => { type: string; payload: { showStats: boolean; }; }; export declare const changeShowHLSStats: (value: boolean) => { type: string; payload: { showHLSStats: boolean; }; }; export declare const changeShowCustomHLSPlayerControls: (value: boolean) => { type: string; payload: { showCustomHLSPlayerControls: boolean; }; }; export declare const changeEnableHLSPlayerControls: (value: boolean) => { type: string; payload: { enableHLSPlayerControls: boolean; }; }; export declare const changeAutoSimulcast: (value: boolean) => { type: string; payload: { autoSimulcast: boolean; }; }; export declare const setRTCStats: (trackId: string, stats: HMSLocalAudioStats | HMSLocalVideoStats[] | HMSRemoteAudioStats | HMSRemoteVideoStats) => { type: string; payload: { trackId: string; stats: HMSLocalAudioStats | HMSRemoteAudioStats | HMSRemoteVideoStats | HMSLocalVideoStats[]; }; }; export declare const changeHLSAspectRatio: (value: { value: number; id: string; }) => { type: string; payload: { hlsAspectRatio: { value: number; id: string; }; }; }; export declare const changeUsername: (userName: string) => { type: HmsStateActionTypes; payload: { userName: string; }; }; export declare const setModalType: (modalType: ModalTypes) => { type: string; payload: { modalType: ModalTypes; }; }; export declare const setPeerToUpdate: (peerToUpdate: HMSPeer) => { type: string; payload: { peerToUpdate: HMSPeer; }; }; export declare const addToPreviewPeersList: (peer: HMSPeer) => { type: HmsStateActionTypes; peer: HMSPeer; }; export declare const removeFromPreviewPeersList: (peer: HMSPeer) => { type: HmsStateActionTypes; peerId: string; }; export declare const changeMeetingState: (meetingState: MeetingState) => { type: string; payload: { meetingState: MeetingState; }; }; export declare const setInsetViewMinimized: (insetViewMinimized: boolean) => { type: string; payload: { insetViewMinimized: boolean; }; }; export declare const setMiniViewPeerTrackNode: (miniviewPeerTrackNode: PeerTrackNode | null) => { type: string; payload: { miniviewPeerTrackNode: PeerTrackNode | null; }; }; export declare const updateMiniViewPeerTrackNode: (data: Partial<Omit<PeerTrackNode, "id">>) => { type: string; payload: Partial<Omit<PeerTrackNode, "id">>; }; export declare const setFullScreenPeerTrackNode: (fullScreenPeerTrackNode: PeerTrackNode | null) => { type: string; payload: { fullScreenPeerTrackNode: PeerTrackNode | null; }; }; export declare const setFullScreenWhiteboard: (fullScreenWhiteboard: boolean) => { type: string; payload: { fullScreenWhiteboard: boolean; }; }; export declare const updateFullScreenPeerTrackNode: (data: Partial<Omit<PeerTrackNode, "id">>) => { type: string; payload: Partial<Omit<PeerTrackNode, "id">>; }; export declare const setLocalPeerTrackNode: (localPeerTrackNode: PeerTrackNode | null) => { type: string; payload: { localPeerTrackNode: PeerTrackNode | null; }; }; export declare const updateLocalPeerTrackNode: (data: Partial<Omit<PeerTrackNode, "id" | "isDegraded">>) => { type: string; payload: Partial<Omit<PeerTrackNode, "id" | "isDegraded">>; }; export declare const changeStartingHLSStream: (startingHLSStream: boolean) => { type: string; payload: { startingHLSStream: boolean; }; }; export declare const setLayoutConfig: (layoutConfig: Layout[]) => { type: HmsStateActionTypes; layoutConfig: Layout[]; }; export declare const setGridViewActivePage: (pageNumber: number) => { type: string; payload: { gridViewActivePage: number; }; }; export declare const setStartingOrStoppingRecording: (startingOrStoppingRecording: boolean) => { type: string; payload: { startingOrStoppingRecording: boolean; }; }; export declare const addScreenshareTile: (screenshareNode: PeerTrackNode) => { type: string; payload: { screenshareNode: PeerTrackNode; }; }; export declare const removeScreenshareTile: (peerTrackNodeId: PeerTrackNode["id"]) => { type: string; payload: { id: string; }; }; export declare const updateScreenshareTile: (data: Partial<PeerTrackNode> & { id: string; }) => { type: string; payload: Partial<PeerTrackNode> & { id: string; }; }; export declare const addNotification: (notification: Notification) => { type: string; payload: { notification: Notification; }; }; export declare const removeNotification: (notificationId: Notification["id"]) => { type: string; payload: { id: string; }; }; export declare const setRoleChangeRequest: (roleChangeRequest: HMSRoleChangeRequest | null) => { type: HmsStateActionTypes; roleChangeRequest: HMSRoleChangeRequest | null; }; export declare const setActiveChatBottomSheetTab: (activeChatBottomSheetTab: (typeof ChatBottomSheetTabs)[number]) => { type: string; payload: { activeChatBottomSheetTab: "Chat" | "Participants"; }; }; export declare const setChatFilterSheetVisible: (chatFilterSheetVisible: boolean) => { type: string; payload: { chatFilterSheetVisible: boolean; }; }; export declare const setChatMoreActionsSheetVisible: (chatMoreActionsSheetVisible: boolean) => { type: string; payload: { chatMoreActionsSheetVisible: boolean; }; }; export declare const setChatState: (chatState: null | ChatState) => { type: string; payload: { chatState: ChatState | null; }; }; export declare const addParticipant: (participant: HMSPeer) => { type: HmsStateActionTypes; participant: HMSPeer; }; export declare const addParticipants: (participants: HMSPeer[]) => { type: HmsStateActionTypes; participants: HMSPeer[]; }; export declare const removeParticipant: (participant: HMSPeer) => { type: HmsStateActionTypes; participant: HMSPeer; }; export declare const removeParticipants: (participants: HMSPeer[]) => { type: HmsStateActionTypes; participants: HMSPeer[]; }; export declare const addUpdateParticipant: (participant: HMSPeer) => { type: HmsStateActionTypes; participant: HMSPeer; }; export declare const replaceParticipantsList: (participants: HMSPeer[], roleName: string) => { type: HmsStateActionTypes; participants: HMSPeer[]; roleName: string; }; export declare const setActiveSpeakers: (activeSpeakers: HMSSpeaker[]) => { type: HmsStateActionTypes; activeSpeakers: HMSSpeaker[]; }; export declare const setReconnecting: (reconnecting: boolean) => { type: HmsStateActionTypes; reconnecting: boolean; }; export declare const setNoiseCancellationPlugin: (noiseCancellationPlugin: HMSNoiseCancellationPlugin) => { type: HmsStateActionTypes; noiseCancellationPlugin: HMSNoiseCancellationPlugin; }; export declare const setVideoPlugin: (videoPlugin: HMSVirtualBackgroundPlugin) => { type: HmsStateActionTypes; videoPlugin: HMSVirtualBackgroundPlugin; }; export declare const setWhiteboard: (whiteboard: HMSWhiteboard | null) => { type: HmsStateActionTypes; whiteboard: HMSWhiteboard | null; }; export declare const setHandleBackButton: (handleBackButton?: boolean) => { type: string; payload: { handleBackButton: boolean | undefined; }; }; export declare const setAutoEnterPipMode: (autoEnterPipMode?: boolean) => { type: string; payload: { autoEnterPipMode: boolean | undefined; }; }; export declare const setEditUsernameDisabled: (editUsernameDisabled: boolean) => { type: string; payload: { editUsernameDisabled: boolean; }; }; export declare const setSelectedMessageForAction: (selectedMessageForAction: null | HMSMessage) => { type: string; payload: { selectedMessageForAction: HMSMessage | null; }; }; export declare const setInitialRole: (initialRole: HMSRole) => { type: string; payload: { initialRole: HMSRole; }; }; export declare const setChatPeerBlacklist: (chatPeerBlacklist: string[]) => { type: string; payload: { chatPeerBlacklist: string[]; }; }; export declare const filterOutMsgsFromBlockedPeers: (chatPeerBlacklist: string[]) => { type: string; payload: string[]; }; export declare const setHlsDescriptionPaneVisible: (visible: boolean) => { type: string; payload: { visible: boolean; }; }; export declare const setHlsFullScreen: (fullScreen: boolean) => { type: string; payload: { fullScreen: boolean; }; }; export declare const setAndroidHLSStreamPaused: (paused: boolean) => { type: string; payload: { hlsStreamPaused_android: boolean; }; }; export declare const setSelectedVirtualBackground: (vb: string | null) => { type: string; payload: { selectedVirtualBackground: string | null; }; }; export declare const setShowClosedCaptions: (showClosedCaptions: boolean) => { type: string; payload: { showClosedCaptions: boolean; }; }; /** * POLLS */ export declare const setPollQDeleteConfirmationVisible: (deleteConfirmationVisible: SetDeleteConfirmationVisible["deleteConfirmationVisible"]) => SetDeleteConfirmationVisible; export declare const setPollName: (pollName: SetPollNameAction["pollName"]) => SetPollNameAction; export declare const setPollConfig: (pollConfig: SetPollConfigAction["pollConfig"]) => SetPollConfigAction; export declare const pushToNavigationStack: (screen: PushToNavigationStackAction["screen"]) => PushToNavigationStackAction; export declare const resetNavigationStack: () => ResetNavigationStackAction; export declare const popFromNavigationStack: () => PopFromNavigationStackAction; export declare const replaceTopOfNavigationStack: (screen: ReplaceTopOfNavigationStackAction["screen"]) => ReplaceTopOfNavigationStackAction; export declare const addPollQuestion: () => AddPollQuestionAction; export declare const deletePollQuestion: () => DeletePollQuestionAction; export declare const setSelectedPollQuestionIndex: (index: SetSelectedQuestionIndexAction["index"]) => SetSelectedQuestionIndexAction; export declare const setPollQuestionType: (questionIndex: SetQuestionTypeAction["questionIndex"], questionType: SetQuestionTypeAction["questionType"]) => SetQuestionTypeAction; export declare const setPollQuestionTitle: (questionIndex: SetQuestionTitleAction["questionIndex"], title: SetQuestionTitleAction["title"]) => SetQuestionTitleAction; export declare const setPollQuestionPointWeightage: (questionIndex: SetQuestionPointWeightageAction["questionIndex"], pointWeightage: SetQuestionPointWeightageAction["pointWeightage"]) => SetQuestionPointWeightageAction; export declare const addPollQuestionOption: (questionIndex: AddQuestionOptionAction["questionIndex"]) => AddQuestionOptionAction; export declare const deletePollQuestionOption: (questionIndex: DeleteQuestionOptionAction["questionIndex"], index: DeleteQuestionOptionAction["index"]) => DeleteQuestionOptionAction; export declare const editPollQuestionOption: (questionIndex: EditQuestionOptionAction["questionIndex"], optionIndex: EditQuestionOptionAction["optionIndex"], option: EditQuestionOptionAction["option"]) => EditQuestionOptionAction; export declare const setPollQuestionCorrectOption: (questionIndex: SetQuestionCorrectOptionAction["questionIndex"], optionIndex: SetQuestionCorrectOptionAction["optionIndex"], correctOption: SetQuestionCorrectOptionAction["correctOption"]) => SetQuestionCorrectOptionAction; export declare const setPollQuestionSkippable: (questionIndex: SetQuestionSkippable["questionIndex"], skippable: boolean) => SetQuestionSkippable; export declare const setPollQuestionResponseEditable: (questionIndex: SetQuestionResponseEditable["questionIndex"], responseEditable: boolean) => SetQuestionResponseEditable; export declare const setPollQuestionSaved: (questionIndex: SetQuestionResponseEditable["questionIndex"], saved: boolean) => SetQuestionSavedAction; export declare const setLaunchingPoll: (launching: SetLaunchingPollAction["launching"]) => SetLaunchingPollAction; export declare const clearPollsState: () => ClearPollsStateAction; export declare const cleaPollFormState: () => { type: PollsStateActionTypes; }; export declare const setSelectedPollId: (pollId: string) => SetSelectedPollIdAction; export declare const addPoll: (poll: HMSPoll) => AddPollAction; export declare const updatePoll: (poll: HMSPoll) => UpdatePollAction; export declare const setPollQuestionResponse: (pollId: HMSPoll["pollId"], questionIndex: HMSPollQuestion["index"], response: SetPollQuestionResponseAction["response"]) => SetPollQuestionResponseAction; export declare const addPollQuestionResponse: (pollId: HMSPoll["pollId"], questionIndex: HMSPollQuestion["index"], response: AddPollQuestionResponseAction["response"]) => AddPollQuestionResponseAction; export declare const removePollQuestionResponse: (pollId: HMSPoll["pollId"], questionIndex: HMSPollQuestion["index"], response: RemovePollQuestionResponseAction["response"]) => RemovePollQuestionResponseAction; export declare const addCuedPollId: (pollId: string) => { type: PollsStateActionTypes; pollId: string; }; export declare const addLeaderboard: (pollId: AddLeaderboardAction["pollId"], leaderboard: AddLeaderboardAction["leaderboard"]) => AddLeaderboardAction; //# sourceMappingURL=index.d.ts.map