@100mslive/react-native-room-kit 1.0.6 → 1.0.7
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/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js +1 -1
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/components/AnimatedFooter.js +5 -3
- package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHLSFooter.js +4 -9
- package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/commonjs/components/AnimatedHeader.js +17 -5
- package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +11 -5
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +2 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +11 -10
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +5 -3
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +4 -11
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js +1 -2
- package/lib/commonjs/components/EndRoomModal.js.map +1 -1
- package/lib/commonjs/components/EndRoomModalContent.js +2 -1
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +12 -18
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js +31 -1
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSFooter.js +3 -1
- package/lib/commonjs/components/HLSFooter.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +1 -1
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js +2 -0
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +3 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLiveIndicator.js +6 -57
- package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSLiveViewerCount.js +78 -0
- package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -0
- package/lib/commonjs/components/HMSOverlayChatView.js +11 -2
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewEditName.js +6 -1
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js +14 -4
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +3 -6
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/Header.js +11 -3
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +4 -7
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +2 -13
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +46 -48
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MiniView.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js +6 -2
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js +2 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PressableIcon.js +6 -2
- package/lib/commonjs/components/PressableIcon.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +25 -9
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +1 -1
- package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js +37 -2
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +2 -1
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +59 -29
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +3 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +8 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +9 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/utils/types.js +3 -3
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js +1 -1
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/components/AnimatedFooter.js +5 -3
- package/lib/module/components/AnimatedFooter.js.map +1 -1
- package/lib/module/components/AnimatedHLSFooter.js +5 -10
- package/lib/module/components/AnimatedHLSFooter.js.map +1 -1
- package/lib/module/components/AnimatedHeader.js +18 -6
- package/lib/module/components/AnimatedHeader.js.map +1 -1
- package/lib/module/components/BottomSheet.js +12 -6
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js +2 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +13 -12
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +6 -4
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
- package/lib/module/components/DisplayView.js +5 -12
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js +1 -2
- package/lib/module/components/EndRoomModal.js.map +1 -1
- package/lib/module/components/EndRoomModalContent.js +2 -1
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js +12 -18
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js +32 -2
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSFooter.js +3 -1
- package/lib/module/components/HLSFooter.js.map +1 -1
- package/lib/module/components/HLSView.js +2 -2
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.android.js +2 -3
- package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +3 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLiveIndicator.js +9 -60
- package/lib/module/components/HMSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSLiveViewerCount.js +70 -0
- package/lib/module/components/HMSLiveViewerCount.js.map +1 -0
- package/lib/module/components/HMSOverlayChatView.js +11 -2
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSPreviewEditName.js +6 -1
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js +14 -4
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +3 -6
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/Header.js +10 -3
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +4 -7
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/Meeting.js +3 -14
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +51 -53
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/MiniView.js.map +1 -1
- package/lib/module/components/OverlayedViews.js +6 -2
- package/lib/module/components/OverlayedViews.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js +2 -1
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +2 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PressableIcon.js +6 -2
- package/lib/module/components/PressableIcon.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +26 -10
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalDebugModeContent.js +2 -2
- package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
- package/lib/module/components/WebrtcView.js +37 -2
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +2 -1
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +58 -29
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +3 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +6 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +9 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/utils/types.js +2 -2
- package/lib/module/utils/types.js.map +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHLSFooter.d.ts.map +1 -1
- package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts +1 -0
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModal.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HLSView.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +2 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSLiveViewerCount.d.ts +3 -0
- package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -0
- package/lib/typescript/components/HMSOverlayChatView.d.ts +5 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/Header.d.ts +1 -0
- package/lib/typescript/components/Header.d.ts.map +1 -1
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/OverlayedViews.d.ts +4 -1
- package/lib/typescript/components/OverlayedViews.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts +2 -0
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +4 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +1 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +6 -0
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +1 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +1 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +1 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +179 -179
- package/src/HMSRoomSetup.tsx +1 -1
- package/src/Icons/Recording/assets/recording-pause.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +3 -1
- package/src/components/AnimatedFooter.tsx +9 -3
- package/src/components/AnimatedHLSFooter.tsx +8 -17
- package/src/components/AnimatedHeader.tsx +16 -5
- package/src/components/BottomSheet.tsx +11 -5
- package/src/components/Chat/ChatFilterBottomSheetView.tsx +1 -0
- package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +12 -7
- package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +5 -4
- package/src/components/DisplayView.tsx +4 -13
- package/src/components/EndRoomModal.tsx +0 -1
- package/src/components/EndRoomModalContent.tsx +2 -1
- package/src/components/Footer.tsx +18 -23
- package/src/components/GridView.tsx +31 -4
- package/src/components/HLSFooter.tsx +1 -1
- package/src/components/HLSView.tsx +2 -1
- package/src/components/HMSKeyboardAvoidingView.android.tsx +1 -5
- package/src/components/HMSKeyboardAvoidingView.tsx +6 -3
- package/src/components/HMSLiveIndicator.tsx +8 -73
- package/src/components/HMSLiveViewerCount.tsx +90 -0
- package/src/components/HMSOverlayChatView.tsx +18 -2
- package/src/components/HMSPreviewEditName.tsx +10 -1
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -1
- package/src/components/HMSRecordingIndicator.tsx +20 -3
- package/src/components/HMSRoomOptions.tsx +0 -3
- package/src/components/Header.tsx +14 -3
- package/src/components/LeaveRoomBottomSheet.tsx +3 -6
- package/src/components/Meeting.tsx +2 -19
- package/src/components/MeetingScreenContent.tsx +67 -64
- package/src/components/MiniView.tsx +4 -4
- package/src/components/OverlayedViews.tsx +6 -3
- package/src/components/PeerSettingsModalContent.tsx +2 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +2 -1
- package/src/components/PressableIcon.tsx +22 -17
- package/src/components/RoomSettingsModalContent.tsx +22 -6
- package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -1
- package/src/components/WebrtcView.tsx +59 -22
- package/src/hooks-util-selectors.tsx +2 -1
- package/src/hooks-util.ts +61 -44
- package/src/redux/actionTypes.ts +3 -0
- package/src/redux/actions/index.ts +5 -0
- package/src/redux/reducers/appState.ts +8 -0
- package/src/utils/types.ts +12 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
Text,
|
|
5
|
+
Platform,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
} from 'react-native';
|
|
8
|
+
import { useSelector } from 'react-redux';
|
|
9
|
+
import { HMSStreamingState } from '@100mslive/react-native-hms';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
useHMSRoomStyleSheet,
|
|
13
|
+
useIsHLSViewer,
|
|
14
|
+
useShowChatAndParticipants,
|
|
15
|
+
} from '../hooks-util';
|
|
16
|
+
import { EyeIcon } from '../Icons';
|
|
17
|
+
import { hexToRgbA } from '../utils/theme';
|
|
18
|
+
import type { RootState } from '../redux';
|
|
19
|
+
import { TestIds } from '../utils/constants';
|
|
20
|
+
|
|
21
|
+
const _HMSLiveViewerCount = () => {
|
|
22
|
+
const isHLSViewer = useIsHLSViewer();
|
|
23
|
+
const previewPeerCount = useSelector(
|
|
24
|
+
(state: RootState) => state.hmsStates.room?.peerCount
|
|
25
|
+
);
|
|
26
|
+
const live = useSelector(
|
|
27
|
+
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typograhy) => ({
|
|
31
|
+
viewers: {
|
|
32
|
+
backgroundColor: isHLSViewer
|
|
33
|
+
? theme.palette.background_dim &&
|
|
34
|
+
hexToRgbA(theme.palette.background_dim, 0.64)
|
|
35
|
+
: undefined,
|
|
36
|
+
borderWidth: isHLSViewer ? 0 : 1,
|
|
37
|
+
borderColor: theme.palette.border_bright,
|
|
38
|
+
},
|
|
39
|
+
count: {
|
|
40
|
+
color: theme.palette.on_surface_high,
|
|
41
|
+
fontFamily: `${typograhy.font_family}-SemiBold`,
|
|
42
|
+
},
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
const { canShowParticipants, show } = useShowChatAndParticipants();
|
|
46
|
+
|
|
47
|
+
const showParticipantsSheet = () => {
|
|
48
|
+
show('participants');
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
if (!live || typeof previewPeerCount !== 'number') {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<TouchableOpacity
|
|
57
|
+
style={[styles.viewers, hmsRoomStyles.viewers]}
|
|
58
|
+
onPress={showParticipantsSheet}
|
|
59
|
+
disabled={!canShowParticipants}
|
|
60
|
+
>
|
|
61
|
+
<EyeIcon testID={TestIds.peer_count_icon} />
|
|
62
|
+
|
|
63
|
+
<Text testID={TestIds.peer_count} style={[styles.count, hmsRoomStyles.count]}>
|
|
64
|
+
{previewPeerCount}
|
|
65
|
+
</Text>
|
|
66
|
+
</TouchableOpacity>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const HMSLiveViewerCount = React.memo(_HMSLiveViewerCount);
|
|
71
|
+
|
|
72
|
+
const styles = StyleSheet.create({
|
|
73
|
+
viewers: {
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
paddingVertical: 4,
|
|
77
|
+
paddingRight: 8,
|
|
78
|
+
paddingLeft: 6,
|
|
79
|
+
borderRadius: 4,
|
|
80
|
+
},
|
|
81
|
+
count: {
|
|
82
|
+
fontSize: 10,
|
|
83
|
+
lineHeight: Platform.OS === 'android' ? 16 : undefined,
|
|
84
|
+
letterSpacing: 1.5,
|
|
85
|
+
textAlign: 'center',
|
|
86
|
+
textAlignVertical: 'center',
|
|
87
|
+
|
|
88
|
+
marginLeft: 4,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import LinearGradient from 'react-native-linear-gradient';
|
|
4
4
|
import MaskedView from '@react-native-masked-view/masked-view';
|
|
5
|
+
import { useDerivedValue, interpolate } from 'react-native-reanimated';
|
|
6
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
5
7
|
|
|
6
8
|
import { HMSKeyboardAvoidingView } from './HMSKeyboardAvoidingView';
|
|
7
9
|
import { HMSSendMessageInput } from './HMSSendMessageInput';
|
|
@@ -16,12 +18,26 @@ const colors = [
|
|
|
16
18
|
];
|
|
17
19
|
const colorLocations = [0, 0.4, 1];
|
|
18
20
|
|
|
19
|
-
export
|
|
21
|
+
export interface HLSChatViewProps {
|
|
22
|
+
offset?: SharedValue<number>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const HLSChatView: React.FC<HLSChatViewProps> = ({ offset }) => {
|
|
20
26
|
const footerHeight = useFooterHeight();
|
|
21
27
|
const hmsNotificationsHeight = useHMSNotificationsHeight();
|
|
22
28
|
|
|
29
|
+
const chatBottomOffset = useDerivedValue(() => {
|
|
30
|
+
if (offset) {
|
|
31
|
+
return (
|
|
32
|
+
interpolate(offset.value, [0, 1], [0, footerHeight]) +
|
|
33
|
+
hmsNotificationsHeight
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return footerHeight + hmsNotificationsHeight;
|
|
37
|
+
}, [offset, footerHeight, hmsNotificationsHeight]);
|
|
38
|
+
|
|
23
39
|
return (
|
|
24
|
-
<HMSKeyboardAvoidingView bottomOffset={
|
|
40
|
+
<HMSKeyboardAvoidingView bottomOffset={chatBottomOffset}>
|
|
25
41
|
<MaskedView
|
|
26
42
|
maskElement={
|
|
27
43
|
<LinearGradient
|
|
@@ -13,11 +13,20 @@ export const HMSPreviewEditName: React.FC<HMSPreviewEditNameProps> = () => {
|
|
|
13
13
|
const dispatch = useDispatch();
|
|
14
14
|
const { updateConfig } = useHMSConfig();
|
|
15
15
|
const userName = useSelector((state: RootState) => state.user.userName);
|
|
16
|
+
const editUsernameDisabled = useSelector((state: RootState) => state.app.editUsernameDisabled);
|
|
16
17
|
|
|
17
18
|
const handleNameChange = (name: string) => {
|
|
18
19
|
dispatch(changeUsername(name));
|
|
19
20
|
updateConfig({ username: name });
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
return
|
|
23
|
+
return (
|
|
24
|
+
<HMSTextInput
|
|
25
|
+
editable={!editUsernameDisabled}
|
|
26
|
+
testID={TestIds.enter_name}
|
|
27
|
+
value={userName}
|
|
28
|
+
onChangeText={handleNameChange}
|
|
29
|
+
style={editUsernameDisabled ? { opacity: 0.5 } : null}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
23
32
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View, Text, StyleSheet } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
|
+
import { HMSStreamingState } from '@100mslive/react-native-hms';
|
|
4
5
|
|
|
5
6
|
import type { RootState } from '../redux';
|
|
6
7
|
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
@@ -8,7 +9,7 @@ import { COLORS } from '../utils/theme';
|
|
|
8
9
|
|
|
9
10
|
export const HMSPreviewHLSLiveIndicator = () => {
|
|
10
11
|
const isHLSStreaming = useSelector(
|
|
11
|
-
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.
|
|
12
|
+
(state: RootState) => state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED
|
|
12
13
|
);
|
|
13
14
|
|
|
14
15
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
@@ -10,9 +10,20 @@ import { HMSRecordingState } from '@100mslive/react-native-hms';
|
|
|
10
10
|
export const HMSRecordingIndicator = () => {
|
|
11
11
|
const isRecordingOn = useSelector(
|
|
12
12
|
(state: RootState) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
state.hmsStates.room?.browserRecordingState?.state === HMSRecordingState.STARTED ||
|
|
14
|
+
state.hmsStates.room?.browserRecordingState?.state === HMSRecordingState.RESUMED ||
|
|
15
|
+
|
|
16
|
+
state.hmsStates.room?.serverRecordingState?.state === HMSRecordingState.STARTED ||
|
|
17
|
+
state.hmsStates.room?.serverRecordingState?.state === HMSRecordingState.RESUMED ||
|
|
18
|
+
|
|
19
|
+
state.hmsStates.room?.hlsRecordingState?.state === HMSRecordingState.STARTED ||
|
|
20
|
+
state.hmsStates.room?.hlsRecordingState?.state === HMSRecordingState.RESUMED
|
|
21
|
+
);
|
|
22
|
+
const isRecordingPaused = useSelector(
|
|
23
|
+
(state: RootState) =>
|
|
24
|
+
state.hmsStates.room?.browserRecordingState?.state === HMSRecordingState.PAUSED ||
|
|
25
|
+
state.hmsStates.room?.serverRecordingState?.state === HMSRecordingState.PAUSED ||
|
|
26
|
+
state.hmsStates.room?.hlsRecordingState?.state === HMSRecordingState.PAUSED
|
|
16
27
|
);
|
|
17
28
|
const startingOrStoppingRecording = useSelector(
|
|
18
29
|
(state: RootState) =>
|
|
@@ -47,6 +58,12 @@ export const HMSRecordingIndicator = () => {
|
|
|
47
58
|
);
|
|
48
59
|
}
|
|
49
60
|
|
|
61
|
+
if (isRecordingPaused) {
|
|
62
|
+
return (
|
|
63
|
+
<RecordingIcon type='pause' style={[styles.icon, styles.rightSpace]} />
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
50
67
|
return null;
|
|
51
68
|
};
|
|
52
69
|
|
|
@@ -54,7 +54,6 @@ export const HMSRoomOptions: React.FC<HMSRoomOptionsProps> = () => {
|
|
|
54
54
|
<BottomSheet
|
|
55
55
|
isVisible={modalVisible === ModalTypes.SETTINGS}
|
|
56
56
|
dismissModal={dismissModal}
|
|
57
|
-
animationOutTiming={700}
|
|
58
57
|
>
|
|
59
58
|
<RoomSettingsModalContent
|
|
60
59
|
newAudioMixingMode={newAudioMixingMode}
|
|
@@ -73,7 +72,6 @@ export const HMSRoomOptions: React.FC<HMSRoomOptionsProps> = () => {
|
|
|
73
72
|
isVisible={modalVisible === ModalTypes.CHANGE_NAME}
|
|
74
73
|
dismissModal={dismissModal}
|
|
75
74
|
avoidKeyboard={true}
|
|
76
|
-
animationOutTiming={700}
|
|
77
75
|
>
|
|
78
76
|
<ChangeNameModalContent dismissModal={dismissModal} />
|
|
79
77
|
</BottomSheet>
|
|
@@ -81,7 +79,6 @@ export const HMSRoomOptions: React.FC<HMSRoomOptionsProps> = () => {
|
|
|
81
79
|
<BottomSheet
|
|
82
80
|
isVisible={modalVisible === ModalTypes.STOP_RECORDING}
|
|
83
81
|
dismissModal={dismissModal}
|
|
84
|
-
animationOutTiming={800}
|
|
85
82
|
>
|
|
86
83
|
<StopRecordingModalContent dismissModal={dismissModal} />
|
|
87
84
|
</BottomSheet>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React, { memo } from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
SafeAreaView,
|
|
5
|
+
useSafeAreaInsets,
|
|
6
|
+
} from 'react-native-safe-area-context';
|
|
4
7
|
|
|
5
8
|
import { HMSManageCameraRotation } from './HMSManageCameraRotation';
|
|
6
9
|
import { useHMSRoomStyle } from '../hooks-util';
|
|
@@ -8,6 +11,7 @@ import { HMSManageAudioOutput } from './HMSManageAudioOutput';
|
|
|
8
11
|
import { HMSRecordingIndicator } from './HMSRecordingIndicator';
|
|
9
12
|
import { CompanyLogo } from './CompanyLogo';
|
|
10
13
|
import { HMSLiveIndicator } from './HMSLiveIndicator';
|
|
14
|
+
import { HMSLiveViewerCount } from './HMSLiveViewerCount';
|
|
11
15
|
|
|
12
16
|
interface HeaderProps {
|
|
13
17
|
transparent?: boolean;
|
|
@@ -19,6 +23,11 @@ const BOTTOM_PADDING = 16;
|
|
|
19
23
|
const CONTENT_HEIGHT = 42;
|
|
20
24
|
export const HEADER_HEIGHT = TOP_PADDING + CONTENT_HEIGHT + BOTTOM_PADDING;
|
|
21
25
|
|
|
26
|
+
export const useHeaderHeight = (excludeSafeArea: boolean = false) => {
|
|
27
|
+
const { top } = useSafeAreaInsets();
|
|
28
|
+
return (excludeSafeArea ? 0 : top) + HEADER_HEIGHT;
|
|
29
|
+
};
|
|
30
|
+
|
|
22
31
|
export const _Header: React.FC<HeaderProps> = ({
|
|
23
32
|
transparent = false,
|
|
24
33
|
showControls = true,
|
|
@@ -28,14 +37,16 @@ export const _Header: React.FC<HeaderProps> = ({
|
|
|
28
37
|
}));
|
|
29
38
|
|
|
30
39
|
return (
|
|
31
|
-
<SafeAreaView style={transparent ? null : containerStyles} edges={['top']}>
|
|
40
|
+
<SafeAreaView style={transparent ? null : containerStyles} edges={['top','left','right']}>
|
|
32
41
|
<View style={[styles.container, transparent ? null : containerStyles]}>
|
|
33
42
|
<View style={styles.logoContainer}>
|
|
34
43
|
<CompanyLogo style={styles.logo} />
|
|
35
44
|
|
|
45
|
+
<HMSLiveIndicator />
|
|
46
|
+
|
|
36
47
|
<HMSRecordingIndicator />
|
|
37
48
|
|
|
38
|
-
<
|
|
49
|
+
<HMSLiveViewerCount />
|
|
39
50
|
</View>
|
|
40
51
|
|
|
41
52
|
{showControls ? (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
|
+
import { HMSStreamingState } from '@100mslive/react-native-hms';
|
|
4
5
|
|
|
5
6
|
import { LeaveIcon } from '../Icons';
|
|
6
7
|
import { useHMSRoomStyleSheet, useLeaveMethods, useModalType } from '../hooks-util';
|
|
@@ -26,7 +27,7 @@ export const LeaveRoomBottomSheet: React.FC<LeaveRoomBottomSheetProps> = () => {
|
|
|
26
27
|
|
|
27
28
|
const isStreaming = useSelector(
|
|
28
29
|
(state: RootState) =>
|
|
29
|
-
state.hmsStates.room?.hlsStreamingState?.
|
|
30
|
+
state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED ?? false
|
|
30
31
|
);
|
|
31
32
|
|
|
32
33
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
@@ -105,10 +106,9 @@ export const LeaveRoomBottomSheet: React.FC<LeaveRoomBottomSheetProps> = () => {
|
|
|
105
106
|
return (
|
|
106
107
|
<BottomSheet
|
|
107
108
|
isVisible={modalVisibleType === ModalTypes.LEAVE_ROOM}
|
|
108
|
-
|
|
109
|
+
bottomOffsetSpace={0}
|
|
109
110
|
dismissModal={onPopupDismiss}
|
|
110
111
|
onModalHide={handlePopupHide}
|
|
111
|
-
animationOutTiming={700}
|
|
112
112
|
>
|
|
113
113
|
<View>
|
|
114
114
|
<TouchableOpacity
|
|
@@ -176,9 +176,6 @@ export const LeaveRoomBottomSheet: React.FC<LeaveRoomBottomSheetProps> = () => {
|
|
|
176
176
|
};
|
|
177
177
|
|
|
178
178
|
const styles = StyleSheet.create({
|
|
179
|
-
container: {
|
|
180
|
-
paddingBottom: 0,
|
|
181
|
-
},
|
|
182
179
|
button: {
|
|
183
180
|
flexDirection: 'row',
|
|
184
181
|
padding: 24,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
|
-
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
5
4
|
|
|
6
5
|
import type { PeerTrackNode } from '../utils/types';
|
|
7
6
|
import { useRTCStatsListeners } from '../utils/hooks';
|
|
@@ -16,7 +15,6 @@ import {
|
|
|
16
15
|
useHMSReconnection,
|
|
17
16
|
useHMSRemovedFromRoomUpdate,
|
|
18
17
|
useHMSRoomStyle,
|
|
19
|
-
useIsHLSViewer,
|
|
20
18
|
usePIPListener,
|
|
21
19
|
} from '../hooks-util';
|
|
22
20
|
import { MeetingScreenContent } from './MeetingScreenContent';
|
|
@@ -32,8 +30,6 @@ export const Meeting: React.FC<MeetingProps> = ({ peerTrackNodes }) => {
|
|
|
32
30
|
(state: RootState) => state.app.startingHLSStream
|
|
33
31
|
);
|
|
34
32
|
|
|
35
|
-
const isHLSViewer = useIsHLSViewer();
|
|
36
|
-
|
|
37
33
|
// TODO: Fetch latest Room and localPeer on mount of this component?
|
|
38
34
|
|
|
39
35
|
useFetchHMSRoles();
|
|
@@ -76,23 +72,10 @@ export const Meeting: React.FC<MeetingProps> = ({ peerTrackNodes }) => {
|
|
|
76
72
|
return <HMSHLSStreamLoading />;
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
const Container = isHLSViewer ? View : SafeAreaView;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* TODO: disbaled Expended View animation in Webrtc flow
|
|
83
|
-
*
|
|
84
|
-
* Problem: Tiles Flatlist was not scrollable because Root Pressable was registering screen taps.
|
|
85
|
-
* Solution: Try using Tab Gesture detector instead on Pressable component
|
|
86
|
-
*/
|
|
87
75
|
return (
|
|
88
|
-
<
|
|
89
|
-
style={[styles.container, containerStyles]}
|
|
90
|
-
edges={['left', 'right']}
|
|
91
|
-
>
|
|
76
|
+
<View style={[styles.container, containerStyles]}>
|
|
92
77
|
<MeetingScreenContent peerTrackNodes={peerTrackNodes} />
|
|
93
|
-
|
|
94
|
-
{/* {landscapeChatViewVisible ? <ChatView /> : null} */}
|
|
95
|
-
</Container>
|
|
78
|
+
</View>
|
|
96
79
|
);
|
|
97
80
|
};
|
|
98
81
|
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import React, { useCallback, useRef, useState } from 'react';
|
|
2
|
-
import { StyleSheet,
|
|
1
|
+
import React, { useCallback, useRef, useState, useEffect } from 'react';
|
|
2
|
+
import { StyleSheet, View, Keyboard } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
4
|
import {
|
|
5
5
|
Easing,
|
|
6
|
+
KeyboardState,
|
|
6
7
|
cancelAnimation,
|
|
7
8
|
runOnJS,
|
|
8
9
|
useSharedValue,
|
|
9
10
|
withTiming,
|
|
10
11
|
} from 'react-native-reanimated';
|
|
12
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
11
13
|
|
|
12
|
-
import { PipModes } from '../utils/types';
|
|
14
|
+
import { HeaderFooterHideDelayMs, PipModes } from '../utils/types';
|
|
13
15
|
import type { PeerTrackNode } from '../utils/types';
|
|
14
16
|
import type { RootState } from '../redux';
|
|
15
17
|
import { Footer } from './Footer';
|
|
16
18
|
import { DisplayView } from './DisplayView';
|
|
17
19
|
import { Header } from './Header';
|
|
18
|
-
import { useIsHLSViewer } from '../hooks-util';
|
|
20
|
+
import { useIsHLSViewer, useKeyboardState } from '../hooks-util';
|
|
19
21
|
import { HMSStatusBar } from './StatusBar';
|
|
20
22
|
import { AnimatedFooter } from './AnimatedFooter';
|
|
21
23
|
import { HLSFooter } from './HLSFooter';
|
|
22
24
|
import { AnimatedHeader } from './AnimatedHeader';
|
|
23
|
-
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
24
25
|
// import { ReconnectionView } from './ReconnectionView';
|
|
25
26
|
|
|
26
27
|
interface MeetingScreenContentProps {
|
|
@@ -37,80 +38,82 @@ export const MeetingScreenContent: React.FC<MeetingScreenContentProps> = ({
|
|
|
37
38
|
const isPipModeActive = useSelector(
|
|
38
39
|
(state: RootState) => state.app.pipModeStatus === PipModes.ACTIVE
|
|
39
40
|
);
|
|
40
|
-
const
|
|
41
|
+
const { keyboardState } = useKeyboardState();
|
|
41
42
|
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
const dismissKeyboard = useCallback(() => {
|
|
44
|
+
Keyboard.dismiss();
|
|
45
|
+
}, []);
|
|
46
|
+
|
|
47
|
+
const clearTimer = useCallback(() => {
|
|
48
|
+
if (timerIdRef.current !== null) {
|
|
45
49
|
clearTimeout(timerIdRef.current);
|
|
46
50
|
timerIdRef.current = null;
|
|
47
51
|
}
|
|
48
|
-
cancelAnimation(offset);
|
|
49
|
-
offset.value = withTiming(
|
|
50
|
-
offset.value === 1 ? 0 : 1,
|
|
51
|
-
{ duration: 200, easing: Easing.ease },
|
|
52
|
-
(finished) => {
|
|
53
|
-
if (finished) {
|
|
54
|
-
runOnJS(setControlsHidden)(offset.value === 0);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
52
|
}, []);
|
|
59
53
|
|
|
54
|
+
const toggleControls = useCallback((fromTimeout: boolean = false) => {
|
|
55
|
+
'worklet';
|
|
56
|
+
if (
|
|
57
|
+
fromTimeout !== true &&
|
|
58
|
+
(keyboardState.value === KeyboardState.OPEN ||
|
|
59
|
+
keyboardState.value === KeyboardState.OPENING)
|
|
60
|
+
) {
|
|
61
|
+
runOnJS(dismissKeyboard)();
|
|
62
|
+
} else {
|
|
63
|
+
runOnJS(clearTimer)();
|
|
64
|
+
cancelAnimation(offset);
|
|
65
|
+
offset.value = withTiming(
|
|
66
|
+
offset.value === 1 ? 0 : 1,
|
|
67
|
+
{ duration: 200, easing: Easing.ease },
|
|
68
|
+
(finished) => {
|
|
69
|
+
if (finished) {
|
|
70
|
+
runOnJS(setControlsHidden)(offset.value === 0);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
}, [dismissKeyboard, clearTimer]);
|
|
76
|
+
|
|
60
77
|
// Handles Auto hiding the controls for the first time
|
|
61
78
|
// to make this feature discoverable
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// timerIdRef.current = null;
|
|
69
|
-
// toggleControls();
|
|
70
|
-
// }, 3000); d
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
clearTimer();
|
|
81
|
+
timerIdRef.current = setTimeout(() => {
|
|
82
|
+
timerIdRef.current = null;
|
|
83
|
+
toggleControls(true);
|
|
84
|
+
}, HeaderFooterHideDelayMs);
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
// }, [isHLSViewer]);
|
|
86
|
+
return clearTimer;
|
|
87
|
+
}, [clearTimer, toggleControls]);
|
|
88
|
+
|
|
89
|
+
const tapGesture = Gesture.Tap()
|
|
90
|
+
.onEnd(() => toggleControls())
|
|
91
|
+
.requireExternalGestureToFail();
|
|
79
92
|
|
|
80
|
-
/**
|
|
81
|
-
* TODO: disbaled Expended View animation in Webrtc flow
|
|
82
|
-
*
|
|
83
|
-
* Problem: Tiles Flatlist was not scrollable because Root Pressable was registering screen taps.
|
|
84
|
-
* Solution: Try using Tab Gesture detector instead on Pressable component
|
|
85
|
-
*/
|
|
86
93
|
return (
|
|
87
|
-
<
|
|
88
|
-
onPress={toggleControls}
|
|
89
|
-
style={styles.container}
|
|
90
|
-
disabled={isHLSViewer || true}
|
|
91
|
-
>
|
|
94
|
+
<View style={styles.container}>
|
|
92
95
|
<HMSStatusBar hidden={controlsHidden} barStyle={'light-content'} />
|
|
93
96
|
|
|
94
|
-
<
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<DisplayView offset={offset} peerTrackNodes={peerTrackNodes} />
|
|
97
|
+
<GestureDetector gesture={tapGesture}>
|
|
98
|
+
<View collapsable={false} style={styles.container}>
|
|
99
|
+
{isPipModeActive ? null : (
|
|
100
|
+
<AnimatedHeader offset={offset}>
|
|
101
|
+
<Header transparent={isHLSViewer} showControls={!isHLSViewer} />
|
|
102
|
+
</AnimatedHeader>
|
|
103
|
+
)}
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
</View>
|
|
105
|
+
<DisplayView offset={offset} peerTrackNodes={peerTrackNodes} />
|
|
105
106
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
{isPipModeActive ? null : isHLSViewer ? (
|
|
108
|
+
<HLSFooter offset={offset} />
|
|
109
|
+
) : (
|
|
110
|
+
<AnimatedFooter offset={offset}>
|
|
111
|
+
<Footer />
|
|
112
|
+
</AnimatedFooter>
|
|
113
|
+
)}
|
|
114
|
+
</View>
|
|
115
|
+
</GestureDetector>
|
|
116
|
+
</View>
|
|
114
117
|
);
|
|
115
118
|
};
|
|
116
119
|
|
|
@@ -56,8 +56,8 @@ export const MiniView: React.FC<Omit<MiniViewProps, 'insetMode'>> = ({
|
|
|
56
56
|
usePeerMinimizedViewDimensions();
|
|
57
57
|
|
|
58
58
|
const size = {
|
|
59
|
-
width: minimized ? minimizedViewWidth :
|
|
60
|
-
height: minimized ? minimizedViewHeigth :
|
|
59
|
+
width: minimized ? minimizedViewWidth : isLandscapeOrientation ? 178 : 104,
|
|
60
|
+
height: minimized ? minimizedViewHeigth : isLandscapeOrientation ? 98 : 186,
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
const dimensionStyles = {
|
|
@@ -86,7 +86,7 @@ export const MiniView: React.FC<Omit<MiniViewProps, 'insetMode'>> = ({
|
|
|
86
86
|
cornerOffset.x,
|
|
87
87
|
cornerOffset.topY,
|
|
88
88
|
boundingBoxWidth,
|
|
89
|
-
boundingBoxHeight
|
|
89
|
+
boundingBoxHeight
|
|
90
90
|
);
|
|
91
91
|
|
|
92
92
|
const finalX = snapPointX;
|
|
@@ -199,7 +199,7 @@ const getSnappingPoints = (
|
|
|
199
199
|
xCornerOffset: number,
|
|
200
200
|
yCornerOffset: number,
|
|
201
201
|
boundingBoxWidth: number | null,
|
|
202
|
-
boundingBoxHeight: number | null
|
|
202
|
+
boundingBoxHeight: number | null
|
|
203
203
|
) => {
|
|
204
204
|
'worklet';
|
|
205
205
|
if (!boundingBoxWidth || !boundingBoxHeight) {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
2
3
|
|
|
3
4
|
import { HMSNotifications } from './HMSNotifications';
|
|
4
5
|
import { OverlayContainer } from './OverlayContainer';
|
|
5
6
|
import { HLSChatView } from './HMSOverlayChatView';
|
|
6
7
|
import { useShowChatAndParticipants } from '../hooks-util';
|
|
7
8
|
|
|
8
|
-
export type OverlayedViewsProps = {
|
|
9
|
+
export type OverlayedViewsProps = {
|
|
10
|
+
offset: SharedValue<number>;
|
|
11
|
+
};
|
|
9
12
|
|
|
10
|
-
const _OverlayedViews: React.FC<OverlayedViewsProps> = () => {
|
|
13
|
+
const _OverlayedViews: React.FC<OverlayedViewsProps> = ({ offset }) => {
|
|
11
14
|
const { overlayChatVisible } = useShowChatAndParticipants();
|
|
12
15
|
|
|
13
16
|
return (
|
|
14
17
|
<OverlayContainer.Overlay>
|
|
15
|
-
{overlayChatVisible ? <HLSChatView /> : null}
|
|
18
|
+
{overlayChatVisible ? <HLSChatView offset={offset} /> : null}
|
|
16
19
|
|
|
17
20
|
<HMSNotifications />
|
|
18
21
|
</OverlayContainer.Overlay>
|
|
@@ -47,6 +47,7 @@ export const PeerSettingsModalContent: React.FC<
|
|
|
47
47
|
const mininode = state.app.miniviewPeerTrackNode;
|
|
48
48
|
return mininode && mininode.id === peerTrackNode.id;
|
|
49
49
|
});
|
|
50
|
+
const editUsernameDisabled = useSelector((state: RootState) => state.app.editUsernameDisabled);
|
|
50
51
|
|
|
51
52
|
const removeTextStyle = useHMSRoomStyle((theme) => ({
|
|
52
53
|
color: theme.palette.alert_error_default,
|
|
@@ -123,7 +124,7 @@ export const PeerSettingsModalContent: React.FC<
|
|
|
123
124
|
|
|
124
125
|
{/* Content */}
|
|
125
126
|
<View style={styles.contentContainer}>
|
|
126
|
-
{peer.isLocal ? (
|
|
127
|
+
{peer.isLocal && !editUsernameDisabled ? (
|
|
127
128
|
<SettingItem
|
|
128
129
|
testID={TestIds.tile_modal_change_name_btn}
|
|
129
130
|
text={'Change Name'}
|
|
@@ -52,6 +52,7 @@ export const _PeerVideoTileView = React.forwardRef<
|
|
|
52
52
|
const isPipModeActive = useSelector(
|
|
53
53
|
(state: RootState) => state.app.pipModeStatus === PipModes.ACTIVE
|
|
54
54
|
);
|
|
55
|
+
const editUsernameDisabled = useSelector((state: RootState) => state.app.editUsernameDisabled);
|
|
55
56
|
|
|
56
57
|
const onSpotlight = useSelector((state: RootState) => {
|
|
57
58
|
const { onSpotlight } = isTileOnSpotlight(state.user.spotlightTrackId, {
|
|
@@ -101,7 +102,7 @@ export const _PeerVideoTileView = React.forwardRef<
|
|
|
101
102
|
|
|
102
103
|
const canTakeActionOnPeer = useSelector((state: RootState) => {
|
|
103
104
|
if (peer.isLocal) {
|
|
104
|
-
return
|
|
105
|
+
return !editUsernameDisabled || insetMode;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
const permissions = state.hmsStates.localPeer?.role?.permissions;
|