@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.
Files changed (277) hide show
  1. package/lib/commonjs/Icons/Recording/assets/recording-pause.png +0 -0
  2. package/lib/commonjs/Icons/Recording/assets/recording-pause@2x.png +0 -0
  3. package/lib/commonjs/Icons/Recording/assets/recording-pause@3x.png +0 -0
  4. package/lib/commonjs/Icons/Recording/index.js +1 -1
  5. package/lib/commonjs/Icons/Recording/index.js.map +1 -1
  6. package/lib/commonjs/components/AnimatedFooter.js +5 -3
  7. package/lib/commonjs/components/AnimatedFooter.js.map +1 -1
  8. package/lib/commonjs/components/AnimatedHLSFooter.js +4 -9
  9. package/lib/commonjs/components/AnimatedHLSFooter.js.map +1 -1
  10. package/lib/commonjs/components/AnimatedHeader.js +17 -5
  11. package/lib/commonjs/components/AnimatedHeader.js.map +1 -1
  12. package/lib/commonjs/components/BottomSheet.js +11 -5
  13. package/lib/commonjs/components/BottomSheet.js.map +1 -1
  14. package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +2 -1
  15. package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
  16. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +11 -10
  17. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
  18. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js +5 -3
  19. package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
  20. package/lib/commonjs/components/DisplayView.js +4 -11
  21. package/lib/commonjs/components/DisplayView.js.map +1 -1
  22. package/lib/commonjs/components/EndRoomModal.js +1 -2
  23. package/lib/commonjs/components/EndRoomModal.js.map +1 -1
  24. package/lib/commonjs/components/EndRoomModalContent.js +2 -1
  25. package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
  26. package/lib/commonjs/components/Footer.js +12 -18
  27. package/lib/commonjs/components/Footer.js.map +1 -1
  28. package/lib/commonjs/components/GridView.js +31 -1
  29. package/lib/commonjs/components/GridView.js.map +1 -1
  30. package/lib/commonjs/components/HLSFooter.js +3 -1
  31. package/lib/commonjs/components/HLSFooter.js.map +1 -1
  32. package/lib/commonjs/components/HLSView.js +1 -1
  33. package/lib/commonjs/components/HLSView.js.map +1 -1
  34. package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js +2 -0
  35. package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -1
  36. package/lib/commonjs/components/HMSKeyboardAvoidingView.js +3 -1
  37. package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
  38. package/lib/commonjs/components/HMSLiveIndicator.js +6 -57
  39. package/lib/commonjs/components/HMSLiveIndicator.js.map +1 -1
  40. package/lib/commonjs/components/HMSLiveViewerCount.js +78 -0
  41. package/lib/commonjs/components/HMSLiveViewerCount.js.map +1 -0
  42. package/lib/commonjs/components/HMSOverlayChatView.js +11 -2
  43. package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
  44. package/lib/commonjs/components/HMSPreviewEditName.js +6 -1
  45. package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
  46. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +2 -1
  47. package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
  48. package/lib/commonjs/components/HMSRecordingIndicator.js +14 -4
  49. package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
  50. package/lib/commonjs/components/HMSRoomOptions.js +3 -6
  51. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  52. package/lib/commonjs/components/Header.js +11 -3
  53. package/lib/commonjs/components/Header.js.map +1 -1
  54. package/lib/commonjs/components/LeaveRoomBottomSheet.js +4 -7
  55. package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -1
  56. package/lib/commonjs/components/Meeting.js +2 -13
  57. package/lib/commonjs/components/Meeting.js.map +1 -1
  58. package/lib/commonjs/components/MeetingScreenContent.js +46 -48
  59. package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
  60. package/lib/commonjs/components/MiniView.js.map +1 -1
  61. package/lib/commonjs/components/OverlayedViews.js +6 -2
  62. package/lib/commonjs/components/OverlayedViews.js.map +1 -1
  63. package/lib/commonjs/components/PeerSettingsModalContent.js +2 -1
  64. package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
  65. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +2 -1
  66. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  67. package/lib/commonjs/components/PressableIcon.js +6 -2
  68. package/lib/commonjs/components/PressableIcon.js.map +1 -1
  69. package/lib/commonjs/components/RoomSettingsModalContent.js +25 -9
  70. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  71. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js +1 -1
  72. package/lib/commonjs/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  73. package/lib/commonjs/components/WebrtcView.js +37 -2
  74. package/lib/commonjs/components/WebrtcView.js.map +1 -1
  75. package/lib/commonjs/hooks-util-selectors.js +2 -1
  76. package/lib/commonjs/hooks-util-selectors.js.map +1 -1
  77. package/lib/commonjs/hooks-util.js +59 -29
  78. package/lib/commonjs/hooks-util.js.map +1 -1
  79. package/lib/commonjs/redux/actionTypes.js +3 -1
  80. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  81. package/lib/commonjs/redux/actions/index.js +8 -1
  82. package/lib/commonjs/redux/actions/index.js.map +1 -1
  83. package/lib/commonjs/redux/reducers/appState.js +9 -1
  84. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  85. package/lib/commonjs/utils/types.js +3 -3
  86. package/lib/commonjs/utils/types.js.map +1 -1
  87. package/lib/module/Icons/Recording/assets/recording-pause.png +0 -0
  88. package/lib/module/Icons/Recording/assets/recording-pause@2x.png +0 -0
  89. package/lib/module/Icons/Recording/assets/recording-pause@3x.png +0 -0
  90. package/lib/module/Icons/Recording/index.js +1 -1
  91. package/lib/module/Icons/Recording/index.js.map +1 -1
  92. package/lib/module/components/AnimatedFooter.js +5 -3
  93. package/lib/module/components/AnimatedFooter.js.map +1 -1
  94. package/lib/module/components/AnimatedHLSFooter.js +5 -10
  95. package/lib/module/components/AnimatedHLSFooter.js.map +1 -1
  96. package/lib/module/components/AnimatedHeader.js +18 -6
  97. package/lib/module/components/AnimatedHeader.js.map +1 -1
  98. package/lib/module/components/BottomSheet.js +12 -6
  99. package/lib/module/components/BottomSheet.js.map +1 -1
  100. package/lib/module/components/Chat/ChatFilterBottomSheetView.js +2 -1
  101. package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
  102. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +13 -12
  103. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
  104. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js +6 -4
  105. package/lib/module/components/ChatAndParticipants/ChatAndParticipantsView.js.map +1 -1
  106. package/lib/module/components/DisplayView.js +5 -12
  107. package/lib/module/components/DisplayView.js.map +1 -1
  108. package/lib/module/components/EndRoomModal.js +1 -2
  109. package/lib/module/components/EndRoomModal.js.map +1 -1
  110. package/lib/module/components/EndRoomModalContent.js +2 -1
  111. package/lib/module/components/EndRoomModalContent.js.map +1 -1
  112. package/lib/module/components/Footer.js +12 -18
  113. package/lib/module/components/Footer.js.map +1 -1
  114. package/lib/module/components/GridView.js +32 -2
  115. package/lib/module/components/GridView.js.map +1 -1
  116. package/lib/module/components/HLSFooter.js +3 -1
  117. package/lib/module/components/HLSFooter.js.map +1 -1
  118. package/lib/module/components/HLSView.js +2 -2
  119. package/lib/module/components/HLSView.js.map +1 -1
  120. package/lib/module/components/HMSKeyboardAvoidingView.android.js +2 -3
  121. package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -1
  122. package/lib/module/components/HMSKeyboardAvoidingView.js +3 -1
  123. package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
  124. package/lib/module/components/HMSLiveIndicator.js +9 -60
  125. package/lib/module/components/HMSLiveIndicator.js.map +1 -1
  126. package/lib/module/components/HMSLiveViewerCount.js +70 -0
  127. package/lib/module/components/HMSLiveViewerCount.js.map +1 -0
  128. package/lib/module/components/HMSOverlayChatView.js +11 -2
  129. package/lib/module/components/HMSOverlayChatView.js.map +1 -1
  130. package/lib/module/components/HMSPreviewEditName.js +6 -1
  131. package/lib/module/components/HMSPreviewEditName.js.map +1 -1
  132. package/lib/module/components/HMSPreviewHLSLiveIndicator.js +2 -1
  133. package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -1
  134. package/lib/module/components/HMSRecordingIndicator.js +14 -4
  135. package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
  136. package/lib/module/components/HMSRoomOptions.js +3 -6
  137. package/lib/module/components/HMSRoomOptions.js.map +1 -1
  138. package/lib/module/components/Header.js +10 -3
  139. package/lib/module/components/Header.js.map +1 -1
  140. package/lib/module/components/LeaveRoomBottomSheet.js +4 -7
  141. package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
  142. package/lib/module/components/Meeting.js +3 -14
  143. package/lib/module/components/Meeting.js.map +1 -1
  144. package/lib/module/components/MeetingScreenContent.js +51 -53
  145. package/lib/module/components/MeetingScreenContent.js.map +1 -1
  146. package/lib/module/components/MiniView.js.map +1 -1
  147. package/lib/module/components/OverlayedViews.js +6 -2
  148. package/lib/module/components/OverlayedViews.js.map +1 -1
  149. package/lib/module/components/PeerSettingsModalContent.js +2 -1
  150. package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
  151. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +2 -1
  152. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  153. package/lib/module/components/PressableIcon.js +6 -2
  154. package/lib/module/components/PressableIcon.js.map +1 -1
  155. package/lib/module/components/RoomSettingsModalContent.js +26 -10
  156. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  157. package/lib/module/components/RoomSettingsModalDebugModeContent.js +2 -2
  158. package/lib/module/components/RoomSettingsModalDebugModeContent.js.map +1 -1
  159. package/lib/module/components/WebrtcView.js +37 -2
  160. package/lib/module/components/WebrtcView.js.map +1 -1
  161. package/lib/module/hooks-util-selectors.js +2 -1
  162. package/lib/module/hooks-util-selectors.js.map +1 -1
  163. package/lib/module/hooks-util.js +58 -29
  164. package/lib/module/hooks-util.js.map +1 -1
  165. package/lib/module/redux/actionTypes.js +3 -1
  166. package/lib/module/redux/actionTypes.js.map +1 -1
  167. package/lib/module/redux/actions/index.js +6 -0
  168. package/lib/module/redux/actions/index.js.map +1 -1
  169. package/lib/module/redux/reducers/appState.js +9 -1
  170. package/lib/module/redux/reducers/appState.js.map +1 -1
  171. package/lib/module/utils/types.js +2 -2
  172. package/lib/module/utils/types.js.map +1 -1
  173. package/lib/typescript/Icons/Recording/index.d.ts +1 -1
  174. package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
  175. package/lib/typescript/components/AnimatedFooter.d.ts.map +1 -1
  176. package/lib/typescript/components/AnimatedHLSFooter.d.ts.map +1 -1
  177. package/lib/typescript/components/AnimatedHeader.d.ts.map +1 -1
  178. package/lib/typescript/components/BottomSheet.d.ts +1 -0
  179. package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
  180. package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts.map +1 -1
  181. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
  182. package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsView.d.ts.map +1 -1
  183. package/lib/typescript/components/DisplayView.d.ts.map +1 -1
  184. package/lib/typescript/components/EndRoomModal.d.ts.map +1 -1
  185. package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
  186. package/lib/typescript/components/Footer.d.ts +1 -1
  187. package/lib/typescript/components/Footer.d.ts.map +1 -1
  188. package/lib/typescript/components/GridView.d.ts.map +1 -1
  189. package/lib/typescript/components/HLSView.d.ts.map +1 -1
  190. package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts.map +1 -1
  191. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +2 -1
  192. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
  193. package/lib/typescript/components/HMSLiveIndicator.d.ts.map +1 -1
  194. package/lib/typescript/components/HMSLiveViewerCount.d.ts +3 -0
  195. package/lib/typescript/components/HMSLiveViewerCount.d.ts.map +1 -0
  196. package/lib/typescript/components/HMSOverlayChatView.d.ts +5 -1
  197. package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
  198. package/lib/typescript/components/HMSPreviewEditName.d.ts.map +1 -1
  199. package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -1
  200. package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
  201. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
  202. package/lib/typescript/components/Header.d.ts +1 -0
  203. package/lib/typescript/components/Header.d.ts.map +1 -1
  204. package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -1
  205. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  206. package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
  207. package/lib/typescript/components/OverlayedViews.d.ts +4 -1
  208. package/lib/typescript/components/OverlayedViews.d.ts.map +1 -1
  209. package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
  210. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
  211. package/lib/typescript/components/PressableIcon.d.ts.map +1 -1
  212. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  213. package/lib/typescript/components/RoomSettingsModalDebugModeContent.d.ts.map +1 -1
  214. package/lib/typescript/components/WebrtcView.d.ts +2 -0
  215. package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
  216. package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
  217. package/lib/typescript/hooks-util.d.ts +4 -0
  218. package/lib/typescript/hooks-util.d.ts.map +1 -1
  219. package/lib/typescript/redux/actionTypes.d.ts +1 -0
  220. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  221. package/lib/typescript/redux/actions/index.d.ts +6 -0
  222. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  223. package/lib/typescript/redux/index.d.ts +1 -0
  224. package/lib/typescript/redux/index.d.ts.map +1 -1
  225. package/lib/typescript/redux/reducers/appState.d.ts +1 -0
  226. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  227. package/lib/typescript/redux/reducers/index.d.ts +1 -0
  228. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  229. package/lib/typescript/utils/types.d.ts +1 -0
  230. package/lib/typescript/utils/types.d.ts.map +1 -1
  231. package/package.json +179 -179
  232. package/src/HMSRoomSetup.tsx +1 -1
  233. package/src/Icons/Recording/assets/recording-pause.png +0 -0
  234. package/src/Icons/Recording/assets/recording-pause@2x.png +0 -0
  235. package/src/Icons/Recording/assets/recording-pause@3x.png +0 -0
  236. package/src/Icons/Recording/index.tsx +3 -1
  237. package/src/components/AnimatedFooter.tsx +9 -3
  238. package/src/components/AnimatedHLSFooter.tsx +8 -17
  239. package/src/components/AnimatedHeader.tsx +16 -5
  240. package/src/components/BottomSheet.tsx +11 -5
  241. package/src/components/Chat/ChatFilterBottomSheetView.tsx +1 -0
  242. package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +12 -7
  243. package/src/components/ChatAndParticipants/ChatAndParticipantsView.tsx +5 -4
  244. package/src/components/DisplayView.tsx +4 -13
  245. package/src/components/EndRoomModal.tsx +0 -1
  246. package/src/components/EndRoomModalContent.tsx +2 -1
  247. package/src/components/Footer.tsx +18 -23
  248. package/src/components/GridView.tsx +31 -4
  249. package/src/components/HLSFooter.tsx +1 -1
  250. package/src/components/HLSView.tsx +2 -1
  251. package/src/components/HMSKeyboardAvoidingView.android.tsx +1 -5
  252. package/src/components/HMSKeyboardAvoidingView.tsx +6 -3
  253. package/src/components/HMSLiveIndicator.tsx +8 -73
  254. package/src/components/HMSLiveViewerCount.tsx +90 -0
  255. package/src/components/HMSOverlayChatView.tsx +18 -2
  256. package/src/components/HMSPreviewEditName.tsx +10 -1
  257. package/src/components/HMSPreviewHLSLiveIndicator.tsx +2 -1
  258. package/src/components/HMSRecordingIndicator.tsx +20 -3
  259. package/src/components/HMSRoomOptions.tsx +0 -3
  260. package/src/components/Header.tsx +14 -3
  261. package/src/components/LeaveRoomBottomSheet.tsx +3 -6
  262. package/src/components/Meeting.tsx +2 -19
  263. package/src/components/MeetingScreenContent.tsx +67 -64
  264. package/src/components/MiniView.tsx +4 -4
  265. package/src/components/OverlayedViews.tsx +6 -3
  266. package/src/components/PeerSettingsModalContent.tsx +2 -1
  267. package/src/components/PeerVideoTile/PeerVideoTileView.tsx +2 -1
  268. package/src/components/PressableIcon.tsx +22 -17
  269. package/src/components/RoomSettingsModalContent.tsx +22 -6
  270. package/src/components/RoomSettingsModalDebugModeContent.tsx +2 -1
  271. package/src/components/WebrtcView.tsx +59 -22
  272. package/src/hooks-util-selectors.tsx +2 -1
  273. package/src/hooks-util.ts +61 -44
  274. package/src/redux/actionTypes.ts +3 -0
  275. package/src/redux/actions/index.ts +5 -0
  276. package/src/redux/reducers/appState.ts +8 -0
  277. 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 const HLSChatView = () => {
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={footerHeight + hmsNotificationsHeight}>
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 <HMSTextInput testID={TestIds.enter_name} value={userName} onChangeText={handleNameChange} />;
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?.running
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
- !!state.hmsStates.room?.browserRecordingState?.running ||
14
- !!state.hmsStates.room?.serverRecordingState?.running ||
15
- !!state.hmsStates.room?.hlsRecordingState?.running
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 { SafeAreaView } from 'react-native-safe-area-context';
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
- <HMSLiveIndicator />
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?.running ?? false
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
- containerStyle={styles.container}
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
- <Container
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, Pressable, View } from 'react-native';
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 isLandscapeOrientation = useIsLandscapeOrientation();
41
+ const { keyboardState } = useKeyboardState();
41
42
 
