@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
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Keyboard,
|
|
4
|
+
StyleSheet,
|
|
5
|
+
TouchableWithoutFeedback,
|
|
6
|
+
View,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import Animated, {
|
|
9
|
+
useAnimatedStyle,
|
|
10
|
+
useAnimatedKeyboard,
|
|
11
|
+
} from 'react-native-reanimated';
|
|
5
12
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
6
13
|
import LinearGradient from 'react-native-linear-gradient';
|
|
7
14
|
|
|
@@ -17,9 +24,23 @@ import { HMSPreviewPeersList } from './HMSPreviewPeersList';
|
|
|
17
24
|
import { HMSPreviewSubtitle } from './HMSPreviewSubtitle';
|
|
18
25
|
import { HMSPreviewTile } from './HMSPreviewTile';
|
|
19
26
|
import { HMSPreviewTitle } from './HMSPreviewTitle';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
27
|
+
import { HMSManageAudioOutput } from './HMSManageAudioOutput';
|
|
28
|
+
import { HMSPreviewNetworkQuality } from './HMSPreviewNetworkQuality';
|
|
29
|
+
import { useCanPublishVideo } from '../hooks-sdk';
|
|
30
|
+
import { HMSPreviewHLSLiveIndicator } from './HMSPreviewHLSLiveIndicator';
|
|
31
|
+
|
|
32
|
+
const backButtonEdges = ['top'] as const;
|
|
33
|
+
const headerEdges = ['top', 'left', 'right'] as const;
|
|
34
|
+
|
|
35
|
+
const gradientColorShades = [
|
|
36
|
+
'#000000',
|
|
37
|
+
'rgba(0, 0, 0, 0.9)',
|
|
38
|
+
'rgba(0, 0, 0, 0.7)',
|
|
39
|
+
'rgba(0, 0, 0, 0.1)',
|
|
40
|
+
'rgba(0, 0, 0, 0.05)',
|
|
41
|
+
'rgba(0, 0, 0, 0)',
|
|
42
|
+
];
|
|
43
|
+
const gradientColorShadeLocations = [0.45, 0.55, 0.7, 0.9, 0.95, 1];
|
|
23
44
|
|
|
24
45
|
export const Preview = ({
|
|
25
46
|
join,
|
|
@@ -28,114 +49,82 @@ export const Preview = ({
|
|
|
28
49
|
join(): void;
|
|
29
50
|
loadingButtonState: boolean;
|
|
30
51
|
}) => {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
state.hmsStates.localPeer?.networkQuality?.downlinkQuality
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
AvoidSoftInput.setAdjustNothing();
|
|
38
|
-
AvoidSoftInput.setEnabled(true);
|
|
52
|
+
const canPublishVideo = useCanPublishVideo();
|
|
53
|
+
const animatedKeyboard = useAnimatedKeyboard();
|
|
39
54
|
|
|
40
|
-
|
|
41
|
-
|
|
55
|
+
const keyboardAvoidStyle = useAnimatedStyle(() => {
|
|
56
|
+
return {
|
|
57
|
+
transform: [{ translateY: -animatedKeyboard.height.value }],
|
|
58
|
+
};
|
|
59
|
+
});
|
|
42
60
|
|
|
43
61
|
return (
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
width: '100%',
|
|
61
|
-
height: 260,
|
|
62
|
-
}}
|
|
63
|
-
/>
|
|
64
|
-
|
|
65
|
-
<SafeAreaView
|
|
66
|
-
style={{ position: 'absolute', top: 0, width: '100%', marginTop: 24 }}
|
|
67
|
-
edges={['top', 'left', 'right']}
|
|
68
|
-
mode="margin"
|
|
69
|
-
>
|
|
70
|
-
<GenericLogoIcon style={{ alignSelf: 'center', marginBottom: 16 }} />
|
|
71
|
-
|
|
72
|
-
<HMSPreviewTitle />
|
|
73
|
-
|
|
74
|
-
<HMSPreviewSubtitle />
|
|
75
|
-
|
|
76
|
-
<HMSPreviewPeersList />
|
|
77
|
-
</SafeAreaView>
|
|
78
|
-
|
|
79
|
-
<SafeAreaView
|
|
80
|
-
style={{ position: 'absolute', top: 0 }}
|
|
81
|
-
edges={['top']}
|
|
82
|
-
mode="margin"
|
|
83
|
-
>
|
|
84
|
-
<BackButton />
|
|
85
|
-
</SafeAreaView>
|
|
86
|
-
|
|
87
|
-
<View
|
|
88
|
-
style={{
|
|
89
|
-
position: 'absolute',
|
|
90
|
-
bottom: 0,
|
|
91
|
-
width: '100%',
|
|
92
|
-
}}
|
|
93
|
-
>
|
|
94
|
-
<View
|
|
95
|
-
style={{
|
|
96
|
-
marginLeft: 8,
|
|
97
|
-
marginBottom: 8,
|
|
98
|
-
borderRadius: 8,
|
|
99
|
-
paddingVertical: 4,
|
|
100
|
-
paddingHorizontal: 8,
|
|
101
|
-
backgroundColor: COLORS.BACKGROUND.DIM_80,
|
|
102
|
-
alignSelf: 'flex-start',
|
|
103
|
-
}}
|
|
62
|
+
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
|
|
63
|
+
<View style={styles.container}>
|
|
64
|
+
{canPublishVideo ? <HMSPreviewTile /> : null}
|
|
65
|
+
|
|
66
|
+
{canPublishVideo ? (
|
|
67
|
+
<LinearGradient
|
|
68
|
+
colors={gradientColorShades}
|
|
69
|
+
locations={gradientColorShadeLocations}
|
|
70
|
+
style={styles.headerGradient}
|
|
71
|
+
/>
|
|
72
|
+
) : null}
|
|
73
|
+
|
|
74
|
+
<SafeAreaView
|
|
75
|
+
style={canPublishVideo ? styles.header : null}
|
|
76
|
+
edges={headerEdges}
|
|
77
|
+
mode="margin"
|
|
104
78
|
>
|
|
105
|
-
<
|
|
106
|
-
|
|
79
|
+
<HMSPreviewTitle />
|
|
80
|
+
|
|
81
|
+
<HMSPreviewSubtitle />
|
|
82
|
+
|
|
83
|
+
<View style={styles.peerListWrapper}>
|
|
84
|
+
<HMSPreviewHLSLiveIndicator />
|
|
85
|
+
|
|
86
|
+
<HMSPreviewPeersList />
|
|
87
|
+
</View>
|
|
88
|
+
</SafeAreaView>
|
|
107
89
|
|
|
108
|
-
<
|
|
109
|
-
style={
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
borderTopLeftRadius: 16,
|
|
113
|
-
borderTopRightRadius: 16,
|
|
114
|
-
padding: 16,
|
|
115
|
-
}}
|
|
90
|
+
<SafeAreaView
|
|
91
|
+
style={styles.backButtonContainer}
|
|
92
|
+
edges={backButtonEdges}
|
|
93
|
+
mode="margin"
|
|
116
94
|
>
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
95
|
+
<BackButton />
|
|
96
|
+
</SafeAreaView>
|
|
97
|
+
|
|
98
|
+
<View style={styles.footerWrapper}>
|
|
99
|
+
<HMSPreviewNetworkQuality />
|
|
100
|
+
|
|
101
|
+
<Animated.View style={[styles.footer, keyboardAvoidStyle]}>
|
|
102
|
+
<View style={styles.controlsContainer}>
|
|
103
|
+
<View style={styles.micAndCameraControls}>
|
|
104
|
+
<HMSManageLocalAudio />
|
|
120
105
|
|
|
121
|
-
|
|
122
|
-
|
|
106
|
+
<View style={styles.manageLocalVideoWrapper}>
|
|
107
|
+
<HMSManageLocalVideo />
|
|
108
|
+
</View>
|
|
109
|
+
|
|
110
|
+
<HMSManageCameraRotation />
|
|
123
111
|
</View>
|
|
124
112
|
|
|
125
|
-
<
|
|
113
|
+
<HMSManageAudioOutput />
|
|
126
114
|
</View>
|
|
127
115
|
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<View style={styles.joinButtonRow}>
|
|
132
|
-
<HMSPreviewEditName />
|
|
116
|
+
<View style={styles.joinButtonRow}>
|
|
117
|
+
<HMSPreviewEditName />
|
|
133
118
|
|
|
134
|
-
|
|
135
|
-
|
|
119
|
+
<HMSPreviewJoinButton
|
|
120
|
+
onJoin={join}
|
|
121
|
+
loading={loadingButtonState}
|
|
122
|
+
/>
|
|
123
|
+
</View>
|
|
124
|
+
</Animated.View>
|
|
136
125
|
</View>
|
|
137
126
|
</View>
|
|
138
|
-
</
|
|
127
|
+
</TouchableWithoutFeedback>
|
|
139
128
|
);
|
|
140
129
|
};
|
|
141
130
|
|
|
@@ -144,12 +133,33 @@ const styles = StyleSheet.create({
|
|
|
144
133
|
flex: 1,
|
|
145
134
|
position: 'relative',
|
|
146
135
|
backgroundColor: COLORS.BACKGROUND.DIM,
|
|
136
|
+
justifyContent: 'center',
|
|
137
|
+
},
|
|
138
|
+
header: {
|
|
139
|
+
position: 'absolute',
|
|
140
|
+
top: 0,
|
|
141
|
+
width: '100%',
|
|
142
|
+
marginTop: 24,
|
|
143
|
+
zIndex: 20,
|
|
144
|
+
alignItems: 'center',
|
|
145
|
+
},
|
|
146
|
+
headerGradient: {
|
|
147
|
+
position: 'absolute',
|
|
148
|
+
top: 0,
|
|
149
|
+
width: '100%',
|
|
150
|
+
height: 260,
|
|
151
|
+
zIndex: 10,
|
|
147
152
|
},
|
|
148
153
|
controlsContainer: {
|
|
149
154
|
flexDirection: 'row',
|
|
150
155
|
alignItems: 'center',
|
|
151
156
|
justifyContent: 'space-between',
|
|
152
157
|
},
|
|
158
|
+
peerListWrapper: {
|
|
159
|
+
flexDirection: 'row',
|
|
160
|
+
marginTop: 16,
|
|
161
|
+
alignSelf: 'center',
|
|
162
|
+
},
|
|
153
163
|
micAndCameraControls: {
|
|
154
164
|
flexDirection: 'row',
|
|
155
165
|
},
|
|
@@ -160,4 +170,22 @@ const styles = StyleSheet.create({
|
|
|
160
170
|
marginVertical: 16,
|
|
161
171
|
flexDirection: 'row',
|
|
162
172
|
},
|
|
173
|
+
backButtonContainer: {
|
|
174
|
+
position: 'absolute',
|
|
175
|
+
top: 0,
|
|
176
|
+
zIndex: 40,
|
|
177
|
+
},
|
|
178
|
+
footerWrapper: {
|
|
179
|
+
position: 'absolute',
|
|
180
|
+
bottom: 0,
|
|
181
|
+
width: '100%',
|
|
182
|
+
zIndex: 30,
|
|
183
|
+
},
|
|
184
|
+
footer: {
|
|
185
|
+
flex: 1,
|
|
186
|
+
backgroundColor: COLORS.BACKGROUND.DEFAULT,
|
|
187
|
+
borderTopLeftRadius: 16,
|
|
188
|
+
borderTopRightRadius: 16,
|
|
189
|
+
padding: 16,
|
|
190
|
+
},
|
|
163
191
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
4
|
StyleSheet,
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
InteractionManager,
|
|
12
12
|
} from 'react-native';
|
|
13
13
|
import {
|
|
14
|
-
HMSAudioFilePlayerNode,
|
|
15
14
|
HMSAudioMixingMode,
|
|
16
15
|
HMSUpdateListenerActions,
|
|
17
16
|
} from '@100mslive/react-native-hms';
|
|
@@ -21,7 +20,6 @@ import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityI
|
|
|
21
20
|
import Ionicons from 'react-native-vector-icons/Ionicons';
|
|
22
21
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
|
|
23
22
|
import EntypoIcons from 'react-native-vector-icons/Entypo';
|
|
24
|
-
import DocumentPicker from 'react-native-document-picker';
|
|
25
23
|
import { openSettings, requestNotifications } from 'react-native-permissions';
|
|
26
24
|
|
|
27
25
|
import { COLORS } from '../utils/theme';
|
|
@@ -34,7 +32,6 @@ import {
|
|
|
34
32
|
} from '../redux/actions';
|
|
35
33
|
import { ModalTypes, PipModes } from '../utils/types';
|
|
36
34
|
import { parseMetadata } from '../utils/functions';
|
|
37
|
-
import { getJoinConfig } from '../utils';
|
|
38
35
|
import { HMSShareScreen } from './HMSShareScreen';
|
|
39
36
|
import { ScreenShareIcon } from '../Icons';
|
|
40
37
|
|
|
@@ -63,11 +60,6 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
63
60
|
setAudioDeviceListenerAdded,
|
|
64
61
|
setMuteAllTracksAudio,
|
|
65
62
|
}) => {
|
|
66
|
-
// REFS
|
|
67
|
-
const audioFilePlayerNodeRef = useRef(
|
|
68
|
-
new HMSAudioFilePlayerNode('audio_file_player_node')
|
|
69
|
-
);
|
|
70
|
-
|
|
71
63
|
// REDUX STATES & DISPATCH
|
|
72
64
|
const dispatch = useDispatch();
|
|
73
65
|
const hmsInstance = useSelector((state: RootState) => state.user.hmsInstance);
|
|
@@ -308,73 +300,6 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
308
300
|
.catch((e) => console.log('Start Audioshare Error: ', e));
|
|
309
301
|
}
|
|
310
302
|
};
|
|
311
|
-
|
|
312
|
-
// iOS Audioshare
|
|
313
|
-
const setAudioShareVolume = () =>
|
|
314
|
-
setModalVisible(ModalTypes.SET_AUDIO_SHARE_VOLUME, true);
|
|
315
|
-
|
|
316
|
-
// iOS Audioshare
|
|
317
|
-
const playAudioShare = () => {
|
|
318
|
-
closeRoomSettingsModal();
|
|
319
|
-
setTimeout(() => {
|
|
320
|
-
DocumentPicker.pickSingle()
|
|
321
|
-
.then((result) => {
|
|
322
|
-
console.log('Document Picker Success: ', result);
|
|
323
|
-
audioFilePlayerNodeRef.current
|
|
324
|
-
.play(result?.uri, false, false)
|
|
325
|
-
.then((d) => {
|
|
326
|
-
console.log('Start Audioshare Success: ', d);
|
|
327
|
-
})
|
|
328
|
-
.catch((e) => console.log('Start Audioshare Error: ', e));
|
|
329
|
-
})
|
|
330
|
-
.catch((e) => console.log('Document Picker Error: ', e));
|
|
331
|
-
}, 500);
|
|
332
|
-
};
|
|
333
|
-
|
|
334
|
-
// iOS Audioshare
|
|
335
|
-
const stopAudioShare = () => {
|
|
336
|
-
closeRoomSettingsModal();
|
|
337
|
-
audioFilePlayerNodeRef.current.stop();
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
// iOS Audioshare
|
|
341
|
-
const pauseAudioShare = () => {
|
|
342
|
-
closeRoomSettingsModal();
|
|
343
|
-
audioFilePlayerNodeRef.current.pause();
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
// iOS Audioshare
|
|
347
|
-
const resumeAudioShare = () => {
|
|
348
|
-
closeRoomSettingsModal();
|
|
349
|
-
audioFilePlayerNodeRef.current.resume();
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
// iOS Audioshare
|
|
353
|
-
const isAudioSharePlaying = () => {
|
|
354
|
-
closeRoomSettingsModal();
|
|
355
|
-
audioFilePlayerNodeRef.current
|
|
356
|
-
.isPlaying()
|
|
357
|
-
.then((d) => console.log('Audioshare isPlaying: ', d))
|
|
358
|
-
.catch((e) => console.log('Audioshare isPlaying: ', e));
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
// iOS Audioshare
|
|
362
|
-
const getAudioShareDuration = () => {
|
|
363
|
-
closeRoomSettingsModal();
|
|
364
|
-
audioFilePlayerNodeRef.current
|
|
365
|
-
.duration()
|
|
366
|
-
.then((d) => console.log('Audioshare duration: ', d))
|
|
367
|
-
.catch((e) => console.log('Audioshare duration: ', e));
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
// iOS Audioshare
|
|
371
|
-
const getAudioShareCurrentDuration = () => {
|
|
372
|
-
closeRoomSettingsModal();
|
|
373
|
-
audioFilePlayerNodeRef.current
|
|
374
|
-
.currentDuration()
|
|
375
|
-
.then((d) => console.log('Audioshare currentDuration: ', d))
|
|
376
|
-
.catch((e) => console.log('Audioshare currentDuration: ', e));
|
|
377
|
-
};
|
|
378
303
|
//#endregion
|
|
379
304
|
|
|
380
305
|
return (
|
|
@@ -582,68 +507,6 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
582
507
|
/>
|
|
583
508
|
</>
|
|
584
509
|
) : null}
|
|
585
|
-
|
|
586
|
-
{Platform.OS === 'ios' &&
|
|
587
|
-
getJoinConfig().audioMixer &&
|
|
588
|
-
localPeerRole?.publishSettings?.allowed?.includes('audio') ? (
|
|
589
|
-
<>
|
|
590
|
-
<SettingItem
|
|
591
|
-
onPress={playAudioShare}
|
|
592
|
-
text="Play Audio Share"
|
|
593
|
-
IconType={Ionicons}
|
|
594
|
-
iconName="play-outline"
|
|
595
|
-
/>
|
|
596
|
-
|
|
597
|
-
<SettingItem
|
|
598
|
-
onPress={stopAudioShare}
|
|
599
|
-
text="Stop Audio Share"
|
|
600
|
-
IconType={Ionicons}
|
|
601
|
-
iconName="stop-outline"
|
|
602
|
-
/>
|
|
603
|
-
|
|
604
|
-
<SettingItem
|
|
605
|
-
onPress={setAudioShareVolume}
|
|
606
|
-
text="Set Audio Share Volume"
|
|
607
|
-
IconType={Ionicons}
|
|
608
|
-
iconName="volume-high-outline"
|
|
609
|
-
/>
|
|
610
|
-
|
|
611
|
-
<SettingItem
|
|
612
|
-
onPress={pauseAudioShare}
|
|
613
|
-
text="Pause Audio Share"
|
|
614
|
-
IconType={Ionicons}
|
|
615
|
-
iconName="pause-outline"
|
|
616
|
-
/>
|
|
617
|
-
|
|
618
|
-
<SettingItem
|
|
619
|
-
onPress={resumeAudioShare}
|
|
620
|
-
text="Resume Audio Share"
|
|
621
|
-
IconType={Ionicons}
|
|
622
|
-
iconName="play-skip-forward-outline"
|
|
623
|
-
/>
|
|
624
|
-
|
|
625
|
-
<SettingItem
|
|
626
|
-
onPress={isAudioSharePlaying}
|
|
627
|
-
text="Is Audio Share Playing"
|
|
628
|
-
IconType={MaterialCommunityIcons}
|
|
629
|
-
iconName="file-question-outline"
|
|
630
|
-
/>
|
|
631
|
-
|
|
632
|
-
<SettingItem
|
|
633
|
-
onPress={getAudioShareDuration}
|
|
634
|
-
text="Audio Share Duration"
|
|
635
|
-
IconType={Ionicons}
|
|
636
|
-
iconName="timer-outline"
|
|
637
|
-
/>
|
|
638
|
-
|
|
639
|
-
<SettingItem
|
|
640
|
-
onPress={getAudioShareCurrentDuration}
|
|
641
|
-
text="Audio Share Current Duration"
|
|
642
|
-
IconType={Ionicons}
|
|
643
|
-
iconName="timer-outline"
|
|
644
|
-
/>
|
|
645
|
-
</>
|
|
646
|
-
) : null}
|
|
647
510
|
</>
|
|
648
511
|
) : null}
|
|
649
512
|
</ScrollView>
|
package/src/components/index.ts
CHANGED
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
// HMSVideoTrackSettings,
|
|
13
13
|
// } from '@100mslive/react-native-hms';
|
|
14
14
|
// import { useEffect, useState } from 'react';
|
|
15
|
-
// import { getModel } from 'react-native-device-info';
|
|
16
15
|
|
|
17
16
|
// export const useHmsInstance = () => {
|
|
18
17
|
// const [hmsInstance, setHmsInstance] = useState(null);
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { HMSPeer } from '@100mslive/react-native-hms';
|
|
2
2
|
|
|
3
|
+
import type { RootState } from './redux';
|
|
4
|
+
|
|
3
5
|
export const selectIsHLSViewer = (peer: HMSPeer | null | undefined) =>
|
|
4
6
|
peer?.role?.name?.includes('hls') ?? false;
|
|
7
|
+
|
|
8
|
+
export const selectShouldGoLive = (state: RootState) => {
|
|
9
|
+
const isHLSStreaming = state.hmsStates.room?.hlsStreamingState.running;
|
|
10
|
+
const canStartHLSStreaming =
|
|
11
|
+
state.hmsStates.localPeer?.role?.permissions?.hlsStreaming;
|
|
12
|
+
|
|
13
|
+
return canStartHLSStreaming && !isHLSStreaming;
|
|
14
|
+
};
|