@100mslive/react-native-room-kit 0.0.3 → 0.0.4
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/lib/commonjs/HMSInstanceSetup.js +1 -14
- package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
- package/lib/commonjs/HMSPrebuilt.js +13 -4
- package/lib/commonjs/HMSPrebuilt.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +38 -14
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Check/assets/check.png +0 -0
- package/lib/commonjs/Icons/Check/assets/check@2x.png +0 -0
- package/lib/commonjs/Icons/Check/assets/check@3x.png +0 -0
- package/lib/commonjs/Icons/Check/index.js +30 -0
- package/lib/commonjs/Icons/Check/index.js.map +1 -0
- package/lib/commonjs/Icons/Radio/assets/radio.png +0 -0
- package/lib/commonjs/Icons/Radio/assets/radio@2x.png +0 -0
- package/lib/commonjs/Icons/Radio/assets/radio@3x.png +0 -0
- package/lib/commonjs/Icons/Radio/index.js +30 -0
- package/lib/commonjs/Icons/Radio/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +22 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/BackButton.js +2 -2
- package/lib/commonjs/components/BackButton.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +0 -6
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSStreamLoading.js +56 -0
- package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -0
- package/lib/commonjs/components/HMSLocalVideoView.js +41 -0
- package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -0
- package/lib/commonjs/components/{HMSSpeakerSettings.js → HMSManageAudioOutput.js} +41 -13
- package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -0
- package/lib/commonjs/components/HMSManageLeave.js +7 -60
- package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
- package/lib/commonjs/components/HMSMeetingEnded.js +36 -0
- package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewEditName.js +6 -3
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +64 -0
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewJoinButton.js +21 -9
- package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js +43 -0
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewPeersList.js +2 -25
- package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewSubtitle.js +25 -2
- package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTile.js +2 -18
- package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +2 -3
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSShowNetworkQuality.js +0 -2
- package/lib/commonjs/components/HMSShowNetworkQuality.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +7 -0
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MenuModal/Menu.js +1 -2
- package/lib/commonjs/components/MenuModal/Menu.js.map +1 -1
- package/lib/commonjs/components/Modals.js +39 -299
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsList.js +1 -20
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js +2 -13
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/Preview.js +79 -71
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +2 -101
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/index.js +0 -11
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/hooks/useHmsInstance.js +0 -1
- package/lib/commonjs/hooks/useHmsInstance.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +8 -1
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +129 -28
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +5 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +15 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +14 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/utils/theme.js +1 -0
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/commonjs/utils/types.js +0 -1
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +2 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSInstanceSetup.js +1 -14
- package/lib/module/HMSInstanceSetup.js.map +1 -1
- package/lib/module/HMSPrebuilt.js +13 -3
- package/lib/module/HMSPrebuilt.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +43 -19
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Check/assets/check.png +0 -0
- package/lib/module/Icons/Check/assets/check@2x.png +0 -0
- package/lib/module/Icons/Check/assets/check@3x.png +0 -0
- package/lib/module/Icons/Check/index.js +22 -0
- package/lib/module/Icons/Check/index.js.map +1 -0
- package/lib/module/Icons/Radio/assets/radio.png +0 -0
- package/lib/module/Icons/Radio/assets/radio@2x.png +0 -0
- package/lib/module/Icons/Radio/assets/radio@3x.png +0 -0
- package/lib/module/Icons/Radio/index.js +22 -0
- package/lib/module/Icons/Radio/index.js.map +1 -0
- package/lib/module/Icons/index.js +2 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/BackButton.js +3 -3
- package/lib/module/components/BackButton.js.map +1 -1
- package/lib/module/components/DisplayView.js +1 -7
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/HMSHLSStreamLoading.js +47 -0
- package/lib/module/components/HMSHLSStreamLoading.js.map +1 -0
- package/lib/module/components/HMSLocalVideoView.js +32 -0
- package/lib/module/components/HMSLocalVideoView.js.map +1 -0
- package/lib/module/components/{HMSSpeakerSettings.js → HMSManageAudioOutput.js} +40 -12
- package/lib/module/components/HMSManageAudioOutput.js.map +1 -0
- package/lib/module/components/HMSManageLeave.js +9 -62
- package/lib/module/components/HMSManageLeave.js.map +1 -1
- package/lib/module/components/HMSMeetingEnded.js +27 -0
- package/lib/module/components/HMSMeetingEnded.js.map +1 -0
- package/lib/module/components/HMSPreviewEditName.js +7 -4
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +55 -0
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
- package/lib/module/components/HMSPreviewJoinButton.js +21 -9
- package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/module/components/HMSPreviewNetworkQuality.js +34 -0
- package/lib/module/components/HMSPreviewNetworkQuality.js.map +1 -0
- package/lib/module/components/HMSPreviewPeersList.js +2 -25
- package/lib/module/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/module/components/HMSPreviewSubtitle.js +25 -2
- package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/module/components/HMSPreviewTile.js +2 -18
- package/lib/module/components/HMSPreviewTile.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +2 -3
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSShowNetworkQuality.js +0 -2
- package/lib/module/components/HMSShowNetworkQuality.js.map +1 -1
- package/lib/module/components/Meeting.js +7 -0
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MenuModal/Menu.js +1 -2
- package/lib/module/components/MenuModal/Menu.js.map +1 -1
- package/lib/module/components/Modals.js +40 -298
- package/lib/module/components/Modals.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsList.js +1 -20
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js +2 -13
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/Preview.js +79 -71
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +3 -100
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/useHmsInstance.js +0 -1
- package/lib/module/hooks/useHmsInstance.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +6 -0
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +131 -32
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +5 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +12 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +14 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/utils/theme.js +1 -0
- package/lib/module/utils/theme.js.map +1 -1
- package/lib/module/utils/types.js +0 -1
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +2 -2
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -1
- package/lib/typescript/HMSPrebuilt.d.ts +2 -3
- package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Check/index.d.ts +7 -0
- package/lib/typescript/Icons/Check/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Radio/index.d.ts +7 -0
- package/lib/typescript/Icons/Radio/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +2 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/CustomInput.d.ts +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSStreamLoading.d.ts +3 -0
- package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -0
- package/lib/typescript/components/HMSLocalVideoView.d.ts +3 -0
- package/lib/typescript/components/HMSLocalVideoView.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageAudioOutput.d.ts +3 -0
- package/lib/typescript/components/HMSManageAudioOutput.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
- package/lib/typescript/components/HMSMeetingEnded.d.ts +3 -0
- package/lib/typescript/components/HMSMeetingEnded.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts +3 -0
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts +3 -0
- package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +1 -1
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MenuModal/Menu.d.ts.map +1 -1
- package/lib/typescript/components/Modals.d.ts +1 -9
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +0 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/hooks-util-selectors.d.ts +2 -0
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +9 -2
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +2 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +16 -3
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +3 -1
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +3 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +3 -1
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/userState.d.ts +2 -2
- package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
- package/lib/typescript/utils/theme.d.ts +1 -0
- package/lib/typescript/utils/theme.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +3 -4
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +9 -16
- package/src/HMSInstanceSetup.tsx +4 -31
- package/src/HMSPrebuilt.tsx +24 -6
- package/src/HMSRoomSetup.tsx +55 -17
- package/src/Icons/Check/assets/check.png +0 -0
- package/src/Icons/Check/assets/check@2x.png +0 -0
- package/src/Icons/Check/assets/check@3x.png +0 -0
- package/src/Icons/Check/index.tsx +27 -0
- package/src/Icons/Radio/assets/radio.png +0 -0
- package/src/Icons/Radio/assets/radio@2x.png +0 -0
- package/src/Icons/Radio/assets/radio@3x.png +0 -0
- package/src/Icons/Radio/index.tsx +27 -0
- package/src/Icons/index.ts +2 -0
- package/src/components/BackButton.tsx +3 -3
- package/src/components/DisplayView.tsx +0 -10
- package/src/components/HMSHLSStreamLoading.tsx +57 -0
- package/src/components/HMSLocalVideoView.tsx +42 -0
- package/src/components/{HMSSpeakerSettings.tsx → HMSManageAudioOutput.tsx} +69 -17
- package/src/components/HMSManageLeave.tsx +6 -77
- package/src/components/HMSMeetingEnded.tsx +29 -0
- package/src/components/HMSPreviewEditName.tsx +5 -4
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +58 -0
- package/src/components/HMSPreviewJoinButton.tsx +30 -7
- package/src/components/HMSPreviewNetworkQuality.tsx +40 -0
- package/src/components/HMSPreviewPeersList.tsx +7 -46
- package/src/components/HMSPreviewSubtitle.tsx +26 -2
- package/src/components/HMSPreviewTile.tsx +2 -24
- package/src/components/HMSRoomOptions.tsx +2 -8
- package/src/components/HMSShowNetworkQuality.tsx +0 -1
- package/src/components/Meeting.tsx +11 -0
- package/src/components/MenuModal/Menu.tsx +1 -1
- package/src/components/Modals.tsx +4 -299
- package/src/components/Participants/ParticipantsList.tsx +0 -24
- package/src/components/PeerSettingsModalContent.tsx +9 -23
- package/src/components/Preview.tsx +129 -101
- package/src/components/RoomSettingsModalContent.tsx +1 -138
- package/src/components/index.ts +0 -1
- package/src/hooks/useHmsInstance.ts +0 -1
- package/src/hooks-util-selectors.tsx +10 -0
- package/src/hooks-util.ts +155 -42
- package/src/redux/actionTypes.ts +6 -0
- package/src/redux/actions/index.ts +13 -2
- package/src/redux/reducers/appState.ts +9 -0
- package/src/redux/reducers/userState.ts +2 -2
- package/src/utils/theme.ts +1 -0
- package/src/utils/types.ts +3 -4
- package/src/utils.ts +2 -2
- package/lib/commonjs/components/HMSSpeakerSettings.js.map +0 -1
- package/lib/commonjs/components/ZoomableView.js +0 -84
- package/lib/commonjs/components/ZoomableView.js.map +0 -1
- package/lib/module/components/HMSSpeakerSettings.js.map +0 -1
- package/lib/module/components/ZoomableView.js +0 -76
- package/lib/module/components/ZoomableView.js.map +0 -1
- package/lib/typescript/components/HMSSpeakerSettings.d.ts +0 -3
- package/lib/typescript/components/HMSSpeakerSettings.d.ts.map +0 -1
- package/lib/typescript/components/ZoomableView.d.ts +0 -6
- package/lib/typescript/components/ZoomableView.d.ts.map +0 -1
- package/src/components/ZoomableView.tsx +0 -91
|
@@ -75,16 +75,10 @@ export const HMSRoomOptions: React.FC<HMSRoomOptionsProps> = () => {
|
|
|
75
75
|
</DefaultModal>
|
|
76
76
|
<DefaultModal
|
|
77
77
|
modalPosiion="center"
|
|
78
|
-
modalVisible={
|
|
79
|
-
modalVisible === ModalTypes.RECORDING ||
|
|
80
|
-
modalVisible === ModalTypes.RESOLUTION
|
|
81
|
-
}
|
|
78
|
+
modalVisible={modalVisible === ModalTypes.RECORDING}
|
|
82
79
|
setModalVisible={dismissModal}
|
|
83
80
|
>
|
|
84
|
-
<RecordingModal
|
|
85
|
-
setModalVisible={setModalVisible}
|
|
86
|
-
recordingModal={modalVisible === ModalTypes.RECORDING}
|
|
87
|
-
/>
|
|
81
|
+
<RecordingModal setModalVisible={setModalVisible} />
|
|
88
82
|
</DefaultModal>
|
|
89
83
|
<DefaultModal
|
|
90
84
|
modalPosiion="center"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
3
4
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
5
|
|
|
5
6
|
import type { PeerTrackNode } from '../utils/types';
|
|
@@ -16,12 +17,18 @@ import {
|
|
|
16
17
|
} from '../hooks-util';
|
|
17
18
|
import { ChatView } from './ChatWindow';
|
|
18
19
|
import { MeetingScreenContent } from './MeetingScreenContent';
|
|
20
|
+
import { HMSHLSStreamLoading } from './HMSHLSStreamLoading';
|
|
21
|
+
import type { RootState } from '../redux';
|
|
19
22
|
|
|
20
23
|
interface MeetingProps {
|
|
21
24
|
peerTrackNodes: Array<PeerTrackNode>;
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
export const Meeting: React.FC<MeetingProps> = ({ peerTrackNodes }) => {
|
|
28
|
+
const startingHLSStream = useSelector(
|
|
29
|
+
(state: RootState) => state.app.startingHLSStream
|
|
30
|
+
);
|
|
31
|
+
|
|
25
32
|
// TODO: Fetch latest Room and localPeer on mount of this component?
|
|
26
33
|
|
|
27
34
|
useFetchHMSRoles();
|
|
@@ -48,6 +55,10 @@ export const Meeting: React.FC<MeetingProps> = ({ peerTrackNodes }) => {
|
|
|
48
55
|
};
|
|
49
56
|
}, []);
|
|
50
57
|
|
|
58
|
+
if (startingHLSStream) {
|
|
59
|
+
return <HMSHLSStreamLoading />;
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
/**
|
|
52
63
|
* TODO: disbaled Expended View animation in Webrtc flow
|
|
53
64
|
*
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
StyleSheet,
|
|
12
12
|
TouchableWithoutFeedback,
|
|
13
13
|
View,
|
|
14
|
+
ScrollView,
|
|
14
15
|
} from 'react-native';
|
|
15
16
|
import type { LayoutChangeEvent, ViewStyle } from 'react-native';
|
|
16
|
-
import { ScrollView } from 'react-native-gesture-handler';
|
|
17
17
|
|
|
18
18
|
import { COLORS } from '../../utils/theme';
|
|
19
19
|
|
|
@@ -7,8 +7,6 @@ import {
|
|
|
7
7
|
TextInput,
|
|
8
8
|
StyleSheet,
|
|
9
9
|
Image,
|
|
10
|
-
Platform,
|
|
11
|
-
InteractionManager,
|
|
12
10
|
useWindowDimensions,
|
|
13
11
|
} from 'react-native';
|
|
14
12
|
import type { ImageURISource } from 'react-native';
|
|
@@ -34,10 +32,6 @@ import Feather from 'react-native-vector-icons/Feather';
|
|
|
34
32
|
import Entypo from 'react-native-vector-icons/Entypo';
|
|
35
33
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
36
34
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
37
|
-
import { Slider } from '@miblanchard/react-native-slider';
|
|
38
|
-
import RNFetchBlob from 'rn-fetch-blob';
|
|
39
|
-
import RNFS from 'react-native-fs';
|
|
40
|
-
import Share from 'react-native-share';
|
|
41
35
|
|
|
42
36
|
import { styles } from './styles';
|
|
43
37
|
|
|
@@ -51,7 +45,7 @@ import {
|
|
|
51
45
|
changeShowStats,
|
|
52
46
|
saveUserData,
|
|
53
47
|
} from '../redux/actions';
|
|
54
|
-
import {
|
|
48
|
+
import { getTime } from '../utils/functions';
|
|
55
49
|
import {
|
|
56
50
|
LayoutParams,
|
|
57
51
|
ModalTypes,
|
|
@@ -176,106 +170,6 @@ export const SaveScreenshot = ({
|
|
|
176
170
|
(state: RootState) => state.hmsStates.localPeer || undefined
|
|
177
171
|
);
|
|
178
172
|
|
|
179
|
-
/**
|
|
180
|
-
* Get target path on external storage to save image
|
|
181
|
-
* @param {string} imageExtension file extension to use for image
|
|
182
|
-
* @param {string} peerName name of peer to use in image name
|
|
183
|
-
* @returns string - path on external storage to save image
|
|
184
|
-
*/
|
|
185
|
-
const getTargetPath = (imageExtension: string, peerName?: string) => {
|
|
186
|
-
// formatting peer name
|
|
187
|
-
const formattedPeerName = peerName
|
|
188
|
-
? peerName.replace(/ /g, '-').toLowerCase()
|
|
189
|
-
: '';
|
|
190
|
-
|
|
191
|
-
// name to use for image
|
|
192
|
-
const imageName = `${formattedPeerName}-snapshot-${Date.now()}.${imageExtension}`;
|
|
193
|
-
|
|
194
|
-
// directory for saving image
|
|
195
|
-
const targetDir =
|
|
196
|
-
Platform.OS === 'ios'
|
|
197
|
-
? RNFetchBlob.fs.dirs.DocumentDir
|
|
198
|
-
: RNFetchBlob.fs.dirs.DCIMDir;
|
|
199
|
-
|
|
200
|
-
const targetLocation = `${targetDir}/${imageName}`;
|
|
201
|
-
|
|
202
|
-
return targetLocation;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
const saveToDisk = async () => {
|
|
206
|
-
try {
|
|
207
|
-
// Requesting External Storage permission to save image to disk
|
|
208
|
-
const permission = await requestExternalStoragePermission();
|
|
209
|
-
|
|
210
|
-
// checking External Storage permission and availability of image source that we have to save to disk
|
|
211
|
-
if (permission && peer && imageSource) {
|
|
212
|
-
// Waiting for Interactions (Modal Close Animation) to finish
|
|
213
|
-
InteractionManager.runAfterInteractions(async () => {
|
|
214
|
-
// image extension to use
|
|
215
|
-
const imageExtension = 'png';
|
|
216
|
-
|
|
217
|
-
// Removing `file://` from URI if it exists, to keep it consistent with `base64` image case
|
|
218
|
-
const source = imageSource.uri.replace('file://', '');
|
|
219
|
-
|
|
220
|
-
// Checking if source is the local file on device
|
|
221
|
-
const isSourceLocalFile = imageSource.uri.startsWith('file://');
|
|
222
|
-
|
|
223
|
-
// if source is local file on ios device then we don't need to do any file system operation
|
|
224
|
-
// We can use that local file to show preview window to user on ios
|
|
225
|
-
const targetLocation =
|
|
226
|
-
isSourceLocalFile && Platform.OS === 'ios'
|
|
227
|
-
? source
|
|
228
|
-
: getTargetPath(imageExtension, peer.name);
|
|
229
|
-
|
|
230
|
-
// if source is local file on android device, then we copy source file to target path
|
|
231
|
-
if (isSourceLocalFile) {
|
|
232
|
-
if (Platform.OS === 'android') {
|
|
233
|
-
await RNFS.copyFile(
|
|
234
|
-
source, // Source Dir
|
|
235
|
-
targetLocation // Target Dir
|
|
236
|
-
);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
// if source is not local file, then we write to target path
|
|
240
|
-
else {
|
|
241
|
-
await RNFetchBlob.fs.writeFile(
|
|
242
|
-
targetLocation, // Target Dir
|
|
243
|
-
source.replace('data:image/png;base64,', ''), // Data to write to "Target Dir"
|
|
244
|
-
'base64'
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
Share.open({ url: 'file://' + targetLocation })
|
|
249
|
-
.then(({ message }) => {
|
|
250
|
-
if (message.includes('SaveToCameraRoll')) {
|
|
251
|
-
Toast.showWithGravity(
|
|
252
|
-
'Snapshot has been saved successfully',
|
|
253
|
-
Toast.LONG,
|
|
254
|
-
Toast.TOP
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
cancelModal();
|
|
258
|
-
})
|
|
259
|
-
.catch((error) => console.log('share error -> ', error))
|
|
260
|
-
.finally(() => {
|
|
261
|
-
// On Android, We have already saved image into DCIM dir
|
|
262
|
-
// Therefore, we can notify user about "save success" and close modal
|
|
263
|
-
if (Platform.OS === 'android') {
|
|
264
|
-
Toast.showWithGravity(
|
|
265
|
-
'Snapshot has been saved successfully',
|
|
266
|
-
Toast.LONG,
|
|
267
|
-
Toast.TOP
|
|
268
|
-
);
|
|
269
|
-
cancelModal();
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
} catch (error) {
|
|
275
|
-
console.warn('Snapshot Save Error: ', error);
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
|
-
|
|
279
173
|
return (
|
|
280
174
|
<View style={[{ flexGrow: 1 }, styles.volumeModalContainer]}>
|
|
281
175
|
<Text style={styles.roleChangeModalHeading}>
|
|
@@ -290,62 +184,9 @@ export const SaveScreenshot = ({
|
|
|
290
184
|
) : null}
|
|
291
185
|
<View style={styles.roleChangeModalPermissionContainer}>
|
|
292
186
|
<CustomButton
|
|
293
|
-
title="
|
|
294
|
-
onPress={cancelModal}
|
|
295
|
-
viewStyle={[styles.roleChangeModalCancelButton, { width: '40%' }]}
|
|
296
|
-
textStyle={styles.roleChangeModalButtonText}
|
|
297
|
-
/>
|
|
298
|
-
<CustomButton
|
|
299
|
-
title="Save to Disk"
|
|
300
|
-
onPress={saveToDisk}
|
|
301
|
-
viewStyle={[styles.roleChangeModalSuccessButton, { width: '56%' }]}
|
|
302
|
-
textStyle={styles.roleChangeModalButtonText}
|
|
303
|
-
/>
|
|
304
|
-
</View>
|
|
305
|
-
</View>
|
|
306
|
-
);
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
export const ChangeVolumeModal = ({
|
|
310
|
-
cancelModal,
|
|
311
|
-
}: {
|
|
312
|
-
cancelModal: Function;
|
|
313
|
-
}) => {
|
|
314
|
-
const instance = useHMSInstance();
|
|
315
|
-
const peer = useSelector((state: RootState) => state.app.peerToUpdate);
|
|
316
|
-
const [volume, setVolume] = useState<number>(0);
|
|
317
|
-
|
|
318
|
-
const changeVolume = () => {
|
|
319
|
-
if (peer?.audioTrack) {
|
|
320
|
-
instance?.setVolume(peer?.audioTrack, volume);
|
|
321
|
-
}
|
|
322
|
-
cancelModal();
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
return (
|
|
326
|
-
<View style={styles.volumeModalContainer}>
|
|
327
|
-
<Text style={styles.roleChangeModalHeading}>Set Volume</Text>
|
|
328
|
-
<View style={styles.volumeModalSlider}>
|
|
329
|
-
<Text style={styles.roleChangeModalDescription}>Volume: {volume}</Text>
|
|
330
|
-
<Slider
|
|
331
|
-
value={volume}
|
|
332
|
-
maximumValue={10}
|
|
333
|
-
minimumValue={0}
|
|
334
|
-
step={1}
|
|
335
|
-
onValueChange={(value: any) => setVolume(value[0])}
|
|
336
|
-
/>
|
|
337
|
-
</View>
|
|
338
|
-
<View style={styles.roleChangeModalPermissionContainer}>
|
|
339
|
-
<CustomButton
|
|
340
|
-
title="Cancel"
|
|
187
|
+
title="Done"
|
|
341
188
|
onPress={cancelModal}
|
|
342
|
-
viewStyle={styles.roleChangeModalCancelButton}
|
|
343
|
-
textStyle={styles.roleChangeModalButtonText}
|
|
344
|
-
/>
|
|
345
|
-
<CustomButton
|
|
346
|
-
title="Change"
|
|
347
|
-
onPress={changeVolume}
|
|
348
|
-
viewStyle={styles.roleChangeModalSuccessButton}
|
|
189
|
+
viewStyle={[styles.roleChangeModalCancelButton, { width: '100%' }]}
|
|
349
190
|
textStyle={styles.roleChangeModalButtonText}
|
|
350
191
|
/>
|
|
351
192
|
</View>
|
|
@@ -1423,15 +1264,12 @@ export const HlsStreamingModal = ({
|
|
|
1423
1264
|
};
|
|
1424
1265
|
|
|
1425
1266
|
export const RecordingModal = ({
|
|
1426
|
-
recordingModal,
|
|
1427
1267
|
setModalVisible,
|
|
1428
1268
|
}: {
|
|
1429
|
-
recordingModal: boolean;
|
|
1430
1269
|
setModalVisible(modalType: ModalTypes, delay?: any): void;
|
|
1431
1270
|
}) => {
|
|
1432
1271
|
const instance = useHMSInstance();
|
|
1433
1272
|
const roomID = useSelector((state: RootState) => state.user.roomID);
|
|
1434
|
-
const [resolutionDetails, setResolutionDetails] = useState<boolean>(false);
|
|
1435
1273
|
const [recordingDetails, setRecordingDetails] = useState<HMSRTMPConfig>({
|
|
1436
1274
|
record: false,
|
|
1437
1275
|
meetingURL: roomID ? roomID + '?token=beam_recording' : undefined,
|
|
@@ -1445,7 +1283,7 @@ export const RecordingModal = ({
|
|
|
1445
1283
|
setModalVisible(ModalTypes.DEFAULT);
|
|
1446
1284
|
};
|
|
1447
1285
|
|
|
1448
|
-
return
|
|
1286
|
+
return (
|
|
1449
1287
|
<View style={styles.roleChangeModal}>
|
|
1450
1288
|
<Text style={styles.roleChangeModalHeading}>Recording Details</Text>
|
|
1451
1289
|
<TextInput
|
|
@@ -1498,38 +1336,6 @@ export const RecordingModal = ({
|
|
|
1498
1336
|
</View>
|
|
1499
1337
|
<Text style={styles.roleChangeModalPermission}>Record</Text>
|
|
1500
1338
|
</TouchableOpacity>
|
|
1501
|
-
<TouchableOpacity
|
|
1502
|
-
style={styles.checkboxButtonContainer}
|
|
1503
|
-
onPress={() => {
|
|
1504
|
-
setResolutionDetails(!resolutionDetails);
|
|
1505
|
-
if (!resolutionDetails) {
|
|
1506
|
-
setModalVisible(ModalTypes.RESOLUTION, true);
|
|
1507
|
-
setRecordingDetails({
|
|
1508
|
-
...recordingDetails,
|
|
1509
|
-
resolution: {
|
|
1510
|
-
height: 720,
|
|
1511
|
-
width: 1280,
|
|
1512
|
-
},
|
|
1513
|
-
});
|
|
1514
|
-
} else {
|
|
1515
|
-
setRecordingDetails({
|
|
1516
|
-
...recordingDetails,
|
|
1517
|
-
resolution: undefined,
|
|
1518
|
-
});
|
|
1519
|
-
}
|
|
1520
|
-
}}
|
|
1521
|
-
>
|
|
1522
|
-
<View style={styles.roleChangeModalCheckBox}>
|
|
1523
|
-
{resolutionDetails && (
|
|
1524
|
-
<Entypo
|
|
1525
|
-
name="check"
|
|
1526
|
-
style={styles.roleChangeModalCheck}
|
|
1527
|
-
size={10}
|
|
1528
|
-
/>
|
|
1529
|
-
)}
|
|
1530
|
-
</View>
|
|
1531
|
-
<Text style={styles.roleChangeModalPermission}>Resolution</Text>
|
|
1532
|
-
</TouchableOpacity>
|
|
1533
1339
|
<View style={styles.roleChangeModalPermissionContainer}>
|
|
1534
1340
|
<CustomButton
|
|
1535
1341
|
title="Cancel"
|
|
@@ -1545,62 +1351,6 @@ export const RecordingModal = ({
|
|
|
1545
1351
|
/>
|
|
1546
1352
|
</View>
|
|
1547
1353
|
</View>
|
|
1548
|
-
) : (
|
|
1549
|
-
<View style={styles.roleChangeModal}>
|
|
1550
|
-
<Text style={styles.roleChangeModalHeading}>Resolution Details</Text>
|
|
1551
|
-
<View style={styles.resolutionContainer}>
|
|
1552
|
-
<View style={styles.resolutionDetails}>
|
|
1553
|
-
<Text style={styles.interRegular}>Height :</Text>
|
|
1554
|
-
<Text style={styles.resolutionValue}>
|
|
1555
|
-
{recordingDetails.resolution?.height}
|
|
1556
|
-
</Text>
|
|
1557
|
-
</View>
|
|
1558
|
-
<Slider
|
|
1559
|
-
value={recordingDetails.resolution?.height}
|
|
1560
|
-
maximumValue={1280}
|
|
1561
|
-
minimumValue={480}
|
|
1562
|
-
step={10}
|
|
1563
|
-
onValueChange={(value: any) => {
|
|
1564
|
-
setRecordingDetails({
|
|
1565
|
-
...recordingDetails,
|
|
1566
|
-
resolution: {
|
|
1567
|
-
height: parseInt(value),
|
|
1568
|
-
width: recordingDetails.resolution?.width ?? 1280,
|
|
1569
|
-
},
|
|
1570
|
-
});
|
|
1571
|
-
}}
|
|
1572
|
-
/>
|
|
1573
|
-
<View style={styles.resolutionDetails}>
|
|
1574
|
-
<Text style={styles.interRegular}>Width :</Text>
|
|
1575
|
-
<Text style={styles.resolutionValue}>
|
|
1576
|
-
{recordingDetails.resolution?.width}
|
|
1577
|
-
</Text>
|
|
1578
|
-
</View>
|
|
1579
|
-
<Slider
|
|
1580
|
-
value={recordingDetails.resolution?.width}
|
|
1581
|
-
maximumValue={1280}
|
|
1582
|
-
minimumValue={500}
|
|
1583
|
-
step={10}
|
|
1584
|
-
onValueChange={(value: any) => {
|
|
1585
|
-
setRecordingDetails({
|
|
1586
|
-
...recordingDetails,
|
|
1587
|
-
resolution: {
|
|
1588
|
-
width: parseInt(value),
|
|
1589
|
-
height: recordingDetails.resolution?.height ?? 720,
|
|
1590
|
-
},
|
|
1591
|
-
});
|
|
1592
|
-
}}
|
|
1593
|
-
/>
|
|
1594
|
-
</View>
|
|
1595
|
-
<View style={styles.sortingButtonContainer}>
|
|
1596
|
-
<CustomButton
|
|
1597
|
-
title="Back"
|
|
1598
|
-
onPress={() => setModalVisible(ModalTypes.RECORDING, true)}
|
|
1599
|
-
viewStyle={styles.backButton}
|
|
1600
|
-
textStyle={styles.roleChangeModalButtonText}
|
|
1601
|
-
/>
|
|
1602
|
-
</View>
|
|
1603
|
-
</View>
|
|
1604
1354
|
);
|
|
1605
1355
|
};
|
|
1606
1356
|
|
|
@@ -1757,51 +1507,6 @@ export const RealTime = ({ startedAt }: { startedAt?: Date }) => {
|
|
|
1757
1507
|
);
|
|
1758
1508
|
};
|
|
1759
1509
|
|
|
1760
|
-
export const AudioShareSetVolumeModal = ({
|
|
1761
|
-
success,
|
|
1762
|
-
cancel,
|
|
1763
|
-
}: {
|
|
1764
|
-
success: Function;
|
|
1765
|
-
cancel: Function;
|
|
1766
|
-
}) => {
|
|
1767
|
-
const [volume, setVolume] = useState<number>(0);
|
|
1768
|
-
|
|
1769
|
-
const changeVolume = () => {
|
|
1770
|
-
success(volume);
|
|
1771
|
-
cancel();
|
|
1772
|
-
};
|
|
1773
|
-
|
|
1774
|
-
return (
|
|
1775
|
-
<View style={styles.volumeModalContainer}>
|
|
1776
|
-
<Text style={styles.roleChangeModalHeading}>Set Volume</Text>
|
|
1777
|
-
<View style={styles.volumeModalSlider}>
|
|
1778
|
-
<Text style={styles.roleChangeModalDescription}>Volume: {volume}</Text>
|
|
1779
|
-
<Slider
|
|
1780
|
-
value={volume}
|
|
1781
|
-
maximumValue={1}
|
|
1782
|
-
minimumValue={0}
|
|
1783
|
-
step={0.1}
|
|
1784
|
-
onValueChange={(value: any) => setVolume(value[0])}
|
|
1785
|
-
/>
|
|
1786
|
-
</View>
|
|
1787
|
-
<View style={styles.roleChangeModalPermissionContainer}>
|
|
1788
|
-
<CustomButton
|
|
1789
|
-
title="Cancel"
|
|
1790
|
-
onPress={cancel}
|
|
1791
|
-
viewStyle={styles.roleChangeModalCancelButton}
|
|
1792
|
-
textStyle={styles.roleChangeModalButtonText}
|
|
1793
|
-
/>
|
|
1794
|
-
<CustomButton
|
|
1795
|
-
title="Change"
|
|
1796
|
-
onPress={changeVolume}
|
|
1797
|
-
viewStyle={styles.roleChangeModalSuccessButton}
|
|
1798
|
-
textStyle={styles.roleChangeModalButtonText}
|
|
1799
|
-
/>
|
|
1800
|
-
</View>
|
|
1801
|
-
</View>
|
|
1802
|
-
);
|
|
1803
|
-
};
|
|
1804
|
-
|
|
1805
1510
|
interface ChangeBulkRoleModalProps {
|
|
1806
1511
|
cancelModal(): void;
|
|
1807
1512
|
}
|
|
@@ -88,16 +88,6 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({ data }) => {
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
const onSetVolumePress = (peer: HMSPeer) => {
|
|
92
|
-
hideMenu();
|
|
93
|
-
setTimeout(() => {
|
|
94
|
-
batch(() => {
|
|
95
|
-
dispatch(setPeerToUpdate(peer));
|
|
96
|
-
setModalVisible(ModalTypes.VOLUME, true);
|
|
97
|
-
});
|
|
98
|
-
}, 500);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
91
|
return (
|
|
102
92
|
<FlatList
|
|
103
93
|
data={data}
|
|
@@ -226,20 +216,6 @@ export const ParticipantsList: React.FC<ParticipantsListProps> = ({ data }) => {
|
|
|
226
216
|
</View>
|
|
227
217
|
</MenuItem>
|
|
228
218
|
) : null}
|
|
229
|
-
{peer.isLocal === false && !!peer.audioTrack ? (
|
|
230
|
-
<MenuItem onPress={() => onSetVolumePress(peer)}>
|
|
231
|
-
<View style={styles.participantMenuItem}>
|
|
232
|
-
<Ionicons
|
|
233
|
-
name="volume-high-outline"
|
|
234
|
-
style={styles.participantMenuItemIcon}
|
|
235
|
-
size={24}
|
|
236
|
-
/>
|
|
237
|
-
<Text style={styles.participantMenuItemName}>
|
|
238
|
-
Set Volume
|
|
239
|
-
</Text>
|
|
240
|
-
</View>
|
|
241
|
-
</MenuItem>
|
|
242
|
-
) : null}
|
|
243
219
|
</Menu>
|
|
244
220
|
</View>
|
|
245
221
|
);
|
|
@@ -93,13 +93,6 @@ export const PeerSettingsModalContent: React.FC<
|
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
const changeVolumeLevelOfPeer = () => {
|
|
97
|
-
batch(() => {
|
|
98
|
-
dispatch(setPeerToUpdate(peerTrackNode.peer));
|
|
99
|
-
setModalVisible(ModalTypes.VOLUME, true);
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
|
|
103
96
|
// Check if selected tile is "On Spotlight"
|
|
104
97
|
const { onSpotlight, tileVideoTrackId, tileAudioTrackId } = isTileOnSpotlight(
|
|
105
98
|
spotlightTrackId,
|
|
@@ -147,13 +140,15 @@ export const PeerSettingsModalContent: React.FC<
|
|
|
147
140
|
<Text style={styles.participantRole}>{peer.role?.name}</Text>
|
|
148
141
|
|
|
149
142
|
<View style={styles.contentContainer}>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
143
|
+
{debugMode ? (
|
|
144
|
+
<SettingItem
|
|
145
|
+
text={onSpotlight ? 'Remove from Spotlight' : 'Add to Spotlight'}
|
|
146
|
+
IconType={Ionicons}
|
|
147
|
+
iconName={onSpotlight ? 'ios-star' : 'ios-star-outline'}
|
|
148
|
+
onPress={handleSpotlightPress}
|
|
149
|
+
disabled={!peerTrackNode.track?.trackId}
|
|
150
|
+
/>
|
|
151
|
+
) : null}
|
|
157
152
|
|
|
158
153
|
{!peer.isLocal &&
|
|
159
154
|
(localPeerPermissions?.mute || localPeerPermissions?.unmute) ? (
|
|
@@ -232,15 +227,6 @@ export const PeerSettingsModalContent: React.FC<
|
|
|
232
227
|
/>
|
|
233
228
|
) : null}
|
|
234
229
|
|
|
235
|
-
{!peer.isLocal ? (
|
|
236
|
-
<SettingItem
|
|
237
|
-
text="Set Volume"
|
|
238
|
-
IconType={Ionicons}
|
|
239
|
-
iconName={'volume-high-outline'}
|
|
240
|
-
onPress={() => changeVolumeLevelOfPeer()}
|
|
241
|
-
/>
|
|
242
|
-
) : null}
|
|
243
|
-
|
|
244
230
|
{/* Don't show Capture Screenshot option, if track is screenshare of local peer */}
|
|
245
231
|
{!debugMode ||
|
|
246
232
|
(peerTrackNode.peer.isLocal &&
|