42
- const toggleControls = useCallback(() => {
43
- 'worklet';
44
- if (timerIdRef.current) {
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
- // useEffect(() => {
63
- // if (false && !isHLSViewer) {
64
- // if (timerIdRef.current) {
65
- // clearTimeout(timerIdRef.current);
66
- // }
67
- // timerIdRef.current = setTimeout(() => {
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
- // return () => {
73
- // if (timerIdRef.current) {
74
- // clearTimeout(timerIdRef.current);
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
- <Pressable
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
- <View style={styles.reconnectionWrapper}>
95
- {isPipModeActive || isLandscapeOrientation ? null : (
96
- <AnimatedHeader offset={offset}>
97
- <Header transparent={isHLSViewer} showControls={!isHLSViewer} />
98
- </AnimatedHeader>
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
- {/* <ReconnectionView /> */}
104
- </View>
105
+ <DisplayView offset={offset} peerTrackNodes={peerTrackNodes} />
105
106
 
106
- {isPipModeActive ? null : isHLSViewer ? (
107
- <HLSFooter offset={offset} />
108
- ) : (
109
- <AnimatedFooter offset={offset}>
110
- <Footer />
111
- </AnimatedFooter>
112
- )}
113
- </Pressable>
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 : (isLandscapeOrientation ? 178 : 104),
60
- height: minimized ? minimizedViewHeigth : (isLandscapeOrientation ? 98 : 186),
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 true;
105
+ return !editUsernameDisabled || insetMode;
105
106
  }
106
107
 
107
108
  const permissions = state.hmsStates.localPeer?.role?.permissions;