@100mslive/react-native-room-kit 0.0.1
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.
- package/LICENSE +20 -0
- package/README.md +25 -0
- package/lib/commonjs/HMSContainer.js +20 -0
- package/lib/commonjs/HMSContainer.js.map +1 -0
- package/lib/commonjs/HMSInstanceSetup.js +160 -0
- package/lib/commonjs/HMSInstanceSetup.js.map +1 -0
- package/lib/commonjs/HMSPrebuilt.js +32 -0
- package/lib/commonjs/HMSPrebuilt.js.map +1 -0
- package/lib/commonjs/HMSRoomSetup.js +216 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -0
- package/lib/commonjs/Icons/100ms/assets/hms-logo.png +0 -0
- package/lib/commonjs/Icons/100ms/assets/hms-logo@2x.png +0 -0
- package/lib/commonjs/Icons/100ms/assets/hms-logo@3x.png +0 -0
- package/lib/commonjs/Icons/100ms/index.js +30 -0
- package/lib/commonjs/Icons/100ms/index.js.map +1 -0
- package/lib/commonjs/Icons/Alert/assets/alert.png +0 -0
- package/lib/commonjs/Icons/Alert/assets/alert@2x.png +0 -0
- package/lib/commonjs/Icons/Alert/assets/alert@3x.png +0 -0
- package/lib/commonjs/Icons/Alert/index.js +30 -0
- package/lib/commonjs/Icons/Alert/index.js.map +1 -0
- package/lib/commonjs/Icons/Camera/assets/camera-muted.png +0 -0
- package/lib/commonjs/Icons/Camera/assets/camera-muted@2x.png +0 -0
- package/lib/commonjs/Icons/Camera/assets/camera-muted@3x.png +0 -0
- package/lib/commonjs/Icons/Camera/assets/camera-unmuted.png +0 -0
- package/lib/commonjs/Icons/Camera/assets/camera-unmuted@2x.png +0 -0
- package/lib/commonjs/Icons/Camera/assets/camera-unmuted@3x.png +0 -0
- package/lib/commonjs/Icons/Camera/index.js +31 -0
- package/lib/commonjs/Icons/Camera/index.js.map +1 -0
- package/lib/commonjs/Icons/Chat/assets/chat.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat@2x.png +0 -0
- package/lib/commonjs/Icons/Chat/assets/chat@3x.png +0 -0
- package/lib/commonjs/Icons/Chat/index.js +30 -0
- package/lib/commonjs/Icons/Chat/index.js.map +1 -0
- package/lib/commonjs/Icons/Chevron/assets/chevron-down.png +0 -0
- package/lib/commonjs/Icons/Chevron/assets/chevron-down@2x.png +0 -0
- package/lib/commonjs/Icons/Chevron/assets/chevron-down@3x.png +0 -0
- package/lib/commonjs/Icons/Chevron/assets/chevron-left.png +0 -0
- package/lib/commonjs/Icons/Chevron/assets/chevron-left@2x.png +0 -0
- package/lib/commonjs/Icons/Chevron/assets/chevron-left@3x.png +0 -0
- package/lib/commonjs/Icons/Chevron/index.js +31 -0
- package/lib/commonjs/Icons/Chevron/index.js.map +1 -0
- package/lib/commonjs/Icons/Clock/assets/clock.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock@2x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock@3x.png +0 -0
- package/lib/commonjs/Icons/Clock/index.js +30 -0
- package/lib/commonjs/Icons/Clock/index.js.map +1 -0
- package/lib/commonjs/Icons/Close/assets/close.png +0 -0
- package/lib/commonjs/Icons/Close/assets/close@2x.png +0 -0
- package/lib/commonjs/Icons/Close/assets/close@3x.png +0 -0
- package/lib/commonjs/Icons/Close/index.js +30 -0
- package/lib/commonjs/Icons/Close/index.js.map +1 -0
- package/lib/commonjs/Icons/End/assets/end.png +0 -0
- package/lib/commonjs/Icons/End/assets/end@2x.png +0 -0
- package/lib/commonjs/Icons/End/assets/end@3x.png +0 -0
- package/lib/commonjs/Icons/End/index.js +30 -0
- package/lib/commonjs/Icons/End/index.js.map +1 -0
- package/lib/commonjs/Icons/Hand/assets/hand.png +0 -0
- package/lib/commonjs/Icons/Hand/assets/hand@2x.png +0 -0
- package/lib/commonjs/Icons/Hand/assets/hand@3x.png +0 -0
- package/lib/commonjs/Icons/Hand/index.js +32 -0
- package/lib/commonjs/Icons/Hand/index.js.map +1 -0
- package/lib/commonjs/Icons/Leave/assets/leave.png +0 -0
- package/lib/commonjs/Icons/Leave/assets/leave@2x.png +0 -0
- package/lib/commonjs/Icons/Leave/assets/leave@3x.png +0 -0
- package/lib/commonjs/Icons/Leave/index.js +30 -0
- package/lib/commonjs/Icons/Leave/index.js.map +1 -0
- package/lib/commonjs/Icons/Mic/assets/mic-muted.png +0 -0
- package/lib/commonjs/Icons/Mic/assets/mic-muted@2x.png +0 -0
- package/lib/commonjs/Icons/Mic/assets/mic-muted@3x.png +0 -0
- package/lib/commonjs/Icons/Mic/assets/mic-unmuted.png +0 -0
- package/lib/commonjs/Icons/Mic/assets/mic-unmuted@2x.png +0 -0
- package/lib/commonjs/Icons/Mic/assets/mic-unmuted@3x.png +0 -0
- package/lib/commonjs/Icons/Mic/index.js +31 -0
- package/lib/commonjs/Icons/Mic/index.js.map +1 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_0.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_0@2x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_0@3x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_1.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_1@2x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_1@3x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_2.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_2@2x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_2@3x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_3.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_3@2x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_3@3x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_4.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_4@2x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_4@3x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_5.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_5@2x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/assets/network_5@3x.png +0 -0
- package/lib/commonjs/Icons/NetworkQuality/index.js +31 -0
- package/lib/commonjs/Icons/NetworkQuality/index.js.map +1 -0
- package/lib/commonjs/Icons/Participants/assets/participants.png +0 -0
- package/lib/commonjs/Icons/Participants/assets/participants@2x.png +0 -0
- package/lib/commonjs/Icons/Participants/assets/participants@3x.png +0 -0
- package/lib/commonjs/Icons/Participants/index.js +30 -0
- package/lib/commonjs/Icons/Participants/index.js.map +1 -0
- package/lib/commonjs/Icons/RotateCamera/assets/rotate-camera.png +0 -0
- package/lib/commonjs/Icons/RotateCamera/assets/rotate-camera@2x.png +0 -0
- package/lib/commonjs/Icons/RotateCamera/assets/rotate-camera@3x.png +0 -0
- package/lib/commonjs/Icons/RotateCamera/index.js +30 -0
- package/lib/commonjs/Icons/RotateCamera/index.js.map +1 -0
- package/lib/commonjs/Icons/ScreenShare/assets/screen-share.png +0 -0
- package/lib/commonjs/Icons/ScreenShare/assets/screen-share@2x.png +0 -0
- package/lib/commonjs/Icons/ScreenShare/assets/screen-share@3x.png +0 -0
- package/lib/commonjs/Icons/ScreenShare/index.js +30 -0
- package/lib/commonjs/Icons/ScreenShare/index.js.map +1 -0
- package/lib/commonjs/Icons/Send/assets/send.png +0 -0
- package/lib/commonjs/Icons/Send/assets/send@2x.png +0 -0
- package/lib/commonjs/Icons/Send/assets/send@3x.png +0 -0
- package/lib/commonjs/Icons/Send/index.js +30 -0
- package/lib/commonjs/Icons/Send/index.js.map +1 -0
- package/lib/commonjs/Icons/Settings/assets/settings.png +0 -0
- package/lib/commonjs/Icons/Settings/assets/settings@2x.png +0 -0
- package/lib/commonjs/Icons/Settings/assets/settings@3x.png +0 -0
- package/lib/commonjs/Icons/Settings/index.js +30 -0
- package/lib/commonjs/Icons/Settings/index.js.map +1 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-muted.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-muted@2x.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-muted@3x.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker@2x.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker@3x.png +0 -0
- package/lib/commonjs/Icons/Speaker/index.js +31 -0
- package/lib/commonjs/Icons/Speaker/index.js.map +1 -0
- package/lib/commonjs/Icons/ThreeDots/assets/three-dots-vertical.png +0 -0
- package/lib/commonjs/Icons/ThreeDots/assets/three-dots-vertical@2x.png +0 -0
- package/lib/commonjs/Icons/ThreeDots/assets/three-dots-vertical@3x.png +0 -0
- package/lib/commonjs/Icons/ThreeDots/index.js +31 -0
- package/lib/commonjs/Icons/ThreeDots/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +215 -0
- package/lib/commonjs/Icons/index.js.map +1 -0
- package/lib/commonjs/assets/100ms-logo.png +0 -0
- package/lib/commonjs/assets/brb.png +0 -0
- package/lib/commonjs/assets/icon.png +0 -0
- package/lib/commonjs/assets/illustration.png +0 -0
- package/lib/commonjs/assets/network_0.png +0 -0
- package/lib/commonjs/assets/network_1.png +0 -0
- package/lib/commonjs/assets/network_2.png +0 -0
- package/lib/commonjs/assets/network_3.png +0 -0
- package/lib/commonjs/assets/network_4.png +0 -0
- package/lib/commonjs/assets/user_music.png +0 -0
- package/lib/commonjs/components/AvatarView.js +48 -0
- package/lib/commonjs/components/AvatarView.js.map +1 -0
- package/lib/commonjs/components/BackButton.js +42 -0
- package/lib/commonjs/components/BackButton.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatBanner.js +77 -0
- package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatList.js +51 -0
- package/lib/commonjs/components/Chat/ChatList.js.map +1 -0
- package/lib/commonjs/components/Chat/ChatMessage.js +175 -0
- package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -0
- package/lib/commonjs/components/Chat/PinnedMessage.js +85 -0
- package/lib/commonjs/components/Chat/PinnedMessage.js.map +1 -0
- package/lib/commonjs/components/Chat/index.js +50 -0
- package/lib/commonjs/components/Chat/index.js.map +1 -0
- package/lib/commonjs/components/ChatWindow.js +608 -0
- package/lib/commonjs/components/ChatWindow.js.map +1 -0
- package/lib/commonjs/components/CustomButton.js +53 -0
- package/lib/commonjs/components/CustomButton.js.map +1 -0
- package/lib/commonjs/components/CustomHLSPlayerControls.js +81 -0
- package/lib/commonjs/components/CustomHLSPlayerControls.js.map +1 -0
- package/lib/commonjs/components/CustomInput.js +90 -0
- package/lib/commonjs/components/CustomInput.js.map +1 -0
- package/lib/commonjs/components/DefaultModal.js +104 -0
- package/lib/commonjs/components/DefaultModal.js.map +1 -0
- package/lib/commonjs/components/DisplayTrack.js +70 -0
- package/lib/commonjs/components/DisplayTrack.js.map +1 -0
- package/lib/commonjs/components/DisplayView.js +213 -0
- package/lib/commonjs/components/DisplayView.js.map +1 -0
- package/lib/commonjs/components/Footer.js +86 -0
- package/lib/commonjs/components/Footer.js.map +1 -0
- package/lib/commonjs/components/FullScreenIndicator.js +25 -0
- package/lib/commonjs/components/FullScreenIndicator.js.map +1 -0
- package/lib/commonjs/components/GridView.js +98 -0
- package/lib/commonjs/components/GridView.js.map +1 -0
- package/lib/commonjs/components/HLSPlayerEmoticons.js +48 -0
- package/lib/commonjs/components/HLSPlayerEmoticons.js.map +1 -0
- package/lib/commonjs/components/HLSPlayerStatsView.js +64 -0
- package/lib/commonjs/components/HLSPlayerStatsView.js.map +1 -0
- package/lib/commonjs/components/HLSView.js +141 -0
- package/lib/commonjs/components/HLSView.js.map +1 -0
- package/lib/commonjs/components/HMSChat.js +31 -0
- package/lib/commonjs/components/HMSChat.js.map +1 -0
- package/lib/commonjs/components/HMSHLSNotStarted.js +59 -0
- package/lib/commonjs/components/HMSHLSNotStarted.js.map +1 -0
- package/lib/commonjs/components/HMSManageCameraRotation.js +42 -0
- package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -0
- package/lib/commonjs/components/HMSManageLeave.js +286 -0
- package/lib/commonjs/components/HMSManageLeave.js.map +1 -0
- package/lib/commonjs/components/HMSManageLocalAudio.js +46 -0
- package/lib/commonjs/components/HMSManageLocalAudio.js.map +1 -0
- package/lib/commonjs/components/HMSManageLocalVideo.js +46 -0
- package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -0
- package/lib/commonjs/components/HMSManageRaiseHand.js +48 -0
- package/lib/commonjs/components/HMSManageRaiseHand.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewDeviceSettings.js +305 -0
- package/lib/commonjs/components/HMSPreviewDeviceSettings.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewEditName.js +63 -0
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewJoinButton.js +56 -0
- package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewPeersList.js +89 -0
- package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewSubtitle.js +32 -0
- package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewTile.js +138 -0
- package/lib/commonjs/components/HMSPreviewTile.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewTitle.js +32 -0
- package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -0
- package/lib/commonjs/components/HMSRoomOptions.js +105 -0
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -0
- package/lib/commonjs/components/HMSShareScreen.js +59 -0
- package/lib/commonjs/components/HMSShareScreen.js.map +1 -0
- package/lib/commonjs/components/HMSShowNetworkQuality.js +57 -0
- package/lib/commonjs/components/HMSShowNetworkQuality.js.map +1 -0
- package/lib/commonjs/components/Header.js +177 -0
- package/lib/commonjs/components/Header.js.map +1 -0
- package/lib/commonjs/components/LiveButton.js +70 -0
- package/lib/commonjs/components/LiveButton.js.map +1 -0
- package/lib/commonjs/components/Meeting.js +64 -0
- package/lib/commonjs/components/Meeting.js.map +1 -0
- package/lib/commonjs/components/MeetingScreenContent.js +98 -0
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -0
- package/lib/commonjs/components/MenuModal/Menu.js +250 -0
- package/lib/commonjs/components/MenuModal/Menu.js.map +1 -0
- package/lib/commonjs/components/MenuModal/MenuDivider.js +27 -0
- package/lib/commonjs/components/MenuModal/MenuDivider.js.map +1 -0
- package/lib/commonjs/components/MenuModal/MenuItem.js +60 -0
- package/lib/commonjs/components/MenuModal/MenuItem.js.map +1 -0
- package/lib/commonjs/components/MenuModal/index.js +27 -0
- package/lib/commonjs/components/MenuModal/index.js.map +1 -0
- package/lib/commonjs/components/Modals.js +1640 -0
- package/lib/commonjs/components/Modals.js.map +1 -0
- package/lib/commonjs/components/PIPView.js +33 -0
- package/lib/commonjs/components/PIPView.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsFilter.js +128 -0
- package/lib/commonjs/components/Participants/ParticipantsFilter.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsHeader.js +67 -0
- package/lib/commonjs/components/Participants/ParticipantsHeader.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsList.js +274 -0
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -0
- package/lib/commonjs/components/Participants/ParticipantsSeachInput.js +55 -0
- package/lib/commonjs/components/Participants/ParticipantsSeachInput.js.map +1 -0
- package/lib/commonjs/components/Participants/SearchableParticipantsView.js +27 -0
- package/lib/commonjs/components/Participants/SearchableParticipantsView.js.map +1 -0
- package/lib/commonjs/components/Participants/index.js +61 -0
- package/lib/commonjs/components/Participants/index.js.map +1 -0
- package/lib/commonjs/components/ParticipantsModal.js +43 -0
- package/lib/commonjs/components/ParticipantsModal.js.map +1 -0
- package/lib/commonjs/components/PeerDisplayView.js +79 -0
- package/lib/commonjs/components/PeerDisplayView.js.map +1 -0
- package/lib/commonjs/components/PeerRTCStatsContainer.js +70 -0
- package/lib/commonjs/components/PeerRTCStatsContainer.js.map +1 -0
- package/lib/commonjs/components/PeerRTCStatsView.js +54 -0
- package/lib/commonjs/components/PeerRTCStatsView.js.map +1 -0
- package/lib/commonjs/components/PeerSettingsModalContent.js +241 -0
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -0
- package/lib/commonjs/components/Picker.js +93 -0
- package/lib/commonjs/components/Picker.js.map +1 -0
- package/lib/commonjs/components/PressableIcon.js +46 -0
- package/lib/commonjs/components/PressableIcon.js.map +1 -0
- package/lib/commonjs/components/Preview.js +86 -0
- package/lib/commonjs/components/Preview.js.map +1 -0
- package/lib/commonjs/components/RoomSettingsModalContent.js +515 -0
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -0
- package/lib/commonjs/components/StatusBar.js +26 -0
- package/lib/commonjs/components/StatusBar.js.map +1 -0
- package/lib/commonjs/components/StreamingQualityModalContent.js +215 -0
- package/lib/commonjs/components/StreamingQualityModalContent.js.map +1 -0
- package/lib/commonjs/components/SwitchRow.js +49 -0
- package/lib/commonjs/components/SwitchRow.js.map +1 -0
- package/lib/commonjs/components/Tile.js +111 -0
- package/lib/commonjs/components/Tile.js.map +1 -0
- package/lib/commonjs/components/TilesContainer.js +38 -0
- package/lib/commonjs/components/TilesContainer.js.map +1 -0
- package/lib/commonjs/components/ZoomableView.js +84 -0
- package/lib/commonjs/components/ZoomableView.js.map +1 -0
- package/lib/commonjs/components/index.js +94 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/components/styles.js +965 -0
- package/lib/commonjs/components/styles.js.map +1 -0
- package/lib/commonjs/hooks/useHmsInstance.js +175 -0
- package/lib/commonjs/hooks/useHmsInstance.js.map +1 -0
- package/lib/commonjs/hooks-sdk-selectors.js +17 -0
- package/lib/commonjs/hooks-sdk-selectors.js.map +1 -0
- package/lib/commonjs/hooks-sdk.js +126 -0
- package/lib/commonjs/hooks-sdk.js.map +1 -0
- package/lib/commonjs/hooks-util-selectors.js +12 -0
- package/lib/commonjs/hooks-util-selectors.js.map +1 -0
- package/lib/commonjs/hooks-util.js +792 -0
- package/lib/commonjs/hooks-util.js.map +1 -0
- package/lib/commonjs/index.js +17 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/peerTrackNodeUtils.js +65 -0
- package/lib/commonjs/peerTrackNodeUtils.js.map +1 -0
- package/lib/commonjs/redux/actionTypes.js +75 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -0
- package/lib/commonjs/redux/actions/index.js +182 -0
- package/lib/commonjs/redux/actions/index.js.map +1 -0
- package/lib/commonjs/redux/index.js +12 -0
- package/lib/commonjs/redux/index.js.map +1 -0
- package/lib/commonjs/redux/reducers/appState.js +131 -0
- package/lib/commonjs/redux/reducers/appState.js.map +1 -0
- package/lib/commonjs/redux/reducers/chatWindow.js +45 -0
- package/lib/commonjs/redux/reducers/chatWindow.js.map +1 -0
- package/lib/commonjs/redux/reducers/hmsStates.js +67 -0
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -0
- package/lib/commonjs/redux/reducers/index.js +22 -0
- package/lib/commonjs/redux/reducers/index.js.map +1 -0
- package/lib/commonjs/redux/reducers/message.js +43 -0
- package/lib/commonjs/redux/reducers/message.js.map +1 -0
- package/lib/commonjs/redux/reducers/userState.js +67 -0
- package/lib/commonjs/redux/reducers/userState.js.map +1 -0
- package/lib/commonjs/types.js +16 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/utils/dimension.js +64 -0
- package/lib/commonjs/utils/dimension.js.map +1 -0
- package/lib/commonjs/utils/functions.js +368 -0
- package/lib/commonjs/utils/functions.js.map +1 -0
- package/lib/commonjs/utils/getRoomLinkDetails.js +23 -0
- package/lib/commonjs/utils/getRoomLinkDetails.js.map +1 -0
- package/lib/commonjs/utils/hooks.js +46 -0
- package/lib/commonjs/utils/hooks.js.map +1 -0
- package/lib/commonjs/utils/theme.js +144 -0
- package/lib/commonjs/utils/theme.js.map +1 -0
- package/lib/commonjs/utils/types.js +104 -0
- package/lib/commonjs/utils/types.js.map +1 -0
- package/lib/commonjs/utils.js +30 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/module/HMSContainer.js +12 -0
- package/lib/module/HMSContainer.js.map +1 -0
- package/lib/module/HMSInstanceSetup.js +151 -0
- package/lib/module/HMSInstanceSetup.js.map +1 -0
- package/lib/module/HMSPrebuilt.js +22 -0
- package/lib/module/HMSPrebuilt.js.map +1 -0
- package/lib/module/HMSRoomSetup.js +206 -0
- package/lib/module/HMSRoomSetup.js.map +1 -0
- package/lib/module/Icons/100ms/assets/hms-logo.png +0 -0
- package/lib/module/Icons/100ms/assets/hms-logo@2x.png +0 -0
- package/lib/module/Icons/100ms/assets/hms-logo@3x.png +0 -0
- package/lib/module/Icons/100ms/index.js +22 -0
- package/lib/module/Icons/100ms/index.js.map +1 -0
- package/lib/module/Icons/Alert/assets/alert.png +0 -0
- package/lib/module/Icons/Alert/assets/alert@2x.png +0 -0
- package/lib/module/Icons/Alert/assets/alert@3x.png +0 -0
- package/lib/module/Icons/Alert/index.js +22 -0
- package/lib/module/Icons/Alert/index.js.map +1 -0
- package/lib/module/Icons/Camera/assets/camera-muted.png +0 -0
- package/lib/module/Icons/Camera/assets/camera-muted@2x.png +0 -0
- package/lib/module/Icons/Camera/assets/camera-muted@3x.png +0 -0
- package/lib/module/Icons/Camera/assets/camera-unmuted.png +0 -0
- package/lib/module/Icons/Camera/assets/camera-unmuted@2x.png +0 -0
- package/lib/module/Icons/Camera/assets/camera-unmuted@3x.png +0 -0
- package/lib/module/Icons/Camera/index.js +23 -0
- package/lib/module/Icons/Camera/index.js.map +1 -0
- package/lib/module/Icons/Chat/assets/chat.png +0 -0
- package/lib/module/Icons/Chat/assets/chat@2x.png +0 -0
- package/lib/module/Icons/Chat/assets/chat@3x.png +0 -0
- package/lib/module/Icons/Chat/index.js +22 -0
- package/lib/module/Icons/Chat/index.js.map +1 -0
- package/lib/module/Icons/Chevron/assets/chevron-down.png +0 -0
- package/lib/module/Icons/Chevron/assets/chevron-down@2x.png +0 -0
- package/lib/module/Icons/Chevron/assets/chevron-down@3x.png +0 -0
- package/lib/module/Icons/Chevron/assets/chevron-left.png +0 -0
- package/lib/module/Icons/Chevron/assets/chevron-left@2x.png +0 -0
- package/lib/module/Icons/Chevron/assets/chevron-left@3x.png +0 -0
- package/lib/module/Icons/Chevron/index.js +23 -0
- package/lib/module/Icons/Chevron/index.js.map +1 -0
- package/lib/module/Icons/Clock/assets/clock.png +0 -0
- package/lib/module/Icons/Clock/assets/clock@2x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock@3x.png +0 -0
- package/lib/module/Icons/Clock/index.js +22 -0
- package/lib/module/Icons/Clock/index.js.map +1 -0
- package/lib/module/Icons/Close/assets/close.png +0 -0
- package/lib/module/Icons/Close/assets/close@2x.png +0 -0
- package/lib/module/Icons/Close/assets/close@3x.png +0 -0
- package/lib/module/Icons/Close/index.js +22 -0
- package/lib/module/Icons/Close/index.js.map +1 -0
- package/lib/module/Icons/End/assets/end.png +0 -0
- package/lib/module/Icons/End/assets/end@2x.png +0 -0
- package/lib/module/Icons/End/assets/end@3x.png +0 -0
- package/lib/module/Icons/End/index.js +22 -0
- package/lib/module/Icons/End/index.js.map +1 -0
- package/lib/module/Icons/Hand/assets/hand.png +0 -0
- package/lib/module/Icons/Hand/assets/hand@2x.png +0 -0
- package/lib/module/Icons/Hand/assets/hand@3x.png +0 -0
- package/lib/module/Icons/Hand/index.js +24 -0
- package/lib/module/Icons/Hand/index.js.map +1 -0
- package/lib/module/Icons/Leave/assets/leave.png +0 -0
- package/lib/module/Icons/Leave/assets/leave@2x.png +0 -0
- package/lib/module/Icons/Leave/assets/leave@3x.png +0 -0
- package/lib/module/Icons/Leave/index.js +22 -0
- package/lib/module/Icons/Leave/index.js.map +1 -0
- package/lib/module/Icons/Mic/assets/mic-muted.png +0 -0
- package/lib/module/Icons/Mic/assets/mic-muted@2x.png +0 -0
- package/lib/module/Icons/Mic/assets/mic-muted@3x.png +0 -0
- package/lib/module/Icons/Mic/assets/mic-unmuted.png +0 -0
- package/lib/module/Icons/Mic/assets/mic-unmuted@2x.png +0 -0
- package/lib/module/Icons/Mic/assets/mic-unmuted@3x.png +0 -0
- package/lib/module/Icons/Mic/index.js +23 -0
- package/lib/module/Icons/Mic/index.js.map +1 -0
- package/lib/module/Icons/NetworkQuality/assets/network_0.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_0@2x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_0@3x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_1.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_1@2x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_1@3x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_2.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_2@2x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_2@3x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_3.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_3@2x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_3@3x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_4.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_4@2x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_4@3x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_5.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_5@2x.png +0 -0
- package/lib/module/Icons/NetworkQuality/assets/network_5@3x.png +0 -0
- package/lib/module/Icons/NetworkQuality/index.js +23 -0
- package/lib/module/Icons/NetworkQuality/index.js.map +1 -0
- package/lib/module/Icons/Participants/assets/participants.png +0 -0
- package/lib/module/Icons/Participants/assets/participants@2x.png +0 -0
- package/lib/module/Icons/Participants/assets/participants@3x.png +0 -0
- package/lib/module/Icons/Participants/index.js +22 -0
- package/lib/module/Icons/Participants/index.js.map +1 -0
- package/lib/module/Icons/RotateCamera/assets/rotate-camera.png +0 -0
- package/lib/module/Icons/RotateCamera/assets/rotate-camera@2x.png +0 -0
- package/lib/module/Icons/RotateCamera/assets/rotate-camera@3x.png +0 -0
- package/lib/module/Icons/RotateCamera/index.js +22 -0
- package/lib/module/Icons/RotateCamera/index.js.map +1 -0
- package/lib/module/Icons/ScreenShare/assets/screen-share.png +0 -0
- package/lib/module/Icons/ScreenShare/assets/screen-share@2x.png +0 -0
- package/lib/module/Icons/ScreenShare/assets/screen-share@3x.png +0 -0
- package/lib/module/Icons/ScreenShare/index.js +22 -0
- package/lib/module/Icons/ScreenShare/index.js.map +1 -0
- package/lib/module/Icons/Send/assets/send.png +0 -0
- package/lib/module/Icons/Send/assets/send@2x.png +0 -0
- package/lib/module/Icons/Send/assets/send@3x.png +0 -0
- package/lib/module/Icons/Send/index.js +22 -0
- package/lib/module/Icons/Send/index.js.map +1 -0
- package/lib/module/Icons/Settings/assets/settings.png +0 -0
- package/lib/module/Icons/Settings/assets/settings@2x.png +0 -0
- package/lib/module/Icons/Settings/assets/settings@3x.png +0 -0
- package/lib/module/Icons/Settings/index.js +22 -0
- package/lib/module/Icons/Settings/index.js.map +1 -0
- package/lib/module/Icons/Speaker/assets/speaker-muted.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker-muted@2x.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker-muted@3x.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker@2x.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker@3x.png +0 -0
- package/lib/module/Icons/Speaker/index.js +23 -0
- package/lib/module/Icons/Speaker/index.js.map +1 -0
- package/lib/module/Icons/ThreeDots/assets/three-dots-vertical.png +0 -0
- package/lib/module/Icons/ThreeDots/assets/three-dots-vertical@2x.png +0 -0
- package/lib/module/Icons/ThreeDots/assets/three-dots-vertical@3x.png +0 -0
- package/lib/module/Icons/ThreeDots/index.js +23 -0
- package/lib/module/Icons/ThreeDots/index.js.map +1 -0
- package/lib/module/Icons/index.js +20 -0
- package/lib/module/Icons/index.js.map +1 -0
- package/lib/module/assets/100ms-logo.png +0 -0
- package/lib/module/assets/brb.png +0 -0
- package/lib/module/assets/icon.png +0 -0
- package/lib/module/assets/illustration.png +0 -0
- package/lib/module/assets/network_0.png +0 -0
- package/lib/module/assets/network_1.png +0 -0
- package/lib/module/assets/network_2.png +0 -0
- package/lib/module/assets/network_3.png +0 -0
- package/lib/module/assets/network_4.png +0 -0
- package/lib/module/assets/user_music.png +0 -0
- package/lib/module/components/AvatarView.js +39 -0
- package/lib/module/components/AvatarView.js.map +1 -0
- package/lib/module/components/BackButton.js +33 -0
- package/lib/module/components/BackButton.js.map +1 -0
- package/lib/module/components/Chat/ChatBanner.js +67 -0
- package/lib/module/components/Chat/ChatBanner.js.map +1 -0
- package/lib/module/components/Chat/ChatList.js +44 -0
- package/lib/module/components/Chat/ChatList.js.map +1 -0
- package/lib/module/components/Chat/ChatMessage.js +165 -0
- package/lib/module/components/Chat/ChatMessage.js.map +1 -0
- package/lib/module/components/Chat/PinnedMessage.js +75 -0
- package/lib/module/components/Chat/PinnedMessage.js.map +1 -0
- package/lib/module/components/Chat/index.js +5 -0
- package/lib/module/components/Chat/index.js.map +1 -0
- package/lib/module/components/ChatWindow.js +595 -0
- package/lib/module/components/ChatWindow.js.map +1 -0
- package/lib/module/components/CustomButton.js +46 -0
- package/lib/module/components/CustomButton.js.map +1 -0
- package/lib/module/components/CustomHLSPlayerControls.js +73 -0
- package/lib/module/components/CustomHLSPlayerControls.js.map +1 -0
- package/lib/module/components/CustomInput.js +83 -0
- package/lib/module/components/CustomInput.js.map +1 -0
- package/lib/module/components/DefaultModal.js +96 -0
- package/lib/module/components/DefaultModal.js.map +1 -0
- package/lib/module/components/DisplayTrack.js +63 -0
- package/lib/module/components/DisplayTrack.js.map +1 -0
- package/lib/module/components/DisplayView.js +203 -0
- package/lib/module/components/DisplayView.js.map +1 -0
- package/lib/module/components/Footer.js +76 -0
- package/lib/module/components/Footer.js.map +1 -0
- package/lib/module/components/FullScreenIndicator.js +17 -0
- package/lib/module/components/FullScreenIndicator.js.map +1 -0
- package/lib/module/components/GridView.js +90 -0
- package/lib/module/components/GridView.js.map +1 -0
- package/lib/module/components/HLSPlayerEmoticons.js +40 -0
- package/lib/module/components/HLSPlayerEmoticons.js.map +1 -0
- package/lib/module/components/HLSPlayerStatsView.js +56 -0
- package/lib/module/components/HLSPlayerStatsView.js.map +1 -0
- package/lib/module/components/HLSView.js +132 -0
- package/lib/module/components/HLSView.js.map +1 -0
- package/lib/module/components/HMSChat.js +22 -0
- package/lib/module/components/HMSChat.js.map +1 -0
- package/lib/module/components/HMSHLSNotStarted.js +50 -0
- package/lib/module/components/HMSHLSNotStarted.js.map +1 -0
- package/lib/module/components/HMSManageCameraRotation.js +33 -0
- package/lib/module/components/HMSManageCameraRotation.js.map +1 -0
- package/lib/module/components/HMSManageLeave.js +276 -0
- package/lib/module/components/HMSManageLeave.js.map +1 -0
- package/lib/module/components/HMSManageLocalAudio.js +37 -0
- package/lib/module/components/HMSManageLocalAudio.js.map +1 -0
- package/lib/module/components/HMSManageLocalVideo.js +37 -0
- package/lib/module/components/HMSManageLocalVideo.js.map +1 -0
- package/lib/module/components/HMSManageRaiseHand.js +39 -0
- package/lib/module/components/HMSManageRaiseHand.js.map +1 -0
- package/lib/module/components/HMSPreviewDeviceSettings.js +296 -0
- package/lib/module/components/HMSPreviewDeviceSettings.js.map +1 -0
- package/lib/module/components/HMSPreviewEditName.js +54 -0
- package/lib/module/components/HMSPreviewEditName.js.map +1 -0
- package/lib/module/components/HMSPreviewJoinButton.js +47 -0
- package/lib/module/components/HMSPreviewJoinButton.js.map +1 -0
- package/lib/module/components/HMSPreviewPeersList.js +80 -0
- package/lib/module/components/HMSPreviewPeersList.js.map +1 -0
- package/lib/module/components/HMSPreviewSubtitle.js +23 -0
- package/lib/module/components/HMSPreviewSubtitle.js.map +1 -0
- package/lib/module/components/HMSPreviewTile.js +129 -0
- package/lib/module/components/HMSPreviewTile.js.map +1 -0
- package/lib/module/components/HMSPreviewTitle.js +23 -0
- package/lib/module/components/HMSPreviewTitle.js.map +1 -0
- package/lib/module/components/HMSRoomOptions.js +96 -0
- package/lib/module/components/HMSRoomOptions.js.map +1 -0
- package/lib/module/components/HMSShareScreen.js +50 -0
- package/lib/module/components/HMSShareScreen.js.map +1 -0
- package/lib/module/components/HMSShowNetworkQuality.js +48 -0
- package/lib/module/components/HMSShowNetworkQuality.js.map +1 -0
- package/lib/module/components/Header.js +167 -0
- package/lib/module/components/Header.js.map +1 -0
- package/lib/module/components/LiveButton.js +61 -0
- package/lib/module/components/LiveButton.js.map +1 -0
- package/lib/module/components/Meeting.js +55 -0
- package/lib/module/components/Meeting.js.map +1 -0
- package/lib/module/components/MeetingScreenContent.js +89 -0
- package/lib/module/components/MeetingScreenContent.js.map +1 -0
- package/lib/module/components/MenuModal/Menu.js +242 -0
- package/lib/module/components/MenuModal/Menu.js.map +1 -0
- package/lib/module/components/MenuModal/MenuDivider.js +20 -0
- package/lib/module/components/MenuModal/MenuDivider.js.map +1 -0
- package/lib/module/components/MenuModal/MenuItem.js +53 -0
- package/lib/module/components/MenuModal/MenuItem.js.map +1 -0
- package/lib/module/components/MenuModal/index.js +4 -0
- package/lib/module/components/MenuModal/index.js.map +1 -0
- package/lib/module/components/Modals.js +1609 -0
- package/lib/module/components/Modals.js.map +1 -0
- package/lib/module/components/PIPView.js +23 -0
- package/lib/module/components/PIPView.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsFilter.js +121 -0
- package/lib/module/components/Participants/ParticipantsFilter.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsHeader.js +58 -0
- package/lib/module/components/Participants/ParticipantsHeader.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsList.js +264 -0
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -0
- package/lib/module/components/Participants/ParticipantsSeachInput.js +45 -0
- package/lib/module/components/Participants/ParticipantsSeachInput.js.map +1 -0
- package/lib/module/components/Participants/SearchableParticipantsView.js +18 -0
- package/lib/module/components/Participants/SearchableParticipantsView.js.map +1 -0
- package/lib/module/components/Participants/index.js +6 -0
- package/lib/module/components/Participants/index.js.map +1 -0
- package/lib/module/components/ParticipantsModal.js +34 -0
- package/lib/module/components/ParticipantsModal.js.map +1 -0
- package/lib/module/components/PeerDisplayView.js +71 -0
- package/lib/module/components/PeerDisplayView.js.map +1 -0
- package/lib/module/components/PeerRTCStatsContainer.js +60 -0
- package/lib/module/components/PeerRTCStatsContainer.js.map +1 -0
- package/lib/module/components/PeerRTCStatsView.js +46 -0
- package/lib/module/components/PeerRTCStatsView.js.map +1 -0
- package/lib/module/components/PeerSettingsModalContent.js +233 -0
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -0
- package/lib/module/components/Picker.js +83 -0
- package/lib/module/components/Picker.js.map +1 -0
- package/lib/module/components/PressableIcon.js +37 -0
- package/lib/module/components/PressableIcon.js.map +1 -0
- package/lib/module/components/Preview.js +77 -0
- package/lib/module/components/Preview.js.map +1 -0
- package/lib/module/components/RoomSettingsModalContent.js +505 -0
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -0
- package/lib/module/components/StatusBar.js +17 -0
- package/lib/module/components/StatusBar.js.map +1 -0
- package/lib/module/components/StreamingQualityModalContent.js +205 -0
- package/lib/module/components/StreamingQualityModalContent.js.map +1 -0
- package/lib/module/components/SwitchRow.js +41 -0
- package/lib/module/components/SwitchRow.js.map +1 -0
- package/lib/module/components/Tile.js +104 -0
- package/lib/module/components/Tile.js.map +1 -0
- package/lib/module/components/TilesContainer.js +31 -0
- package/lib/module/components/TilesContainer.js.map +1 -0
- package/lib/module/components/ZoomableView.js +76 -0
- package/lib/module/components/ZoomableView.js.map +1 -0
- package/lib/module/components/index.js +9 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/components/styles.js +959 -0
- package/lib/module/components/styles.js.map +1 -0
- package/lib/module/hooks/useHmsInstance.js +174 -0
- package/lib/module/hooks/useHmsInstance.js.map +1 -0
- package/lib/module/hooks-sdk-selectors.js +9 -0
- package/lib/module/hooks-sdk-selectors.js.map +1 -0
- package/lib/module/hooks-sdk.js +115 -0
- package/lib/module/hooks-sdk.js.map +1 -0
- package/lib/module/hooks-util-selectors.js +5 -0
- package/lib/module/hooks-util-selectors.js.map +1 -0
- package/lib/module/hooks-util.js +772 -0
- package/lib/module/hooks-util.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/peerTrackNodeUtils.js +52 -0
- package/lib/module/peerTrackNodeUtils.js.map +1 -0
- package/lib/module/redux/actionTypes.js +67 -0
- package/lib/module/redux/actionTypes.js.map +1 -0
- package/lib/module/redux/actions/index.js +144 -0
- package/lib/module/redux/actions/index.js.map +1 -0
- package/lib/module/redux/index.js +4 -0
- package/lib/module/redux/index.js.map +1 -0
- package/lib/module/redux/reducers/appState.js +123 -0
- package/lib/module/redux/reducers/appState.js.map +1 -0
- package/lib/module/redux/reducers/chatWindow.js +38 -0
- package/lib/module/redux/reducers/chatWindow.js.map +1 -0
- package/lib/module/redux/reducers/hmsStates.js +60 -0
- package/lib/module/redux/reducers/hmsStates.js.map +1 -0
- package/lib/module/redux/reducers/index.js +14 -0
- package/lib/module/redux/reducers/index.js.map +1 -0
- package/lib/module/redux/reducers/message.js +34 -0
- package/lib/module/redux/reducers/message.js.map +1 -0
- package/lib/module/redux/reducers/userState.js +58 -0
- package/lib/module/redux/reducers/userState.js.map +1 -0
- package/lib/module/types.js +9 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/utils/dimension.js +53 -0
- package/lib/module/utils/dimension.js.map +1 -0
- package/lib/module/utils/functions.js +338 -0
- package/lib/module/utils/functions.js.map +1 -0
- package/lib/module/utils/getRoomLinkDetails.js +16 -0
- package/lib/module/utils/getRoomLinkDetails.js.map +1 -0
- package/lib/module/utils/hooks.js +39 -0
- package/lib/module/utils/hooks.js.map +1 -0
- package/lib/module/utils/theme.js +134 -0
- package/lib/module/utils/theme.js.map +1 -0
- package/lib/module/utils/types.js +90 -0
- package/lib/module/utils/types.js.map +1 -0
- package/lib/module/utils.js +23 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/typescript/HMSContainer.d.ts +3 -0
- package/lib/typescript/HMSContainer.d.ts.map +1 -0
- package/lib/typescript/HMSInstanceSetup.d.ts +3 -0
- package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -0
- package/lib/typescript/HMSPrebuilt.d.ts +18 -0
- package/lib/typescript/HMSPrebuilt.d.ts.map +1 -0
- package/lib/typescript/HMSRoomSetup.d.ts +3 -0
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -0
- package/lib/typescript/Icons/100ms/index.d.ts +7 -0
- package/lib/typescript/Icons/100ms/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Alert/index.d.ts +7 -0
- package/lib/typescript/Icons/Alert/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Camera/index.d.ts +8 -0
- package/lib/typescript/Icons/Camera/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Chat/index.d.ts +7 -0
- package/lib/typescript/Icons/Chat/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Chevron/index.d.ts +8 -0
- package/lib/typescript/Icons/Chevron/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Clock/index.d.ts +7 -0
- package/lib/typescript/Icons/Clock/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Close/index.d.ts +7 -0
- package/lib/typescript/Icons/Close/index.d.ts.map +1 -0
- package/lib/typescript/Icons/End/index.d.ts +7 -0
- package/lib/typescript/Icons/End/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Hand/index.d.ts +7 -0
- package/lib/typescript/Icons/Hand/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Leave/index.d.ts +7 -0
- package/lib/typescript/Icons/Leave/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Mic/index.d.ts +8 -0
- package/lib/typescript/Icons/Mic/index.d.ts.map +1 -0
- package/lib/typescript/Icons/NetworkQuality/index.d.ts +8 -0
- package/lib/typescript/Icons/NetworkQuality/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Participants/index.d.ts +7 -0
- package/lib/typescript/Icons/Participants/index.d.ts.map +1 -0
- package/lib/typescript/Icons/RotateCamera/index.d.ts +7 -0
- package/lib/typescript/Icons/RotateCamera/index.d.ts.map +1 -0
- package/lib/typescript/Icons/ScreenShare/index.d.ts +7 -0
- package/lib/typescript/Icons/ScreenShare/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Send/index.d.ts +7 -0
- package/lib/typescript/Icons/Send/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Settings/index.d.ts +7 -0
- package/lib/typescript/Icons/Settings/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Speaker/index.d.ts +8 -0
- package/lib/typescript/Icons/Speaker/index.d.ts.map +1 -0
- package/lib/typescript/Icons/ThreeDots/index.d.ts +8 -0
- package/lib/typescript/Icons/ThreeDots/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +20 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -0
- package/lib/typescript/components/AvatarView.d.ts +10 -0
- package/lib/typescript/components/AvatarView.d.ts.map +1 -0
- package/lib/typescript/components/BackButton.d.ts +5 -0
- package/lib/typescript/components/BackButton.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatBanner.d.ts +3 -0
- package/lib/typescript/components/Chat/ChatBanner.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatList.d.ts +5 -0
- package/lib/typescript/components/Chat/ChatList.d.ts.map +1 -0
- package/lib/typescript/components/Chat/ChatMessage.d.ts +8 -0
- package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -0
- package/lib/typescript/components/Chat/PinnedMessage.d.ts +3 -0
- package/lib/typescript/components/Chat/PinnedMessage.d.ts.map +1 -0
- package/lib/typescript/components/Chat/index.d.ts +5 -0
- package/lib/typescript/components/Chat/index.d.ts.map +1 -0
- package/lib/typescript/components/ChatWindow.d.ts +22 -0
- package/lib/typescript/components/ChatWindow.d.ts.map +1 -0
- package/lib/typescript/components/CustomButton.d.ts +14 -0
- package/lib/typescript/components/CustomButton.d.ts.map +1 -0
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts +7 -0
- package/lib/typescript/components/CustomHLSPlayerControls.d.ts.map +1 -0
- package/lib/typescript/components/CustomInput.d.ts +24 -0
- package/lib/typescript/components/CustomInput.d.ts.map +1 -0
- package/lib/typescript/components/DefaultModal.d.ts +15 -0
- package/lib/typescript/components/DefaultModal.d.ts.map +1 -0
- package/lib/typescript/components/DisplayTrack.d.ts +9 -0
- package/lib/typescript/components/DisplayTrack.d.ts.map +1 -0
- package/lib/typescript/components/DisplayView.d.ts +10 -0
- package/lib/typescript/components/DisplayView.d.ts.map +1 -0
- package/lib/typescript/components/Footer.d.ts +9 -0
- package/lib/typescript/components/Footer.d.ts.map +1 -0
- package/lib/typescript/components/FullScreenIndicator.d.ts +3 -0
- package/lib/typescript/components/FullScreenIndicator.d.ts.map +1 -0
- package/lib/typescript/components/GridView.d.ts +14 -0
- package/lib/typescript/components/GridView.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayerEmoticons.d.ts +2 -0
- package/lib/typescript/components/HLSPlayerEmoticons.d.ts.map +1 -0
- package/lib/typescript/components/HLSPlayerStatsView.d.ts +6 -0
- package/lib/typescript/components/HLSPlayerStatsView.d.ts.map +1 -0
- package/lib/typescript/components/HLSView.d.ts +3 -0
- package/lib/typescript/components/HLSView.d.ts.map +1 -0
- package/lib/typescript/components/HMSChat.d.ts +3 -0
- package/lib/typescript/components/HMSChat.d.ts.map +1 -0
- package/lib/typescript/components/HMSHLSNotStarted.d.ts +3 -0
- package/lib/typescript/components/HMSHLSNotStarted.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageCameraRotation.d.ts +3 -0
- package/lib/typescript/components/HMSManageCameraRotation.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageLeave.d.ts +9 -0
- package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageLocalAudio.d.ts +3 -0
- package/lib/typescript/components/HMSManageLocalAudio.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageLocalVideo.d.ts +3 -0
- package/lib/typescript/components/HMSManageLocalVideo.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageRaiseHand.d.ts +3 -0
- package/lib/typescript/components/HMSManageRaiseHand.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts +3 -0
- package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewEditName.d.ts +5 -0
- package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts +7 -0
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewPeersList.d.ts +5 -0
- package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewSubtitle.d.ts +6 -0
- package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewTile.d.ts +3 -0
- package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewTitle.d.ts +6 -0
- package/lib/typescript/components/HMSPreviewTitle.d.ts.map +1 -0
- package/lib/typescript/components/HMSRoomOptions.d.ts +6 -0
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -0
- package/lib/typescript/components/HMSShareScreen.d.ts +9 -0
- package/lib/typescript/components/HMSShareScreen.d.ts.map +1 -0
- package/lib/typescript/components/HMSShowNetworkQuality.d.ts +3 -0
- package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +1 -0
- package/lib/typescript/components/Header.d.ts +9 -0
- package/lib/typescript/components/Header.d.ts.map +1 -0
- package/lib/typescript/components/LiveButton.d.ts +17 -0
- package/lib/typescript/components/LiveButton.d.ts.map +1 -0
- package/lib/typescript/components/Meeting.d.ts +8 -0
- package/lib/typescript/components/Meeting.d.ts.map +1 -0
- package/lib/typescript/components/MeetingScreenContent.d.ts +8 -0
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -0
- package/lib/typescript/components/MenuModal/Menu.d.ts +45 -0
- package/lib/typescript/components/MenuModal/Menu.d.ts.map +1 -0
- package/lib/typescript/components/MenuModal/MenuDivider.d.ts +6 -0
- package/lib/typescript/components/MenuModal/MenuDivider.d.ts.map +1 -0
- package/lib/typescript/components/MenuModal/MenuItem.d.ts +12 -0
- package/lib/typescript/components/MenuModal/MenuItem.d.ts.map +1 -0
- package/lib/typescript/components/MenuModal/index.d.ts +7 -0
- package/lib/typescript/components/MenuModal/index.d.ts.map +1 -0
- package/lib/typescript/components/Modals.d.ts +96 -0
- package/lib/typescript/components/Modals.d.ts.map +1 -0
- package/lib/typescript/components/PIPView.d.ts +8 -0
- package/lib/typescript/components/PIPView.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsFilter.d.ts +6 -0
- package/lib/typescript/components/Participants/ParticipantsFilter.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsHeader.d.ts +9 -0
- package/lib/typescript/components/Participants/ParticipantsHeader.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsList.d.ts +7 -0
- package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -0
- package/lib/typescript/components/Participants/ParticipantsSeachInput.d.ts +8 -0
- package/lib/typescript/components/Participants/ParticipantsSeachInput.d.ts.map +1 -0
- package/lib/typescript/components/Participants/SearchableParticipantsView.d.ts +3 -0
- package/lib/typescript/components/Participants/SearchableParticipantsView.d.ts.map +1 -0
- package/lib/typescript/components/Participants/index.d.ts +6 -0
- package/lib/typescript/components/Participants/index.d.ts.map +1 -0
- package/lib/typescript/components/ParticipantsModal.d.ts +5 -0
- package/lib/typescript/components/ParticipantsModal.d.ts.map +1 -0
- package/lib/typescript/components/PeerDisplayView.d.ts +11 -0
- package/lib/typescript/components/PeerDisplayView.d.ts.map +1 -0
- package/lib/typescript/components/PeerRTCStatsContainer.d.ts +9 -0
- package/lib/typescript/components/PeerRTCStatsContainer.d.ts.map +1 -0
- package/lib/typescript/components/PeerRTCStatsView.d.ts +10 -0
- package/lib/typescript/components/PeerRTCStatsView.d.ts.map +1 -0
- package/lib/typescript/components/PeerSettingsModalContent.d.ts +13 -0
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -0
- package/lib/typescript/components/Picker.d.ts +9 -0
- package/lib/typescript/components/Picker.d.ts.map +1 -0
- package/lib/typescript/components/PressableIcon.d.ts +11 -0
- package/lib/typescript/components/PressableIcon.d.ts.map +1 -0
- package/lib/typescript/components/Preview.d.ts +6 -0
- package/lib/typescript/components/Preview.d.ts.map +1 -0
- package/lib/typescript/components/RoomSettingsModalContent.d.ts +17 -0
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -0
- package/lib/typescript/components/StatusBar.d.ts +7 -0
- package/lib/typescript/components/StatusBar.d.ts.map +1 -0
- package/lib/typescript/components/StreamingQualityModalContent.d.ts +9 -0
- package/lib/typescript/components/StreamingQualityModalContent.d.ts.map +1 -0
- package/lib/typescript/components/SwitchRow.d.ts +12 -0
- package/lib/typescript/components/SwitchRow.d.ts.map +1 -0
- package/lib/typescript/components/Tile.d.ts +12 -0
- package/lib/typescript/components/Tile.d.ts.map +1 -0
- package/lib/typescript/components/TilesContainer.d.ts +11 -0
- package/lib/typescript/components/TilesContainer.d.ts.map +1 -0
- package/lib/typescript/components/ZoomableView.d.ts +6 -0
- package/lib/typescript/components/ZoomableView.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +9 -0
- package/lib/typescript/components/index.d.ts.map +1 -0
- package/lib/typescript/components/styles.d.ts +945 -0
- package/lib/typescript/components/styles.d.ts.map +1 -0
- package/lib/typescript/hooks/useHmsInstance.d.ts +1 -0
- package/lib/typescript/hooks/useHmsInstance.d.ts.map +1 -0
- package/lib/typescript/hooks-sdk-selectors.d.ts +4 -0
- package/lib/typescript/hooks-sdk-selectors.d.ts.map +1 -0
- package/lib/typescript/hooks-sdk.d.ts +12 -0
- package/lib/typescript/hooks-sdk.d.ts.map +1 -0
- package/lib/typescript/hooks-util-selectors.d.ts +3 -0
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -0
- package/lib/typescript/hooks-util.d.ts +53 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/peerTrackNodeUtils.d.ts +10 -0
- package/lib/typescript/peerTrackNodeUtils.d.ts.map +1 -0
- package/lib/typescript/redux/actionTypes.d.ts +56 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -0
- package/lib/typescript/redux/actions/index.d.ts +199 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -0
- package/lib/typescript/redux/index.d.ts +55 -0
- package/lib/typescript/redux/index.d.ts.map +1 -0
- package/lib/typescript/redux/reducers/appState.d.ts +32 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -0
- package/lib/typescript/redux/reducers/chatWindow.d.ts +10 -0
- package/lib/typescript/redux/reducers/chatWindow.d.ts.map +1 -0
- package/lib/typescript/redux/reducers/hmsStates.d.ts +46 -0
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -0
- package/lib/typescript/redux/reducers/index.d.ts +54 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -0
- package/lib/typescript/redux/reducers/message.d.ts +12 -0
- package/lib/typescript/redux/reducers/message.d.ts.map +1 -0
- package/lib/typescript/redux/reducers/userState.d.ts +26 -0
- package/lib/typescript/redux/reducers/userState.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +8 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/utils/dimension.d.ts +15 -0
- package/lib/typescript/utils/dimension.d.ts.map +1 -0
- package/lib/typescript/utils/functions.d.ts +47 -0
- package/lib/typescript/utils/functions.d.ts.map +1 -0
- package/lib/typescript/utils/getRoomLinkDetails.d.ts +5 -0
- package/lib/typescript/utils/getRoomLinkDetails.d.ts.map +1 -0
- package/lib/typescript/utils/hooks.d.ts +2 -0
- package/lib/typescript/utils/hooks.d.ts.map +1 -0
- package/lib/typescript/utils/theme.d.ts +126 -0
- package/lib/typescript/utils/theme.d.ts.map +1 -0
- package/lib/typescript/utils/types.d.ts +82 -0
- package/lib/typescript/utils/types.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +12 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/package.json +182 -0
- package/src/HMSContainer.tsx +18 -0
- package/src/HMSInstanceSetup.tsx +196 -0
- package/src/HMSPrebuilt.tsx +36 -0
- package/src/HMSRoomSetup.tsx +281 -0
- package/src/Icons/100ms/assets/hms-logo.png +0 -0
- package/src/Icons/100ms/assets/hms-logo@2x.png +0 -0
- package/src/Icons/100ms/assets/hms-logo@3x.png +0 -0
- package/src/Icons/100ms/index.tsx +27 -0
- package/src/Icons/Alert/assets/alert.png +0 -0
- package/src/Icons/Alert/assets/alert@2x.png +0 -0
- package/src/Icons/Alert/assets/alert@3x.png +0 -0
- package/src/Icons/Alert/index.tsx +27 -0
- package/src/Icons/Camera/assets/camera-muted.png +0 -0
- package/src/Icons/Camera/assets/camera-muted@2x.png +0 -0
- package/src/Icons/Camera/assets/camera-muted@3x.png +0 -0
- package/src/Icons/Camera/assets/camera-unmuted.png +0 -0
- package/src/Icons/Camera/assets/camera-unmuted@2x.png +0 -0
- package/src/Icons/Camera/assets/camera-unmuted@3x.png +0 -0
- package/src/Icons/Camera/index.tsx +34 -0
- package/src/Icons/Chat/assets/chat.png +0 -0
- package/src/Icons/Chat/assets/chat@2x.png +0 -0
- package/src/Icons/Chat/assets/chat@3x.png +0 -0
- package/src/Icons/Chat/index.tsx +24 -0
- package/src/Icons/Chevron/assets/chevron-down.png +0 -0
- package/src/Icons/Chevron/assets/chevron-down@2x.png +0 -0
- package/src/Icons/Chevron/assets/chevron-down@3x.png +0 -0
- package/src/Icons/Chevron/assets/chevron-left.png +0 -0
- package/src/Icons/Chevron/assets/chevron-left@2x.png +0 -0
- package/src/Icons/Chevron/assets/chevron-left@3x.png +0 -0
- package/src/Icons/Chevron/index.tsx +34 -0
- package/src/Icons/Clock/assets/clock.png +0 -0
- package/src/Icons/Clock/assets/clock@2x.png +0 -0
- package/src/Icons/Clock/assets/clock@3x.png +0 -0
- package/src/Icons/Clock/index.tsx +27 -0
- package/src/Icons/Close/assets/close.png +0 -0
- package/src/Icons/Close/assets/close@2x.png +0 -0
- package/src/Icons/Close/assets/close@3x.png +0 -0
- package/src/Icons/Close/index.tsx +27 -0
- package/src/Icons/End/assets/end.png +0 -0
- package/src/Icons/End/assets/end@2x.png +0 -0
- package/src/Icons/End/assets/end@3x.png +0 -0
- package/src/Icons/End/index.tsx +24 -0
- package/src/Icons/Hand/assets/hand.png +0 -0
- package/src/Icons/Hand/assets/hand@2x.png +0 -0
- package/src/Icons/Hand/assets/hand@3x.png +0 -0
- package/src/Icons/Hand/index.tsx +27 -0
- package/src/Icons/Leave/assets/leave.png +0 -0
- package/src/Icons/Leave/assets/leave@2x.png +0 -0
- package/src/Icons/Leave/assets/leave@3x.png +0 -0
- package/src/Icons/Leave/index.tsx +27 -0
- package/src/Icons/Mic/assets/mic-muted.png +0 -0
- package/src/Icons/Mic/assets/mic-muted@2x.png +0 -0
- package/src/Icons/Mic/assets/mic-muted@3x.png +0 -0
- package/src/Icons/Mic/assets/mic-unmuted.png +0 -0
- package/src/Icons/Mic/assets/mic-unmuted@2x.png +0 -0
- package/src/Icons/Mic/assets/mic-unmuted@3x.png +0 -0
- package/src/Icons/Mic/index.tsx +34 -0
- package/src/Icons/NetworkQuality/assets/network_0.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_0@2x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_0@3x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_1.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_1@2x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_1@3x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_2.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_2@2x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_2@3x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_3.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_3@2x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_3@3x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_4.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_4@2x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_4@3x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_5.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_5@2x.png +0 -0
- package/src/Icons/NetworkQuality/assets/network_5@3x.png +0 -0
- package/src/Icons/NetworkQuality/index.tsx +42 -0
- package/src/Icons/Participants/assets/participants.png +0 -0
- package/src/Icons/Participants/assets/participants@2x.png +0 -0
- package/src/Icons/Participants/assets/participants@3x.png +0 -0
- package/src/Icons/Participants/index.tsx +27 -0
- package/src/Icons/RotateCamera/assets/rotate-camera.png +0 -0
- package/src/Icons/RotateCamera/assets/rotate-camera@2x.png +0 -0
- package/src/Icons/RotateCamera/assets/rotate-camera@3x.png +0 -0
- package/src/Icons/RotateCamera/index.tsx +27 -0
- package/src/Icons/ScreenShare/assets/screen-share.png +0 -0
- package/src/Icons/ScreenShare/assets/screen-share@2x.png +0 -0
- package/src/Icons/ScreenShare/assets/screen-share@3x.png +0 -0
- package/src/Icons/ScreenShare/index.tsx +27 -0
- package/src/Icons/Send/assets/send.png +0 -0
- package/src/Icons/Send/assets/send@2x.png +0 -0
- package/src/Icons/Send/assets/send@3x.png +0 -0
- package/src/Icons/Send/index.tsx +24 -0
- package/src/Icons/Settings/assets/settings.png +0 -0
- package/src/Icons/Settings/assets/settings@2x.png +0 -0
- package/src/Icons/Settings/assets/settings@3x.png +0 -0
- package/src/Icons/Settings/index.tsx +27 -0
- package/src/Icons/Speaker/assets/speaker-muted.png +0 -0
- package/src/Icons/Speaker/assets/speaker-muted@2x.png +0 -0
- package/src/Icons/Speaker/assets/speaker-muted@3x.png +0 -0
- package/src/Icons/Speaker/assets/speaker.png +0 -0
- package/src/Icons/Speaker/assets/speaker@2x.png +0 -0
- package/src/Icons/Speaker/assets/speaker@3x.png +0 -0
- package/src/Icons/Speaker/index.tsx +34 -0
- package/src/Icons/ThreeDots/assets/three-dots-vertical.png +0 -0
- package/src/Icons/ThreeDots/assets/three-dots-vertical@2x.png +0 -0
- package/src/Icons/ThreeDots/assets/three-dots-vertical@3x.png +0 -0
- package/src/Icons/ThreeDots/index.tsx +34 -0
- package/src/Icons/index.ts +19 -0
- package/src/assets/100ms-logo.png +0 -0
- package/src/assets/brb.png +0 -0
- package/src/assets/icon.png +0 -0
- package/src/assets/illustration.png +0 -0
- package/src/assets/network_0.png +0 -0
- package/src/assets/network_1.png +0 -0
- package/src/assets/network_2.png +0 -0
- package/src/assets/network_3.png +0 -0
- package/src/assets/network_4.png +0 -0
- package/src/assets/user_music.png +0 -0
- package/src/components/AvatarView.tsx +54 -0
- package/src/components/BackButton.tsx +42 -0
- package/src/components/Chat/ChatBanner.tsx +70 -0
- package/src/components/Chat/ChatList.tsx +60 -0
- package/src/components/Chat/ChatMessage.tsx +237 -0
- package/src/components/Chat/PinnedMessage.tsx +89 -0
- package/src/components/Chat/index.ts +4 -0
- package/src/components/ChatWindow.tsx +706 -0
- package/src/components/CustomButton.tsx +80 -0
- package/src/components/CustomHLSPlayerControls.tsx +92 -0
- package/src/components/CustomInput.tsx +139 -0
- package/src/components/DefaultModal.tsx +117 -0
- package/src/components/DisplayTrack.tsx +92 -0
- package/src/components/DisplayView.tsx +314 -0
- package/src/components/Footer.tsx +109 -0
- package/src/components/FullScreenIndicator.tsx +21 -0
- package/src/components/GridView.tsx +124 -0
- package/src/components/HLSPlayerEmoticons.tsx +60 -0
- package/src/components/HLSPlayerStatsView.tsx +68 -0
- package/src/components/HLSView.tsx +170 -0
- package/src/components/HMSChat.tsx +36 -0
- package/src/components/HMSHLSNotStarted.tsx +62 -0
- package/src/components/HMSManageCameraRotation.tsx +48 -0
- package/src/components/HMSManageLeave.tsx +349 -0
- package/src/components/HMSManageLocalAudio.tsx +49 -0
- package/src/components/HMSManageLocalVideo.tsx +49 -0
- package/src/components/HMSManageRaiseHand.tsx +48 -0
- package/src/components/HMSPreviewDeviceSettings.tsx +387 -0
- package/src/components/HMSPreviewEditName.tsx +63 -0
- package/src/components/HMSPreviewJoinButton.tsx +64 -0
- package/src/components/HMSPreviewPeersList.tsx +108 -0
- package/src/components/HMSPreviewSubtitle.tsx +26 -0
- package/src/components/HMSPreviewTile.tsx +152 -0
- package/src/components/HMSPreviewTitle.tsx +26 -0
- package/src/components/HMSRoomOptions.tsx +141 -0
- package/src/components/HMSShareScreen.tsx +71 -0
- package/src/components/HMSShowNetworkQuality.tsx +67 -0
- package/src/components/Header.tsx +185 -0
- package/src/components/LiveButton.tsx +77 -0
- package/src/components/Meeting.tsx +72 -0
- package/src/components/MeetingScreenContent.tsx +109 -0
- package/src/components/MenuModal/Menu.tsx +305 -0
- package/src/components/MenuModal/MenuDivider.tsx +22 -0
- package/src/components/MenuModal/MenuItem.tsx +67 -0
- package/src/components/MenuModal/index.ts +7 -0
- package/src/components/Modals.tsx +2103 -0
- package/src/components/PIPView.tsx +30 -0
- package/src/components/Participants/ParticipantsFilter.tsx +144 -0
- package/src/components/Participants/ParticipantsHeader.tsx +64 -0
- package/src/components/Participants/ParticipantsList.tsx +331 -0
- package/src/components/Participants/ParticipantsSeachInput.tsx +55 -0
- package/src/components/Participants/SearchableParticipantsView.tsx +21 -0
- package/src/components/Participants/index.ts +5 -0
- package/src/components/ParticipantsModal.tsx +46 -0
- package/src/components/PeerDisplayView.tsx +112 -0
- package/src/components/PeerRTCStatsContainer.tsx +82 -0
- package/src/components/PeerRTCStatsView.tsx +110 -0
- package/src/components/PeerSettingsModalContent.tsx +355 -0
- package/src/components/Picker.tsx +108 -0
- package/src/components/PressableIcon.tsx +54 -0
- package/src/components/Preview.tsx +108 -0
- package/src/components/RoomSettingsModalContent.tsx +743 -0
- package/src/components/StatusBar.tsx +22 -0
- package/src/components/StreamingQualityModalContent.tsx +266 -0
- package/src/components/SwitchRow.tsx +55 -0
- package/src/components/Tile.tsx +119 -0
- package/src/components/TilesContainer.tsx +48 -0
- package/src/components/ZoomableView.tsx +91 -0
- package/src/components/index.ts +8 -0
- package/src/components/styles.ts +961 -0
- package/src/hooks/useHmsInstance.ts +173 -0
- package/src/hooks-sdk-selectors.tsx +9 -0
- package/src/hooks-sdk.ts +156 -0
- package/src/hooks-util-selectors.tsx +4 -0
- package/src/hooks-util.ts +1124 -0
- package/src/index.ts +1 -0
- package/src/peerTrackNodeUtils.tsx +114 -0
- package/src/redux/actionTypes.ts +85 -0
- package/src/redux/actions/index.ts +196 -0
- package/src/redux/index.ts +8 -0
- package/src/redux/reducers/appState.ts +143 -0
- package/src/redux/reducers/chatWindow.ts +35 -0
- package/src/redux/reducers/hmsStates.ts +126 -0
- package/src/redux/reducers/index.ts +14 -0
- package/src/redux/reducers/message.ts +36 -0
- package/src/redux/reducers/userState.ts +88 -0
- package/src/types.ts +7 -0
- package/src/utils/dimension.ts +57 -0
- package/src/utils/functions.ts +522 -0
- package/src/utils/getRoomLinkDetails.ts +23 -0
- package/src/utils/hooks.ts +104 -0
- package/src/utils/theme.ts +130 -0
- package/src/utils/types.ts +95 -0
- package/src/utils.ts +24 -0
|
@@ -0,0 +1,1124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HMSChangeTrackStateRequest,
|
|
3
|
+
HMSConfig,
|
|
4
|
+
HMSLocalPeer,
|
|
5
|
+
HMSMessage,
|
|
6
|
+
HMSPIPListenerActions,
|
|
7
|
+
HMSPeer,
|
|
8
|
+
// HMSPeerUpdate,
|
|
9
|
+
HMSRemotePeer,
|
|
10
|
+
HMSRoleChangeRequest,
|
|
11
|
+
HMSRoom,
|
|
12
|
+
HMSRoomUpdate,
|
|
13
|
+
HMSSDK,
|
|
14
|
+
HMSTrack,
|
|
15
|
+
HMSTrackSource,
|
|
16
|
+
HMSTrackType,
|
|
17
|
+
HMSTrackUpdate,
|
|
18
|
+
HMSUpdateListenerActions,
|
|
19
|
+
// useHMSPeerUpdates,
|
|
20
|
+
} from '@100mslive/react-native-hms';
|
|
21
|
+
import type {
|
|
22
|
+
HMSSessionStore,
|
|
23
|
+
HMSSessionStoreValue,
|
|
24
|
+
} from '@100mslive/react-native-hms';
|
|
25
|
+
import Toast from 'react-native-simple-toast';
|
|
26
|
+
import { useRef, useCallback, useEffect, useState, useMemo } from 'react';
|
|
27
|
+
|
|
28
|
+
import { ModalTypes, PipModes } from './utils/types';
|
|
29
|
+
import type { PeerTrackNode } from './utils/types';
|
|
30
|
+
import { createPeerTrackNode, parseMetadata } from './utils/functions';
|
|
31
|
+
import { useDispatch, useSelector, useStore } from 'react-redux';
|
|
32
|
+
import type { RootState } from './redux';
|
|
33
|
+
import {
|
|
34
|
+
addMessage,
|
|
35
|
+
addPinnedMessage,
|
|
36
|
+
changePipModeStatus,
|
|
37
|
+
clearStore,
|
|
38
|
+
saveUserData,
|
|
39
|
+
setHMSLocalPeerState,
|
|
40
|
+
setHMSRoleState,
|
|
41
|
+
setHMSRoomState,
|
|
42
|
+
setIsLocalAudioMutedState,
|
|
43
|
+
setIsLocalVideoMutedState,
|
|
44
|
+
setModalType,
|
|
45
|
+
} from './redux/actions';
|
|
46
|
+
import {
|
|
47
|
+
degradeOrRestorePeerTrackNodes,
|
|
48
|
+
// peerTrackNodeExistForPeer,
|
|
49
|
+
peerTrackNodeExistForPeerAndTrack,
|
|
50
|
+
// removePeerTrackNodes,
|
|
51
|
+
removePeerTrackNodesWithTrack,
|
|
52
|
+
replacePeerTrackNodes,
|
|
53
|
+
replacePeerTrackNodesWithTrack,
|
|
54
|
+
} from './peerTrackNodeUtils';
|
|
55
|
+
import { MeetingState } from './types';
|
|
56
|
+
import {
|
|
57
|
+
AppState,
|
|
58
|
+
InteractionManager,
|
|
59
|
+
LayoutAnimation,
|
|
60
|
+
Platform,
|
|
61
|
+
} from 'react-native';
|
|
62
|
+
import { useNavigation } from '@react-navigation/native';
|
|
63
|
+
import {
|
|
64
|
+
useIsLandscapeOrientation,
|
|
65
|
+
useIsPortraitOrientation,
|
|
66
|
+
} from './utils/dimension';
|
|
67
|
+
import {
|
|
68
|
+
useSafeAreaFrame,
|
|
69
|
+
useSafeAreaInsets,
|
|
70
|
+
} from 'react-native-safe-area-context';
|
|
71
|
+
import { selectIsHLSViewer } from './hooks-util-selectors';
|
|
72
|
+
|
|
73
|
+
export const useHMSListeners = (
|
|
74
|
+
setPeerTrackNodes: React.Dispatch<React.SetStateAction<PeerTrackNode[]>>,
|
|
75
|
+
setMeetingState: React.Dispatch<React.SetStateAction<MeetingState>>
|
|
76
|
+
) => {
|
|
77
|
+
const hmsInstance = useHMSInstance();
|
|
78
|
+
const updateLocalPeer = useUpdateHMSLocalPeer(hmsInstance);
|
|
79
|
+
|
|
80
|
+
useHMSRoomUpdate(hmsInstance, setMeetingState);
|
|
81
|
+
|
|
82
|
+
// useHMSPeersUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
83
|
+
|
|
84
|
+
useHMSTrackUpdate(hmsInstance, updateLocalPeer, setPeerTrackNodes);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const useHMSRoomUpdate = (
|
|
88
|
+
hmsInstance: HMSSDK,
|
|
89
|
+
setMeetingState: React.Dispatch<React.SetStateAction<MeetingState>>
|
|
90
|
+
) => {
|
|
91
|
+
const dispatch = useDispatch();
|
|
92
|
+
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
const roomUpdateHandler = (data: {
|
|
95
|
+
room: HMSRoom;
|
|
96
|
+
type: HMSRoomUpdate;
|
|
97
|
+
}) => {
|
|
98
|
+
const { room, type } = data;
|
|
99
|
+
|
|
100
|
+
dispatch(setHMSRoomState(room));
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Handle case when User is joining as HLSViewer,
|
|
104
|
+
* before ON_JOIN, if ON_ROOM comes then we can show Meeting screen to user, instead of Loader or Preview
|
|
105
|
+
*/
|
|
106
|
+
if (room.localPeer.role?.name?.includes('hls-') ?? false) {
|
|
107
|
+
dispatch(setHMSLocalPeerState(room.localPeer));
|
|
108
|
+
setMeetingState((prevMeetingScreen) => {
|
|
109
|
+
if (prevMeetingScreen !== MeetingState.IN_MEETING) {
|
|
110
|
+
return MeetingState.IN_MEETING;
|
|
111
|
+
}
|
|
112
|
+
return prevMeetingScreen;
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (type === HMSRoomUpdate.BROWSER_RECORDING_STATE_UPDATED) {
|
|
117
|
+
let streaming = room?.browserRecordingState?.running;
|
|
118
|
+
const startAtDate = room?.browserRecordingState?.startedAt;
|
|
119
|
+
|
|
120
|
+
let startTime: null | string = null;
|
|
121
|
+
|
|
122
|
+
if (startAtDate) {
|
|
123
|
+
let hours = startAtDate.getHours().toString();
|
|
124
|
+
let minutes = startAtDate.getMinutes()?.toString();
|
|
125
|
+
startTime = hours + ':' + minutes;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
Toast.showWithGravity(
|
|
129
|
+
`Browser Recording ${
|
|
130
|
+
streaming
|
|
131
|
+
? `Started ${startTime ? 'At ' + startTime : ''}`
|
|
132
|
+
: 'Stopped'
|
|
133
|
+
}`,
|
|
134
|
+
Toast.LONG,
|
|
135
|
+
Toast.TOP
|
|
136
|
+
);
|
|
137
|
+
} else if (type === HMSRoomUpdate.HLS_STREAMING_STATE_UPDATED) {
|
|
138
|
+
let streaming = room?.hlsStreamingState?.running;
|
|
139
|
+
|
|
140
|
+
Toast.showWithGravity(
|
|
141
|
+
`HLS Streaming ${streaming ? 'Started' : 'Stopped'}`,
|
|
142
|
+
Toast.LONG,
|
|
143
|
+
Toast.TOP
|
|
144
|
+
);
|
|
145
|
+
} else if (type === HMSRoomUpdate.RTMP_STREAMING_STATE_UPDATED) {
|
|
146
|
+
let streaming = room?.rtmpHMSRtmpStreamingState?.running;
|
|
147
|
+
const startAtDate = room?.rtmpHMSRtmpStreamingState?.startedAt;
|
|
148
|
+
|
|
149
|
+
let startTime: null | string = null;
|
|
150
|
+
|
|
151
|
+
if (startAtDate) {
|
|
152
|
+
let hours = startAtDate.getHours().toString();
|
|
153
|
+
let minutes = startAtDate.getMinutes()?.toString();
|
|
154
|
+
startTime = hours + ':' + minutes;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
Toast.showWithGravity(
|
|
158
|
+
`RTMP Streaming ${
|
|
159
|
+
streaming
|
|
160
|
+
? `Started ${startTime ? 'At ' + startTime : ''}`
|
|
161
|
+
: 'Stopped'
|
|
162
|
+
}`,
|
|
163
|
+
Toast.LONG,
|
|
164
|
+
Toast.TOP
|
|
165
|
+
);
|
|
166
|
+
} else if (type === HMSRoomUpdate.SERVER_RECORDING_STATE_UPDATED) {
|
|
167
|
+
let streaming = room?.serverRecordingState?.running;
|
|
168
|
+
const startAtDate = room?.serverRecordingState?.startedAt;
|
|
169
|
+
|
|
170
|
+
let startTime: null | string = null;
|
|
171
|
+
|
|
172
|
+
if (startAtDate) {
|
|
173
|
+
let hours = startAtDate.getHours().toString();
|
|
174
|
+
let minutes = startAtDate.getMinutes()?.toString();
|
|
175
|
+
startTime = hours + ':' + minutes;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
Toast.showWithGravity(
|
|
179
|
+
`Server Recording ${
|
|
180
|
+
streaming
|
|
181
|
+
? `Started ${startTime ? 'At ' + startTime : ''}`
|
|
182
|
+
: 'Stopped'
|
|
183
|
+
}`,
|
|
184
|
+
Toast.LONG,
|
|
185
|
+
Toast.TOP
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
hmsInstance.addEventListener(
|
|
191
|
+
HMSUpdateListenerActions.ON_ROOM_UPDATE,
|
|
192
|
+
roomUpdateHandler
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
return () => {
|
|
196
|
+
hmsInstance.removeEventListener(HMSUpdateListenerActions.ON_ROOM_UPDATE);
|
|
197
|
+
};
|
|
198
|
+
}, [hmsInstance]);
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// type PeerUpdate = {
|
|
202
|
+
// peer: HMSPeer;
|
|
203
|
+
// type: HMSPeerUpdate;
|
|
204
|
+
// };
|
|
205
|
+
|
|
206
|
+
// const useHMSPeersUpdate = (
|
|
207
|
+
// hmsInstance: HMSSDK,
|
|
208
|
+
// updateLocalPeer: () => void,
|
|
209
|
+
// setPeerTrackNodes: React.Dispatch<React.SetStateAction<PeerTrackNode[]>>
|
|
210
|
+
// ) => {
|
|
211
|
+
// useHMSPeerUpdates(
|
|
212
|
+
// ({ peer, type }: PeerUpdate) => {
|
|
213
|
+
// if (type === HMSPeerUpdate.PEER_JOINED) {
|
|
214
|
+
// return;
|
|
215
|
+
// }
|
|
216
|
+
// if (type === HMSPeerUpdate.PEER_LEFT) {
|
|
217
|
+
// setPeerTrackNodes((prevPeerTrackNodes) =>
|
|
218
|
+
// removePeerTrackNodes(prevPeerTrackNodes, peer)
|
|
219
|
+
// );
|
|
220
|
+
// return;
|
|
221
|
+
// }
|
|
222
|
+
// if (peer.isLocal) {
|
|
223
|
+
// setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
224
|
+
// if (peerTrackNodeExistForPeer(prevPeerTrackNodes, peer)) {
|
|
225
|
+
// return replacePeerTrackNodes(prevPeerTrackNodes, peer);
|
|
226
|
+
// }
|
|
227
|
+
// return prevPeerTrackNodes;
|
|
228
|
+
// });
|
|
229
|
+
|
|
230
|
+
// // - TODO: update local localPeer state
|
|
231
|
+
// // - Pass this updated data to Meeting component -> DisplayView component
|
|
232
|
+
// updateLocalPeer();
|
|
233
|
+
// return;
|
|
234
|
+
// }
|
|
235
|
+
// if (type === HMSPeerUpdate.ROLE_CHANGED) {
|
|
236
|
+
// if (
|
|
237
|
+
// peer.role?.publishSettings?.allowed === undefined ||
|
|
238
|
+
// (peer.role?.publishSettings?.allowed &&
|
|
239
|
+
// peer.role?.publishSettings?.allowed.length < 1)
|
|
240
|
+
// ) {
|
|
241
|
+
// setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
242
|
+
// if (peerTrackNodeExistForPeer(prevPeerTrackNodes, peer)) {
|
|
243
|
+
// return removePeerTrackNodes(prevPeerTrackNodes, peer);
|
|
244
|
+
// }
|
|
245
|
+
// return prevPeerTrackNodes;
|
|
246
|
+
// });
|
|
247
|
+
// }
|
|
248
|
+
// return;
|
|
249
|
+
// }
|
|
250
|
+
// if (
|
|
251
|
+
// type === HMSPeerUpdate.METADATA_CHANGED ||
|
|
252
|
+
// type === HMSPeerUpdate.NAME_CHANGED ||
|
|
253
|
+
// type === HMSPeerUpdate.NETWORK_QUALITY_UPDATED
|
|
254
|
+
// ) {
|
|
255
|
+
// setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
256
|
+
// if (peerTrackNodeExistForPeer(prevPeerTrackNodes, peer)) {
|
|
257
|
+
// return replacePeerTrackNodes(prevPeerTrackNodes, peer);
|
|
258
|
+
// }
|
|
259
|
+
// return prevPeerTrackNodes;
|
|
260
|
+
// });
|
|
261
|
+
// return;
|
|
262
|
+
// }
|
|
263
|
+
// },
|
|
264
|
+
// [hmsInstance]
|
|
265
|
+
// );
|
|
266
|
+
// };
|
|
267
|
+
|
|
268
|
+
type TrackUpdate = {
|
|
269
|
+
peer: HMSPeer;
|
|
270
|
+
track: HMSTrack;
|
|
271
|
+
type: HMSTrackUpdate;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
const useHMSTrackUpdate = (
|
|
275
|
+
hmsInstance: HMSSDK,
|
|
276
|
+
updateLocalPeer: () => void,
|
|
277
|
+
setPeerTrackNodes: React.Dispatch<React.SetStateAction<PeerTrackNode[]>>
|
|
278
|
+
) => {
|
|
279
|
+
const dispatch = useDispatch();
|
|
280
|
+
|
|
281
|
+
useEffect(() => {
|
|
282
|
+
const trackUpdateHandler = ({ peer, track, type }: TrackUpdate) => {
|
|
283
|
+
if (type === HMSTrackUpdate.TRACK_ADDED) {
|
|
284
|
+
setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
285
|
+
if (
|
|
286
|
+
peerTrackNodeExistForPeerAndTrack(prevPeerTrackNodes, peer, track)
|
|
287
|
+
) {
|
|
288
|
+
if (track.type === HMSTrackType.VIDEO) {
|
|
289
|
+
return replacePeerTrackNodesWithTrack(
|
|
290
|
+
prevPeerTrackNodes,
|
|
291
|
+
peer,
|
|
292
|
+
track
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
return replacePeerTrackNodes(prevPeerTrackNodes, peer);
|
|
296
|
+
}
|
|
297
|
+
const newPeerTrackNode = createPeerTrackNode(peer, track);
|
|
298
|
+
return [...prevPeerTrackNodes, newPeerTrackNode];
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
// - TODO: update local localPeer state
|
|
302
|
+
// - Pass this updated data to Meeting component -> DisplayView component
|
|
303
|
+
if (peer.isLocal) {
|
|
304
|
+
updateLocalPeer();
|
|
305
|
+
}
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (type === HMSTrackUpdate.TRACK_REMOVED) {
|
|
309
|
+
if (
|
|
310
|
+
track.source !== HMSTrackSource.REGULAR ||
|
|
311
|
+
(peer.audioTrack?.trackId === undefined &&
|
|
312
|
+
peer.videoTrack?.trackId === undefined)
|
|
313
|
+
) {
|
|
314
|
+
setPeerTrackNodes((prevPeerTrackNodes) =>
|
|
315
|
+
removePeerTrackNodesWithTrack(prevPeerTrackNodes, peer, track)
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// - TODO: update local localPeer state
|
|
320
|
+
// - Pass this updated data to Meeting component -> DisplayView component
|
|
321
|
+
if (peer.isLocal) {
|
|
322
|
+
updateLocalPeer();
|
|
323
|
+
}
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
if (
|
|
327
|
+
type === HMSTrackUpdate.TRACK_MUTED ||
|
|
328
|
+
type === HMSTrackUpdate.TRACK_UNMUTED
|
|
329
|
+
) {
|
|
330
|
+
// - TODO: update local mute states
|
|
331
|
+
// - Pass this updated data to Meeting component -> DisplayView component
|
|
332
|
+
if (peer.isLocal) {
|
|
333
|
+
if (track.type === HMSTrackType.AUDIO) {
|
|
334
|
+
dispatch(setIsLocalAudioMutedState(track.isMute()));
|
|
335
|
+
} else if (track.type === HMSTrackType.VIDEO) {
|
|
336
|
+
dispatch(setIsLocalVideoMutedState(track.isMute()));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
341
|
+
if (
|
|
342
|
+
peerTrackNodeExistForPeerAndTrack(prevPeerTrackNodes, peer, track)
|
|
343
|
+
) {
|
|
344
|
+
if (track.type === HMSTrackType.VIDEO) {
|
|
345
|
+
return replacePeerTrackNodesWithTrack(
|
|
346
|
+
prevPeerTrackNodes,
|
|
347
|
+
peer,
|
|
348
|
+
track
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
return replacePeerTrackNodes(prevPeerTrackNodes, peer);
|
|
352
|
+
}
|
|
353
|
+
return prevPeerTrackNodes;
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// - TODO: update local localPeer state
|
|
357
|
+
// - Pass this updated data to Meeting component -> DisplayView component
|
|
358
|
+
if (peer.isLocal) {
|
|
359
|
+
updateLocalPeer();
|
|
360
|
+
}
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
if (
|
|
364
|
+
type === HMSTrackUpdate.TRACK_RESTORED ||
|
|
365
|
+
type === HMSTrackUpdate.TRACK_DEGRADED
|
|
366
|
+
) {
|
|
367
|
+
setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
368
|
+
if (
|
|
369
|
+
peerTrackNodeExistForPeerAndTrack(prevPeerTrackNodes, peer, track)
|
|
370
|
+
) {
|
|
371
|
+
return degradeOrRestorePeerTrackNodes(
|
|
372
|
+
prevPeerTrackNodes,
|
|
373
|
+
peer,
|
|
374
|
+
track,
|
|
375
|
+
type === HMSTrackUpdate.TRACK_DEGRADED
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
return prevPeerTrackNodes;
|
|
379
|
+
});
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
hmsInstance.addEventListener(
|
|
385
|
+
HMSUpdateListenerActions.ON_TRACK_UPDATE,
|
|
386
|
+
trackUpdateHandler
|
|
387
|
+
);
|
|
388
|
+
|
|
389
|
+
return () => {
|
|
390
|
+
hmsInstance.removeEventListener(HMSUpdateListenerActions.ON_TRACK_UPDATE);
|
|
391
|
+
};
|
|
392
|
+
}, [hmsInstance]);
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
const useUpdateHMSLocalPeer = (hmsInstance: HMSSDK) => {
|
|
396
|
+
const mountRef = useRef(false);
|
|
397
|
+
const dispatch = useDispatch();
|
|
398
|
+
|
|
399
|
+
const updateLocalPeer = useCallback(() => {
|
|
400
|
+
hmsInstance.getLocalPeer().then((latestLocalPeer) => {
|
|
401
|
+
if (mountRef.current) {
|
|
402
|
+
dispatch(setHMSLocalPeerState(latestLocalPeer));
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
}, [hmsInstance]);
|
|
406
|
+
|
|
407
|
+
useEffect(() => {
|
|
408
|
+
mountRef.current = true;
|
|
409
|
+
updateLocalPeer();
|
|
410
|
+
|
|
411
|
+
return () => {
|
|
412
|
+
mountRef.current = false;
|
|
413
|
+
};
|
|
414
|
+
}, [updateLocalPeer]);
|
|
415
|
+
|
|
416
|
+
return updateLocalPeer;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
export const useHMSInstance = () => {
|
|
420
|
+
const hmsInstance = useSelector((state: RootState) => state.user.hmsInstance);
|
|
421
|
+
|
|
422
|
+
if (!hmsInstance) {
|
|
423
|
+
throw new Error('HMS Instance not available');
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
return hmsInstance;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
export const useIsHLSViewer = () => {
|
|
430
|
+
return useSelector((state: RootState) =>
|
|
431
|
+
selectIsHLSViewer(state.hmsStates.localPeer)
|
|
432
|
+
);
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
type TrackStateChangeRequest = {
|
|
436
|
+
requestedBy?: string;
|
|
437
|
+
suggestedRole?: string;
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
export const useHMSChangeTrackStateRequest = (
|
|
441
|
+
callback?: (unmuteRequest: Omit<HMSChangeTrackStateRequest, 'mute'>) => void,
|
|
442
|
+
deps?: React.DependencyList
|
|
443
|
+
) => {
|
|
444
|
+
const hmsInstance = useHMSInstance();
|
|
445
|
+
const [trackStateChangeRequest, setTrackStateChangeRequest] =
|
|
446
|
+
useState<TrackStateChangeRequest | null>(null);
|
|
447
|
+
|
|
448
|
+
useEffect(() => {
|
|
449
|
+
const changeTrackStateRequestHandler = (
|
|
450
|
+
request: HMSChangeTrackStateRequest
|
|
451
|
+
) => {
|
|
452
|
+
if (!request?.mute) {
|
|
453
|
+
setTrackStateChangeRequest({
|
|
454
|
+
requestedBy: request?.requestedBy?.name,
|
|
455
|
+
suggestedRole: request?.trackType,
|
|
456
|
+
});
|
|
457
|
+
callback?.(request);
|
|
458
|
+
} else {
|
|
459
|
+
Toast.showWithGravity(
|
|
460
|
+
`Track Muted: ${request?.requestedBy?.name} Muted Your ${request?.trackType}`,
|
|
461
|
+
Toast.LONG,
|
|
462
|
+
Toast.TOP
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
hmsInstance.addEventListener(
|
|
467
|
+
HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST,
|
|
468
|
+
changeTrackStateRequestHandler
|
|
469
|
+
);
|
|
470
|
+
|
|
471
|
+
return () => {
|
|
472
|
+
hmsInstance.removeEventListener(
|
|
473
|
+
HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST
|
|
474
|
+
);
|
|
475
|
+
};
|
|
476
|
+
}, [...(deps || []), hmsInstance]);
|
|
477
|
+
|
|
478
|
+
return trackStateChangeRequest;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
type RoleChangeRequest = {
|
|
482
|
+
requestedBy?: string;
|
|
483
|
+
suggestedRole?: string;
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export const useHMSRoleChangeRequest = (
|
|
487
|
+
callback?: (request: HMSRoleChangeRequest) => void,
|
|
488
|
+
deps?: React.DependencyList
|
|
489
|
+
) => {
|
|
490
|
+
const hmsInstance = useHMSInstance();
|
|
491
|
+
const [roleChangeRequest, setRoleChangeRequest] =
|
|
492
|
+
useState<RoleChangeRequest | null>(null);
|
|
493
|
+
|
|
494
|
+
useEffect(() => {
|
|
495
|
+
const changeRoleRequestHandler = (request: HMSRoleChangeRequest) => {
|
|
496
|
+
setRoleChangeRequest({
|
|
497
|
+
requestedBy: request?.requestedBy?.name,
|
|
498
|
+
suggestedRole: request?.suggestedRole?.name,
|
|
499
|
+
});
|
|
500
|
+
callback?.(request);
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
hmsInstance.addEventListener(
|
|
504
|
+
HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST,
|
|
505
|
+
changeRoleRequestHandler
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
return () => {
|
|
509
|
+
hmsInstance.removeEventListener(
|
|
510
|
+
HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST
|
|
511
|
+
);
|
|
512
|
+
};
|
|
513
|
+
}, [...(deps || []), hmsInstance]);
|
|
514
|
+
|
|
515
|
+
return roleChangeRequest;
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
type SessionStoreListeners = Array<{ remove: () => void }>;
|
|
519
|
+
|
|
520
|
+
export const useHMSSessionStoreListeners = () => {
|
|
521
|
+
const dispatch = useDispatch();
|
|
522
|
+
const hmsSessionStore = useSelector(
|
|
523
|
+
(state: RootState) => state.user.hmsSessionStore
|
|
524
|
+
);
|
|
525
|
+
const sessionStoreListenersRef = useRef<SessionStoreListeners>([]);
|
|
526
|
+
|
|
527
|
+
useEffect(() => {
|
|
528
|
+
// Check if instance of HMSSessionStore is available
|
|
529
|
+
if (hmsSessionStore) {
|
|
530
|
+
let toastTimeoutId: NodeJS.Timeout | null = null;
|
|
531
|
+
|
|
532
|
+
const addSessionStoreListeners = () => {
|
|
533
|
+
// Handle 'spotlight' key values
|
|
534
|
+
const handleSpotlightIdChange = (id: HMSSessionStoreValue) => {
|
|
535
|
+
// set value to the state to rerender the component to reflect changes
|
|
536
|
+
dispatch(saveUserData({ spotlightTrackId: id }));
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
// Handle 'pinnedMessage' key values
|
|
540
|
+
const handlePinnedMessageChange = (data: HMSSessionStoreValue) => {
|
|
541
|
+
dispatch(addPinnedMessage(data));
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
// Getting value for 'spotlight' key by using `get` method on HMSSessionStore instance
|
|
545
|
+
hmsSessionStore
|
|
546
|
+
.get('spotlight')
|
|
547
|
+
.then((data) => {
|
|
548
|
+
console.log(
|
|
549
|
+
'Session Store get `spotlight` key value success: ',
|
|
550
|
+
data
|
|
551
|
+
);
|
|
552
|
+
handleSpotlightIdChange(data);
|
|
553
|
+
})
|
|
554
|
+
.catch((error) =>
|
|
555
|
+
console.log(
|
|
556
|
+
'Session Store get `spotlight` key value error: ',
|
|
557
|
+
error
|
|
558
|
+
)
|
|
559
|
+
);
|
|
560
|
+
|
|
561
|
+
// Getting value for 'pinnedMessage' key by using `get` method on HMSSessionStore instance
|
|
562
|
+
hmsSessionStore
|
|
563
|
+
.get('pinnedMessage')
|
|
564
|
+
.then((data) => {
|
|
565
|
+
console.log(
|
|
566
|
+
'Session Store get `pinnedMessage` key value success: ',
|
|
567
|
+
data
|
|
568
|
+
);
|
|
569
|
+
handlePinnedMessageChange(data);
|
|
570
|
+
})
|
|
571
|
+
.catch((error) =>
|
|
572
|
+
console.log(
|
|
573
|
+
'Session Store get `pinnedMessage` key value error: ',
|
|
574
|
+
error
|
|
575
|
+
)
|
|
576
|
+
);
|
|
577
|
+
|
|
578
|
+
let lastSpotlightValue: HMSSessionStoreValue = null;
|
|
579
|
+
let lastPinnedMessageValue: HMSSessionStoreValue = null;
|
|
580
|
+
|
|
581
|
+
// Add subscription for `spotlight` & `pinnedMessage` keys updates on Session Store
|
|
582
|
+
const subscription = hmsSessionStore.addKeyChangeListener<
|
|
583
|
+
['spotlight', 'pinnedMessage']
|
|
584
|
+
>(['spotlight', 'pinnedMessage'], (error, data) => {
|
|
585
|
+
// If error occurs, handle error and return early
|
|
586
|
+
if (error !== null) {
|
|
587
|
+
console.log(
|
|
588
|
+
'`spotlight` & `pinnedMessage` key listener Error -> ',
|
|
589
|
+
error
|
|
590
|
+
);
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// If no error, handle data
|
|
595
|
+
if (data !== null) {
|
|
596
|
+
switch (data.key) {
|
|
597
|
+
case 'spotlight': {
|
|
598
|
+
handleSpotlightIdChange(data.value);
|
|
599
|
+
|
|
600
|
+
// Showing Toast message if value has actually changed
|
|
601
|
+
if (
|
|
602
|
+
data.value !== lastSpotlightValue &&
|
|
603
|
+
(data.value || lastSpotlightValue)
|
|
604
|
+
) {
|
|
605
|
+
Toast.showWithGravity(
|
|
606
|
+
`SessionStore: \`spotlight\` key's value changed to ${data.value}`,
|
|
607
|
+
Toast.LONG,
|
|
608
|
+
Toast.TOP
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
lastSpotlightValue = data.value;
|
|
613
|
+
break;
|
|
614
|
+
}
|
|
615
|
+
case 'pinnedMessage': {
|
|
616
|
+
handlePinnedMessageChange(data.value);
|
|
617
|
+
|
|
618
|
+
// Showing Toast message if value has actually changed
|
|
619
|
+
if (
|
|
620
|
+
data.value !== lastPinnedMessageValue &&
|
|
621
|
+
(data.value || lastPinnedMessageValue)
|
|
622
|
+
) {
|
|
623
|
+
if (toastTimeoutId !== null) {
|
|
624
|
+
clearTimeout(toastTimeoutId);
|
|
625
|
+
}
|
|
626
|
+
toastTimeoutId = setTimeout(() => {
|
|
627
|
+
Toast.showWithGravity(
|
|
628
|
+
`SessionStore: \`pinnedMessage\` key's value changed to ${data.value}`,
|
|
629
|
+
Toast.LONG,
|
|
630
|
+
Toast.TOP
|
|
631
|
+
);
|
|
632
|
+
}, 1500);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
lastPinnedMessageValue = data.value;
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
// Save reference of `subscription` in a ref
|
|
643
|
+
sessionStoreListenersRef.current.push(subscription);
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
addSessionStoreListeners();
|
|
647
|
+
|
|
648
|
+
return () => {
|
|
649
|
+
// remove Session Store key update listener on cleanup
|
|
650
|
+
sessionStoreListenersRef.current.forEach((listener) =>
|
|
651
|
+
listener.remove()
|
|
652
|
+
);
|
|
653
|
+
|
|
654
|
+
if (toastTimeoutId !== null) clearTimeout(toastTimeoutId);
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
}, [hmsSessionStore]);
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
export const useHMSSessionStore = () => {
|
|
661
|
+
const hmsInstance = useHMSInstance();
|
|
662
|
+
const dispatch = useDispatch();
|
|
663
|
+
|
|
664
|
+
useEffect(() => {
|
|
665
|
+
const onSessionStoreAvailableListener = ({
|
|
666
|
+
sessionStore,
|
|
667
|
+
}: {
|
|
668
|
+
sessionStore: HMSSessionStore;
|
|
669
|
+
}) => {
|
|
670
|
+
// Saving `sessionStore` reference in `redux`
|
|
671
|
+
dispatch(saveUserData({ hmsSessionStore: sessionStore }));
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
hmsInstance.addEventListener(
|
|
675
|
+
HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE,
|
|
676
|
+
onSessionStoreAvailableListener
|
|
677
|
+
);
|
|
678
|
+
|
|
679
|
+
return () => {
|
|
680
|
+
hmsInstance.removeEventListener(
|
|
681
|
+
HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE
|
|
682
|
+
);
|
|
683
|
+
};
|
|
684
|
+
}, [hmsInstance]);
|
|
685
|
+
};
|
|
686
|
+
|
|
687
|
+
export const useHMSMessages = () => {
|
|
688
|
+
const hmsInstance = useHMSInstance();
|
|
689
|
+
const dispatch = useDispatch();
|
|
690
|
+
|
|
691
|
+
useEffect(() => {
|
|
692
|
+
const onMessageListener = (message: HMSMessage) => {
|
|
693
|
+
dispatch(addMessage(message));
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
hmsInstance.addEventListener(
|
|
697
|
+
HMSUpdateListenerActions.ON_MESSAGE,
|
|
698
|
+
onMessageListener
|
|
699
|
+
);
|
|
700
|
+
|
|
701
|
+
return () => {
|
|
702
|
+
// TODO: Remove this listener when user leaves, removed or room is ended
|
|
703
|
+
hmsInstance.removeEventListener(HMSUpdateListenerActions.ON_MESSAGE);
|
|
704
|
+
};
|
|
705
|
+
}, [hmsInstance]);
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
export const useHMSPIPRoomLeave = () => {
|
|
709
|
+
const hmsInstance = useHMSInstance();
|
|
710
|
+
const dispatch = useDispatch();
|
|
711
|
+
// TODO: What if this is undefined?
|
|
712
|
+
const navigation = useNavigation();
|
|
713
|
+
|
|
714
|
+
useEffect(() => {
|
|
715
|
+
const pipRoomLeaveHandler = () => {
|
|
716
|
+
hmsInstance
|
|
717
|
+
.destroy()
|
|
718
|
+
.then((s) => {
|
|
719
|
+
console.log('Destroy Success: ', s);
|
|
720
|
+
// TODOS:
|
|
721
|
+
// - If show `Meeting_Ended` is true, show Meeting screen by setting state to MEETING_ENDED
|
|
722
|
+
// - Reset Redux States
|
|
723
|
+
// - HMSInstance will not be available now
|
|
724
|
+
// - When your presses "Re Join" Action button, restart process from root component
|
|
725
|
+
// - When your presses "Done" Action button
|
|
726
|
+
// - If we have callback fn, call it
|
|
727
|
+
// - Otherwise try our best to navigate away from current screen
|
|
728
|
+
//
|
|
729
|
+
// - No screen to show
|
|
730
|
+
// - No need to reset redux state?
|
|
731
|
+
// - HMSInstance will be available till this point
|
|
732
|
+
// - If we have callback fn, call it
|
|
733
|
+
// - Otherwise try our best to navigate away from current screen
|
|
734
|
+
// - When we are navigated away from screen, HMSInstance will be not available
|
|
735
|
+
|
|
736
|
+
// dispatch(clearMessageData());
|
|
737
|
+
// dispatch(clearPeerData());
|
|
738
|
+
// dispatch(clearHmsReference());
|
|
739
|
+
|
|
740
|
+
// if (navigation.canGoBack()) {
|
|
741
|
+
// navigation.goBack();
|
|
742
|
+
// } else {
|
|
743
|
+
// TODO: remove this later
|
|
744
|
+
navigation.navigate('QRCodeScreen' as never);
|
|
745
|
+
dispatch(clearStore());
|
|
746
|
+
// }
|
|
747
|
+
})
|
|
748
|
+
.catch((e) => {
|
|
749
|
+
console.log(`Destroy HMS instance Error: ${e}`);
|
|
750
|
+
Toast.showWithGravity(
|
|
751
|
+
`Destroy HMS instance Error: ${e}`,
|
|
752
|
+
Toast.LONG,
|
|
753
|
+
Toast.TOP
|
|
754
|
+
);
|
|
755
|
+
});
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
hmsInstance.addEventListener(
|
|
759
|
+
HMSPIPListenerActions.ON_PIP_ROOM_LEAVE,
|
|
760
|
+
pipRoomLeaveHandler
|
|
761
|
+
);
|
|
762
|
+
|
|
763
|
+
return () => {
|
|
764
|
+
hmsInstance.removeEventListener(HMSPIPListenerActions.ON_PIP_ROOM_LEAVE);
|
|
765
|
+
};
|
|
766
|
+
}, [hmsInstance]);
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
export const useHMSRemovedFromRoomUpdate = () => {
|
|
770
|
+
const hmsInstance = useHMSInstance();
|
|
771
|
+
const dispatch = useDispatch();
|
|
772
|
+
// TODO: What if this is undefined?
|
|
773
|
+
const navigation = useNavigation();
|
|
774
|
+
|
|
775
|
+
useEffect(() => {
|
|
776
|
+
const removedFromRoomHandler = () => {
|
|
777
|
+
hmsInstance
|
|
778
|
+
.destroy()
|
|
779
|
+
.then((s) => {
|
|
780
|
+
console.log('Destroy Success: ', s);
|
|
781
|
+
// TODOS:
|
|
782
|
+
// - If show `Meeting_Ended` is true, show Meeting screen by setting state to MEETING_ENDED
|
|
783
|
+
// - Reset Redux States
|
|
784
|
+
// - HMSInstance will not be available now
|
|
785
|
+
// - When your presses "Re Join" Action button, restart process from root component
|
|
786
|
+
// - When your presses "Done" Action button
|
|
787
|
+
// - If we have callback fn, call it
|
|
788
|
+
// - Otherwise try our best to navigate away from current screen
|
|
789
|
+
//
|
|
790
|
+
// - No screen to show
|
|
791
|
+
// - No need to reset redux state?
|
|
792
|
+
// - HMSInstance will be available till this point
|
|
793
|
+
// - If we have callback fn, call it
|
|
794
|
+
// - Otherwise try our best to navigate away from current screen
|
|
795
|
+
// - When we are navigated away from screen, HMSInstance will be not available
|
|
796
|
+
|
|
797
|
+
// dispatch(clearMessageData());
|
|
798
|
+
// dispatch(clearPeerData());
|
|
799
|
+
// dispatch(clearHmsReference());
|
|
800
|
+
|
|
801
|
+
// if (navigation.canGoBack()) {
|
|
802
|
+
// navigation.goBack();
|
|
803
|
+
// } else {
|
|
804
|
+
// TODO: remove this later
|
|
805
|
+
navigation.navigate('QRCodeScreen' as never);
|
|
806
|
+
dispatch(clearStore());
|
|
807
|
+
// }
|
|
808
|
+
})
|
|
809
|
+
.catch((e) => {
|
|
810
|
+
console.log(`Destroy HMS instance Error: ${e}`);
|
|
811
|
+
Toast.showWithGravity(
|
|
812
|
+
`Destroy HMS instance Error: ${e}`,
|
|
813
|
+
Toast.LONG,
|
|
814
|
+
Toast.TOP
|
|
815
|
+
);
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
hmsInstance.addEventListener(
|
|
820
|
+
HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM,
|
|
821
|
+
removedFromRoomHandler
|
|
822
|
+
);
|
|
823
|
+
|
|
824
|
+
return () => {
|
|
825
|
+
hmsInstance.removeEventListener(
|
|
826
|
+
HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM
|
|
827
|
+
);
|
|
828
|
+
};
|
|
829
|
+
}, [hmsInstance]);
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
export const usePIPListener = () => {
|
|
833
|
+
const hmsInstance = useHMSInstance();
|
|
834
|
+
const dispatch = useDispatch();
|
|
835
|
+
const isPipModeActive = useSelector(
|
|
836
|
+
(state: RootState) => state.app.pipModeStatus === PipModes.ACTIVE
|
|
837
|
+
);
|
|
838
|
+
|
|
839
|
+
useEffect(() => {
|
|
840
|
+
if (isPipModeActive) {
|
|
841
|
+
const appStateListener = () => {
|
|
842
|
+
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
843
|
+
dispatch(changePipModeStatus(PipModes.INACTIVE));
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
AppState.addEventListener('focus', appStateListener);
|
|
847
|
+
|
|
848
|
+
return () => {
|
|
849
|
+
AppState.removeEventListener('focus', appStateListener);
|
|
850
|
+
dispatch(changePipModeStatus(PipModes.INACTIVE));
|
|
851
|
+
};
|
|
852
|
+
}
|
|
853
|
+
}, [isPipModeActive]);
|
|
854
|
+
|
|
855
|
+
// Check if PIP is supported or not
|
|
856
|
+
useEffect(() => {
|
|
857
|
+
// Only check for PIP support if PIP is not active
|
|
858
|
+
if (hmsInstance && !isPipModeActive) {
|
|
859
|
+
const check = async () => {
|
|
860
|
+
try {
|
|
861
|
+
const isSupported = await hmsInstance.isPipModeSupported();
|
|
862
|
+
|
|
863
|
+
if (!isSupported) {
|
|
864
|
+
dispatch(changePipModeStatus(PipModes.NOT_AVAILABLE));
|
|
865
|
+
}
|
|
866
|
+
} catch (error) {
|
|
867
|
+
dispatch(changePipModeStatus(PipModes.NOT_AVAILABLE));
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
|
|
871
|
+
check();
|
|
872
|
+
}
|
|
873
|
+
}, [isPipModeActive, hmsInstance]);
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
let modalTaskRef: { current: any } = { current: null };
|
|
877
|
+
|
|
878
|
+
export const clearPendingModalTasks = () => {
|
|
879
|
+
if (Platform.OS === 'android') {
|
|
880
|
+
modalTaskRef.current?.cancel();
|
|
881
|
+
} else {
|
|
882
|
+
clearTimeout(modalTaskRef.current);
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
const addModalTask = (task: () => void) => {
|
|
887
|
+
clearPendingModalTasks();
|
|
888
|
+
|
|
889
|
+
if (Platform.OS === 'android') {
|
|
890
|
+
modalTaskRef.current = InteractionManager.runAfterInteractions(task);
|
|
891
|
+
} else {
|
|
892
|
+
modalTaskRef.current = setTimeout(task, 500);
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
export const useModalType = () => {
|
|
897
|
+
const dispatch = useDispatch();
|
|
898
|
+
const modalType = useSelector((state: RootState) => state.app.modalType);
|
|
899
|
+
|
|
900
|
+
const setModalVisible = (modalType: ModalTypes) => {
|
|
901
|
+
dispatch(setModalType(modalType));
|
|
902
|
+
};
|
|
903
|
+
|
|
904
|
+
const handleModalVisible = useCallback(
|
|
905
|
+
(modalType: ModalTypes, delay = false) => {
|
|
906
|
+
if (delay) {
|
|
907
|
+
setModalVisible(ModalTypes.DEFAULT);
|
|
908
|
+
|
|
909
|
+
const task = () => {
|
|
910
|
+
setModalVisible(modalType);
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
addModalTask(task);
|
|
914
|
+
} else {
|
|
915
|
+
setModalVisible(modalType);
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
[]
|
|
919
|
+
);
|
|
920
|
+
|
|
921
|
+
return {
|
|
922
|
+
modalVisibleType: modalType,
|
|
923
|
+
handleModalVisibleType: handleModalVisible,
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
|
|
927
|
+
export const useFetchHMSRoles = () => {
|
|
928
|
+
const dispatch = useDispatch();
|
|
929
|
+
const hmsInstance = useHMSInstance();
|
|
930
|
+
|
|
931
|
+
useEffect(() => {
|
|
932
|
+
let ignore = false;
|
|
933
|
+
hmsInstance.getRoles().then((roles) => {
|
|
934
|
+
if (!ignore) {
|
|
935
|
+
dispatch(setHMSRoleState(roles));
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
return () => {
|
|
939
|
+
ignore = true;
|
|
940
|
+
};
|
|
941
|
+
}, [hmsInstance]);
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
export const useShowLandscapeLayout = () => {
|
|
945
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
946
|
+
const localPeerRoleName = useSelector(
|
|
947
|
+
(state: RootState) => state.hmsStates.localPeer?.role?.name
|
|
948
|
+
);
|
|
949
|
+
|
|
950
|
+
return (
|
|
951
|
+
isLandscapeOrientation &&
|
|
952
|
+
!!localPeerRoleName &&
|
|
953
|
+
localPeerRoleName.includes('hls-')
|
|
954
|
+
);
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
let hmsConfig: HMSConfig | null = null;
|
|
958
|
+
|
|
959
|
+
export const clearConfig = () => {
|
|
960
|
+
hmsConfig = null;
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
export const useHMSConfig = () => {
|
|
964
|
+
const hmsInstance = useHMSInstance();
|
|
965
|
+
const store = useStore();
|
|
966
|
+
|
|
967
|
+
const getConfig = useCallback(async () => {
|
|
968
|
+
if (hmsConfig) return hmsConfig;
|
|
969
|
+
|
|
970
|
+
const storeState = store.getState() as RootState;
|
|
971
|
+
|
|
972
|
+
const token = await hmsInstance.getAuthTokenByRoomCode(
|
|
973
|
+
storeState.user.roomCode,
|
|
974
|
+
storeState.user.userId,
|
|
975
|
+
storeState.user.endPoints?.token
|
|
976
|
+
);
|
|
977
|
+
|
|
978
|
+
hmsConfig = new HMSConfig({
|
|
979
|
+
authToken: token,
|
|
980
|
+
username: storeState.user.userName,
|
|
981
|
+
captureNetworkQualityInPreview: true,
|
|
982
|
+
endpoint: storeState.user.endPoints?.init,
|
|
983
|
+
// metadata: JSON.stringify({isHandRaised: true}), // To join with hand raised
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
return hmsConfig;
|
|
987
|
+
}, [hmsInstance]);
|
|
988
|
+
|
|
989
|
+
return { clearConfig, getConfig };
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
export const useSafeDimensions = () => {
|
|
993
|
+
const { height, width } = useSafeAreaFrame();
|
|
994
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
995
|
+
|
|
996
|
+
return {
|
|
997
|
+
safeWidth: width - safeAreaInsets.left - safeAreaInsets.right,
|
|
998
|
+
safeHeight: height - safeAreaInsets.top - safeAreaInsets.bottom,
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
export const useShowChat = (): [
|
|
1003
|
+
'none' | 'inset' | 'modal',
|
|
1004
|
+
(show: boolean) => void,
|
|
1005
|
+
] => {
|
|
1006
|
+
const dispatch = useDispatch();
|
|
1007
|
+
const isHLSViewer = useIsHLSViewer();
|
|
1008
|
+
const showChatView = useSelector(
|
|
1009
|
+
(state: RootState) => state.chatWindow.showChatView
|
|
1010
|
+
);
|
|
1011
|
+
const hlsAspectRatio = useSelector(
|
|
1012
|
+
(state: RootState) => state.app.hlsAspectRatio
|
|
1013
|
+
);
|
|
1014
|
+
const chatVisible: 'none' | 'inset' | 'modal' = useMemo(() => {
|
|
1015
|
+
if (!showChatView) return 'none';
|
|
1016
|
+
|
|
1017
|
+
if (isHLSViewer && ['16:9', '4:3'].includes(hlsAspectRatio.id))
|
|
1018
|
+
return 'inset';
|
|
1019
|
+
|
|
1020
|
+
// TODO: handle case when type modal is selected, but chat modal is not shown because aspect ration modal was just closed
|
|
1021
|
+
return 'modal';
|
|
1022
|
+
}, [showChatView, hlsAspectRatio.id, isHLSViewer]);
|
|
1023
|
+
|
|
1024
|
+
const isChatVisibleInsetType = chatVisible === 'inset';
|
|
1025
|
+
|
|
1026
|
+
const showChat = useCallback(
|
|
1027
|
+
(show: boolean) => {
|
|
1028
|
+
if (isChatVisibleInsetType) {
|
|
1029
|
+
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
1030
|
+
}
|
|
1031
|
+
dispatch({ type: 'SET_SHOW_CHAT_VIEW', showChatView: show });
|
|
1032
|
+
},
|
|
1033
|
+
[isChatVisibleInsetType]
|
|
1034
|
+
);
|
|
1035
|
+
|
|
1036
|
+
return [chatVisible, showChat];
|
|
1037
|
+
};
|
|
1038
|
+
|
|
1039
|
+
export const usePortraitChatViewVisible = () => {
|
|
1040
|
+
const [chatVisible] = useShowChat();
|
|
1041
|
+
const pipModeNotActive = useSelector(
|
|
1042
|
+
(state: RootState) => state.app.pipModeStatus !== PipModes.ACTIVE
|
|
1043
|
+
);
|
|
1044
|
+
const isPortraitOrientation = useIsPortraitOrientation();
|
|
1045
|
+
|
|
1046
|
+
return pipModeNotActive && isPortraitOrientation && chatVisible === 'inset';
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
export const useLandscapeChatViewVisible = () => {
|
|
1050
|
+
const [chatVisible] = useShowChat();
|
|
1051
|
+
const pipModeNotActive = useSelector(
|
|
1052
|
+
(state: RootState) => state.app.pipModeStatus !== PipModes.ACTIVE
|
|
1053
|
+
);
|
|
1054
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
1055
|
+
|
|
1056
|
+
return pipModeNotActive && isLandscapeOrientation && chatVisible === 'inset';
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
export const useFilteredParticipants = () => {
|
|
1060
|
+
const hmsInstance = useHMSInstance();
|
|
1061
|
+
const localPeer = useSelector(
|
|
1062
|
+
(state: RootState) => state.hmsStates.localPeer
|
|
1063
|
+
);
|
|
1064
|
+
const [filter, setFilter] = useState('everyone');
|
|
1065
|
+
const [participantsSearchInput, setParticipantsSearchInput] = useState('');
|
|
1066
|
+
const [hmsPeers, setHmsPeers] = useState<(HMSLocalPeer | HMSRemotePeer)[]>(
|
|
1067
|
+
localPeer ? [localPeer] : []
|
|
1068
|
+
);
|
|
1069
|
+
|
|
1070
|
+
const filteredPeerTrackNodes = useMemo(() => {
|
|
1071
|
+
const newFilteredPeerTrackNodes = hmsPeers?.filter((peer) => {
|
|
1072
|
+
if (
|
|
1073
|
+
participantsSearchInput.length < 1 ||
|
|
1074
|
+
peer.name.includes(participantsSearchInput) ||
|
|
1075
|
+
peer.role?.name?.includes(participantsSearchInput)
|
|
1076
|
+
) {
|
|
1077
|
+
return true;
|
|
1078
|
+
}
|
|
1079
|
+
return false;
|
|
1080
|
+
});
|
|
1081
|
+
|
|
1082
|
+
if (filter === 'everyone') {
|
|
1083
|
+
return newFilteredPeerTrackNodes;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
if (filter === 'raised hand') {
|
|
1087
|
+
return newFilteredPeerTrackNodes.filter((peer) => {
|
|
1088
|
+
const parsedMetaData = parseMetadata(peer.metadata);
|
|
1089
|
+
return parsedMetaData.isHandRaised === true;
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
return newFilteredPeerTrackNodes.filter(
|
|
1094
|
+
(peer) => peer.role?.name === filter
|
|
1095
|
+
);
|
|
1096
|
+
}, [participantsSearchInput, filter, hmsPeers]);
|
|
1097
|
+
|
|
1098
|
+
useEffect(() => {
|
|
1099
|
+
let ignore = false;
|
|
1100
|
+
|
|
1101
|
+
hmsInstance.getRemotePeers().then((peers) => {
|
|
1102
|
+
if (localPeer) {
|
|
1103
|
+
InteractionManager.runAfterInteractions(() => {
|
|
1104
|
+
if (!ignore) {
|
|
1105
|
+
setHmsPeers([localPeer, ...peers]);
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
return () => {
|
|
1112
|
+
ignore = true;
|
|
1113
|
+
};
|
|
1114
|
+
}, [localPeer, hmsInstance]);
|
|
1115
|
+
|
|
1116
|
+
return {
|
|
1117
|
+
allParticipants: hmsPeers,
|
|
1118
|
+
filteredParticipants: filteredPeerTrackNodes,
|
|
1119
|
+
selectedFilter: filter,
|
|
1120
|
+
changeFilter: setFilter,
|
|
1121
|
+
searchText: participantsSearchInput,
|
|
1122
|
+
setSearchText: setParticipantsSearchInput,
|
|
1123
|
+
};
|
|
1124
|
+
};
|