@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
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import Modal from 'react-native-modal';
3
3
  import type { ReactNativeModal } from 'react-native-modal';
4
- import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
4
+ import { KeyboardAvoidingView, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
5
5
  import type {
6
6
  StyleProp,
7
7
  TextProps,
@@ -26,6 +26,7 @@ export type BottomSheetProps = WithRequired<
26
26
  // closes modal and no action will be taken after modal has been closed
27
27
  dismissModal(): void;
28
28
  containerStyle?: StyleProp<ViewStyle>;
29
+ bottomOffsetSpace?: number;
29
30
  fullWidth?: boolean;
30
31
  };
31
32
 
@@ -38,6 +39,7 @@ export const BottomSheet: React.FC<BottomSheetProps> & {
38
39
  style,
39
40
  children,
40
41
  containerStyle,
42
+ bottomOffsetSpace = 32,
41
43
  ...resetProps
42
44
  }) => {
43
45
  const { background_dim: backgroundDimColor } = useHMSRoomColorPalette();
@@ -50,6 +52,8 @@ export const BottomSheet: React.FC<BottomSheetProps> & {
50
52
 
51
53
  const isLandscapeOrientation = useIsLandscapeOrientation();
52
54
 
55
+ const Container = resetProps.avoidKeyboard && Platform.OS === 'android' ? KeyboardAvoidingView : View;
56
+
53
57
  return (
54
58
  <Modal
55
59
  {...resetProps}
@@ -71,7 +75,8 @@ export const BottomSheet: React.FC<BottomSheetProps> & {
71
75
  }
72
76
  statusBarTranslucent={true}
73
77
  >
74
- <View
78
+ <Container
79
+ behavior='padding'
75
80
  style={[
76
81
  isLandscapeOrientation && !fullWidth
77
82
  ? styles.landscapeContainer
@@ -81,7 +86,10 @@ export const BottomSheet: React.FC<BottomSheetProps> & {
81
86
  ]}
82
87
  >
83
88
  {children}
84
- </View>
89
+ {typeof bottomOffsetSpace === 'number' && bottomOffsetSpace > 0 ? (
90
+ <View style={{ height: bottomOffsetSpace, width: '100%' }} />
91
+ ) : null}
92
+ </Container>
85
93
  </Modal>
86
94
  );
87
95
  };
@@ -198,11 +206,9 @@ const styles = StyleSheet.create({
198
206
  container: {
199
207
  borderTopLeftRadius: 16,
200
208
  borderTopRightRadius: 16,
201
- paddingBottom: 32,
202
209
  },
203
210
  landscapeContainer: {
204
211
  borderRadius: 16,
205
- paddingBottom: 32,
206
212
  width: '60%',
207
213
  alignSelf: 'center',
208
214
  marginBottom: 12,
@@ -69,6 +69,7 @@ const styles = StyleSheet.create({
69
69
  height: '100%',
70
70
  zIndex: 1,
71
71
  justifyContent: 'flex-end',
72
+ alignSelf: 'center',
72
73
  },
73
74
  backdrop: {
74
75
  position: 'absolute',
@@ -1,19 +1,24 @@
1
1
  import * as React from 'react';
2
2
  import { StyleSheet } from 'react-native';
3
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
3
 
5
4
  import { BottomSheet } from '../BottomSheet';
6
- import { useShowChatAndParticipants } from '../../hooks-util';
5
+ import { useHMSRoomStyleSheet, useShowChatAndParticipants } from '../../hooks-util';
7
6
  import { ChatAndParticipantsView } from './ChatAndParticipantsView';
8
- import { HEADER_HEIGHT } from '../Header';
7
+ import { useHeaderHeight } from '../Header';
9
8
  import { useIsLandscapeOrientation } from '../../utils/dimension';
10
9
 
11
10
  export const ChatAndParticipantsBottomSheet = () => {
12
- const { top: topSafeArea } = useSafeAreaInsets();
11
+ const headerHeight = useHeaderHeight();
13
12
  const isLandscapeOrientation = useIsLandscapeOrientation();
14
13
 
15
14
  const { modalVisible, hide } = useShowChatAndParticipants();
16
15
 
16
+ const hmsRoomStyles = useHMSRoomStyleSheet((theme) => ({
17
+ contentContainer: {
18
+ backgroundColor: theme.palette.surface_dim,
19
+ },
20
+ }));
21
+
17
22
  const closeChatWindow = () => hide('modal');
18
23
 
19
24
  return (
@@ -24,10 +29,12 @@ export const ChatAndParticipantsBottomSheet = () => {
24
29
  avoidKeyboard={true}
25
30
  containerStyle={[
26
31
  styles.bottomSheet,
32
+ hmsRoomStyles.contentContainer,
27
33
  {
28
- marginTop: topSafeArea + (isLandscapeOrientation ? 0 : HEADER_HEIGHT),
34
+ marginTop: isLandscapeOrientation ? 0 : headerHeight,
29
35
  },
30
36
  ]}
37
+ bottomOffsetSpace={0}
31
38
  >
32
39
  <ChatAndParticipantsView />
33
40
  </BottomSheet>
@@ -37,7 +44,5 @@ export const ChatAndParticipantsBottomSheet = () => {
37
44
  const styles = StyleSheet.create({
38
45
  bottomSheet: {
39
46
  flex: 1,
40
- backgroundColor: undefined,
41
- paddingBottom: 0,
42
47
  },
43
48
  });
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useSelector } from 'react-redux';
3
- import { StyleSheet, View } from 'react-native';
3
+ import { Platform, StyleSheet, View } from 'react-native';
4
+ import { SafeAreaView } from 'react-native-safe-area-context';
4
5
 
5
6
  import {
6
7
  useHMSRoomStyleSheet,
@@ -35,7 +36,7 @@ const _ChatAndParticipantsView: React.FC = () => {
35
36
  activeChatBottomSheetTab === 'Chat' && canShowChat && !overlayChatLayout;
36
37
 
37
38
  return (
38
- <View style={styles.container}>
39
+ <SafeAreaView style={styles.container} edges={['left', 'right']}>
39
40
  <View
40
41
  style={[
41
42
  styles.contentContainer,
@@ -55,7 +56,7 @@ const _ChatAndParticipantsView: React.FC = () => {
55
56
  </View>
56
57
 
57
58
  <ChatFilterBottomSheetView />
58
- </View>
59
+ </SafeAreaView>
59
60
  );
60
61
  };
61
62
 
@@ -68,7 +69,7 @@ const styles = StyleSheet.create({
68
69
  flex: 1,
69
70
  paddingHorizontal: 16,
70
71
  paddingTop: 12,
71
- paddingBottom: 32,
72
+ paddingBottom: Platform.OS === 'ios' ? 32 : 0,
72
73
  borderTopLeftRadius: 16,
73
74
  borderTopRightRadius: 16,
74
75
  },
@@ -1,11 +1,7 @@
1
1
  import React, { useRef, useState } from 'react';
2
2
  import { useSelector } from 'react-redux';
3
- import { InteractionManager } from 'react-native';
3
+ import { InteractionManager, View } from 'react-native';
4
4
  import { HMSTrack, HMSCameraControl } from '@100mslive/react-native-hms';
5
- import Animated, {
6
- interpolate,
7
- useAnimatedStyle,
8
- } from 'react-native-reanimated';
9
5
  import type { SharedValue } from 'react-native-reanimated';
10
6
 
11
7
  import { DefaultModal } from './DefaultModal';
@@ -132,19 +128,14 @@ export const DisplayView: React.FC<DisplayViewProps> = ({
132
128
  setModalVisible(ModalTypes.STREAMING_QUALITY_SETTING, true);
133
129
  };
134
130
 
135
- const animatedStyles = useAnimatedStyle(() => {
136
- return {
137
- transform: [{ translateY: interpolate(offset.value, [0, 1], [4, 0]) }],
138
- };
139
- }, []);
140
-
141
131
  return (
142
- <Animated.View style={[{ flex: 1 }, animatedStyles]}>
132
+ <View style={{ flex: 1 }}>
143
133
  {isHLSViewer ? (
144
134
  <HLSView />
145
135
  ) : (
146
136
  <WebrtcView
147
137
  ref={gridViewRef}
138
+ offset={offset}
148
139
  peerTrackNodes={peerTrackNodes}
149
140
  handlePeerTileMorePress={handlePeerTileMorePress}
150
141
  />
@@ -239,6 +230,6 @@ export const DisplayView: React.FC<DisplayViewProps> = ({
239
230
  </DefaultModal>
240
231
  </>
241
232
  )}
242
- </Animated.View>
233
+ </View>
243
234
  );
244
235
  };
@@ -16,7 +16,6 @@ export const EndRoomModal: React.FC<EndRoomModalProps> = () => {
16
16
  <BottomSheet
17
17
  dismissModal={dismissModal}
18
18
  isVisible={modalVisibleType === ModalTypes.END_ROOM}
19
- animationOutTiming={700}
20
19
  >
21
20
  <EndRoomModalContent dismissModal={dismissModal} />
22
21
  </BottomSheet>
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useSelector } from 'react-redux';
3
3
  import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
4
+ import { HMSStreamingState } from '@100mslive/react-native-hms';
4
5
 
5
6
  import { useHMSRoomStyleSheet, useLeaveMethods } from '../hooks-util';
6
7
  import { AlertTriangleIcon, CloseIcon } from '../Icons';
@@ -40,7 +41,7 @@ export const EndRoomModalContent: React.FC<EndRoomModalContentProps> = ({
40
41
 
41
42
  const isStreaming = useSelector(
42
43
  (state: RootState) =>
43
- state.hmsStates.room?.hlsStreamingState?.running ?? false
44
+ state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED ?? false
44
45
  );
45
46
 
46
47
  return (
@@ -24,7 +24,6 @@ import {
24
24
  } from '../hooks-sdk';
25
25
  import { useSelector } from 'react-redux';
26
26
  import type { RootState } from '../redux';
27
- import { useIsLandscapeOrientation } from '../utils/dimension';
28
27
 
29
28
  interface FooterProps {}
30
29
 
@@ -33,7 +32,7 @@ export const _Footer: React.FC<FooterProps> = () => {
33
32
  const canPublishAudio = useCanPublishAudio();
34
33
  const canPublishVideo = useCanPublishVideo();
35
34
  const canPublishScreen = useCanPublishScreen();
36
- const isLandscapeOrientation = useIsLandscapeOrientation();
35
+ const editUsernameDisabled = useSelector((state: RootState) => state.app.editUsernameDisabled);
37
36
 
38
37
  const isViewer = !(canPublishAudio || canPublishVideo || canPublishScreen);
39
38
 
@@ -54,12 +53,18 @@ export const _Footer: React.FC<FooterProps> = () => {
54
53
  !!state.hmsStates.localPeer?.role?.permissions?.browserRecording
55
54
  );
56
55
 
56
+ const canEditUsernameFromRoomModal = isViewer && !editUsernameDisabled;
57
+
58
+ const canShowHandRaiseInFooter = !isOnStage && isViewer; // on_stage_exp object undefined && viewer -> show in footer
59
+ const canShowHandRaiseInRoomModal = !isOnStage && !isViewer; // on_stage_exp object undefined && publisher -> show in room modal
60
+
57
61
  const canShowOptions =
58
- isViewer ||
59
- canPublishScreen ||
60
62
  canShowParticipants ||
63
+ canPublishScreen ||
61
64
  canShowBRB ||
62
- canStartRecording;
65
+ canShowHandRaiseInRoomModal ||
66
+ canStartRecording ||
67
+ canEditUsernameFromRoomModal;
63
68
 
64
69
  const footerActionButtons = useMemo(() => {
65
70
  const actions = [];
@@ -68,7 +73,7 @@ export const _Footer: React.FC<FooterProps> = () => {
68
73
  actions.push('chat');
69
74
  }
70
75
 
71
- if (!isOnStage && isViewer) {
76
+ if (canShowHandRaiseInFooter) {
72
77
  actions.unshift('hand-raise');
73
78
  }
74
79
 
@@ -88,10 +93,9 @@ export const _Footer: React.FC<FooterProps> = () => {
88
93
 
89
94
  return actions;
90
95
  }, [
91
- isOnStage,
96
+ canShowHandRaiseInFooter,
92
97
  canShowOptions,
93
98
  canShowChat,
94
- isViewer,
95
99
  canPublishAudio,
96
100
  canPublishVideo,
97
101
  ]);
@@ -103,11 +107,11 @@ export const _Footer: React.FC<FooterProps> = () => {
103
107
  return (
104
108
  <SafeAreaView
105
109
  style={isHLSViewer ? null : containerStyles}
106
- edges={['bottom']}
110
+ edges={['bottom', 'left', 'right']}
107
111
  >
108
112
  <View
109
113
  style={[
110
- isLandscapeOrientation ? styles.landscapeContainer : styles.container,
114
+ styles.container,
111
115
  isHLSViewer ? styles.hlsContainer : containerStyles,
112
116
  ]}
113
117
  >
@@ -138,15 +142,14 @@ export const _Footer: React.FC<FooterProps> = () => {
138
142
  );
139
143
  };
140
144
 
141
- export const useFooterHeight = () => {
145
+ export const useFooterHeight = (excludeSafeArea: boolean = false) => {
142
146
  const isHLSViewer = useIsHLSViewer();
143
- const isLandscapeOrientation = useIsLandscapeOrientation();
144
147
  const { bottom } = useSafeAreaInsets();
145
148
 
146
149
  return (
147
- bottom +
148
- (isHLSViewer ? 8 : isLandscapeOrientation ? 4 : 16) +
149
- (Platform.OS === 'android' ? (isLandscapeOrientation ? 4 : 16) : 0) +
150
+ (excludeSafeArea ? 0 : bottom) +
151
+ (isHLSViewer ? 8 : 16) +
152
+ (Platform.OS === 'android' ? 16 : 0) +
150
153
  40
151
154
  ); // bottomSafeArea + paddingTop + marginBottom + content
152
155
  };
@@ -160,14 +163,6 @@ const styles = StyleSheet.create({
160
163
  justifyContent: 'center',
161
164
  marginBottom: Platform.OS === 'android' ? 16 : 0, // TODO: need to correct hide animation offsets because of this change
162
165
  },
163
- landscapeContainer: {
164
- paddingTop: 4,
165
- paddingHorizontal: 4,
166
- flexDirection: 'row',
167
- alignItems: 'center',
168
- justifyContent: 'center',
169
- marginBottom: Platform.OS === 'android' ? 4 : 0,
170
- },
171
166
  hlsContainer: {
172
167
  paddingTop: 8,
173
168
  },
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useState, useImperativeHandle } from 'react';
2
2
  import type { ElementRef } from 'react';
3
- import { View, FlatList, StyleSheet, useWindowDimensions } from 'react-native';
3
+ import { View, FlatList, StyleSheet, useWindowDimensions, Platform } from 'react-native';
4
4
  import { useDispatch, useSelector } from 'react-redux';
5
5
  import type {
6
6
  LayoutChangeEvent,
@@ -18,6 +18,7 @@ import { PaginationDots } from './PaginationDots';
18
18
  import { setGridViewActivePage } from '../redux/actions';
19
19
  import { Tile } from './Tile';
20
20
  import { useIsLandscapeOrientation } from '../utils/dimension';
21
+ import { useSafeAreaFrame } from 'react-native-safe-area-context';
21
22
 
22
23
  export type GridViewProps = {
23
24
  onPeerTileMorePress(peerTrackNode: PeerTrackNode): void;
@@ -46,12 +47,32 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
46
47
  const hmsViewRefs = useRef<Record<string, ElementRef<typeof HMSView>>>({});
47
48
  const regularTilesFlatlistRef = useRef<FlatList<PeerTrackNode[]>>(null);
48
49
  const screenshareTilesFlatlistRef = useRef<FlatList<PeerTrackNode>>(null);
49
- const [insetTileBoundingBox, setInsetTileBoundingBox] = useState<{ width: number | null, height: number | null }>({ width: null, height: null });
50
+ const [insetTileBoundingBox, setInsetTileBoundingBox] = useState<{
51
+ width: number | null;
52
+ height: number | null;
53
+ }>({ width: null, height: null });
50
54
 
51
- const isLandscapeOrientation = useIsLandscapeOrientation();
52
55
  const screenshareTilesAvailable = useSelector(
53
56
  (state: RootState) => state.app.screensharePeerTrackNodes.length > 0
54
57
  );
58
+ const regularTilesAvailable = pairedPeers.length > 0;
59
+
60
+ const isLandscapeOrientation = useIsLandscapeOrientation();
61
+
62
+ // On Orientation change, scroll to first page of list
63
+ React.useEffect(() => {
64
+ if (screenshareTilesAvailable) {
65
+ screenshareTilesFlatlistRef.current?.scrollToOffset({ offset: 0, animated: false });
66
+ }
67
+ }, [screenshareTilesAvailable, isLandscapeOrientation]);
68
+
69
+ // On Orientation change, scroll to first page of list
70
+ React.useEffect(() => {
71
+ if (regularTilesAvailable) {
72
+ regularTilesFlatlistRef.current?.scrollToOffset({ offset: 0, animated: false });
73
+ }
74
+ }, [regularTilesAvailable, isLandscapeOrientation]);
75
+
55
76
  const miniviewPeerTrackNodeExists = useSelector(
56
77
  (state: RootState) => !!state.app.miniviewPeerTrackNode
57
78
  );
@@ -105,7 +126,10 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
105
126
 
106
127
  const _handleLayoutChange = React.useCallback(
107
128
  ({ nativeEvent }: LayoutChangeEvent) => {
108
- setInsetTileBoundingBox({ width: nativeEvent.layout.width, height: nativeEvent.layout.height });
129
+ setInsetTileBoundingBox({
130
+ width: nativeEvent.layout.width,
131
+ height: nativeEvent.layout.height,
132
+ });
109
133
  },
110
134
  []
111
135
  );
@@ -180,6 +204,8 @@ const RegularTiles = React.forwardRef<
180
204
  RegularTilesProps
181
205
  >(({ pairedPeers, onPeerTileMorePress, setHmsViewRefs }, flatlistRef) => {
182
206
  const dispatch = useDispatch();
207
+ const { height: safeHeight } = useSafeAreaFrame();
208
+
183
209
  const screenshareTilesAvailable = useSelector(
184
210
  (state: RootState) => state.app.screensharePeerTrackNodes.length > 0
185
211
  );
@@ -223,6 +249,7 @@ const RegularTiles = React.forwardRef<
223
249
  <FlatList
224
250
  ref={flatlistRef}
225
251
  horizontal={true}
252
+ style={Platform.OS === 'ios' ? {maxHeight: (safeHeight - 16)} : null}
226
253
  data={pairedPeers}
227
254
  initialNumToRender={1}
228
255
  maxToRenderPerBatch={1}
@@ -17,7 +17,7 @@ export const HLSFooter: React.FC<HLSFooterProps> = ({ offset }) => {
17
17
 
18
18
  return (
19
19
  <AnimatedHLSFooter offset={offset} style={styles.animatedContainer}>
20
- {overlayChatVisible ? <HLSChatView /> : null}
20
+ {overlayChatVisible ? <HLSChatView offset={offset} /> : null}
21
21
 
22
22
  <HMSNotifications />
23
23
 
@@ -6,6 +6,7 @@ import {
6
6
  HMSHLSPlayer,
7
7
  HMSHLSPlayerPlaybackState,
8
8
  useHMSHLSPlayerPlaybackState,
9
+ HMSStreamingState,
9
10
  } from '@100mslive/react-native-hms';
10
11
 
11
12
  import type { RootState } from '../redux';
@@ -128,7 +129,7 @@ export const _HLSView: React.FC = () => {
128
129
 
129
130
  return (
130
131
  <View style={styles.hlsView}>
131
- {room?.hlsStreamingState?.running ? (
132
+ {room?.hlsStreamingState?.state === HMSStreamingState.STARTED ? (
132
133
  room?.hlsStreamingState?.variants?.slice(0, 1)?.map((variant, index) =>
133
134
  variant?.hlsStreamUrl ? (
134
135
  <View key={index} style={styles.hlsPlayerContainer}>
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
- import Animated, {
4
- // useAnimatedKeyboard,
5
- // useAnimatedStyle,
6
- // useDerivedValue,
7
- } from 'react-native-reanimated';
3
+ import Animated from 'react-native-reanimated'; // useDerivedValue, // useAnimatedStyle, // useAnimatedKeyboard,
8
4
 
9
5
  export interface HMSKeyboardAvoidingViewProps {
10
6
  style?: StyleProp<Animated.AnimateStyle<StyleProp<ViewStyle>>>;
@@ -5,18 +5,21 @@ import Animated, {
5
5
  useAnimatedStyle,
6
6
  useDerivedValue,
7
7
  } from 'react-native-reanimated';
8
+ import type { SharedValue } from 'react-native-reanimated';
8
9
 
9
10
  export interface HMSKeyboardAvoidingViewProps {
10
11
  style?: StyleProp<Animated.AnimateStyle<StyleProp<ViewStyle>>>;
11
- bottomOffset?: number;
12
+ bottomOffset?: number | SharedValue<number>;
12
13
  }
13
14
 
14
15
  export const HMSKeyboardAvoidingView: React.FC<
15
16
  HMSKeyboardAvoidingViewProps
16
- > = ({ children, style, bottomOffset=0 }) => {
17
+ > = ({ children, style, bottomOffset = 0 }) => {
17
18
  const animatedKeyboard = useAnimatedKeyboard();
18
19
 
19
- const initialPageY = useDerivedValue(() => bottomOffset, [bottomOffset]);
20
+ const initialPageY = useDerivedValue(() => {
21
+ return typeof bottomOffset === 'number' ? bottomOffset : bottomOffset.value;
22
+ }, [bottomOffset]);
20
23
 
21
24
  const keyboardAvoidStyle = useAnimatedStyle(() => {
22
25
  const keyboardHeight = animatedKeyboard.height.value;
@@ -4,27 +4,18 @@ import {
4
4
  View,
5
5
  Text,
6
6
  Platform,
7
- TouchableOpacity,
8
7
  } from 'react-native';
9
8
  import { useSelector } from 'react-redux';
9
+ import { HMSStreamingState } from '@100mslive/react-native-hms';
10
10
 
11
- import {
12
- useHMSRoomStyleSheet,
13
- useIsHLSViewer,
14
- useShowChatAndParticipants,
15
- } from '../hooks-util';
16
- import { EyeIcon } from '../Icons';
17
- import { COLORS, hexToRgbA } from '../utils/theme';
11
+ import { useHMSRoomStyleSheet } from '../hooks-util';
12
+ import { COLORS } from '../utils/theme';
18
13
  import type { RootState } from '../redux';
19
14
  import { TestIds } from '../utils/constants';
20
15
 
21
16
  const _HMSLiveIndicator = () => {
22
- const isHLSViewer = useIsHLSViewer();
23
- const previewPeerCount = useSelector(
24
- (state: RootState) => state.hmsStates.room?.peerCount
25
- );
26
17
  const live = useSelector(
27
- (state: RootState) => !!state.hmsStates.room?.hlsStreamingState?.running
18
+ (state: RootState) => state.hmsStates.room?.hlsStreamingState?.state === HMSStreamingState.STARTED
28
19
  );
29
20
 
30
21
  const hmsRoomStyles = useHMSRoomStyleSheet((theme, typograhy) => ({
@@ -35,51 +26,15 @@ const _HMSLiveIndicator = () => {
35
26
  color: COLORS.WHITE,
36
27
  fontFamily: `${typograhy.font_family}-SemiBold`,
37
28
  },
38
- viewers: {
39
- backgroundColor: isHLSViewer
40
- ? theme.palette.background_dim &&
41
- hexToRgbA(theme.palette.background_dim, 0.64)
42
- : undefined,
43
- borderWidth: isHLSViewer ? 0 : 1,
44
- borderColor: theme.palette.border_bright,
45
- },
46
- count: {
47
- color: theme.palette.on_surface_high,
48
- fontFamily: `${typograhy.font_family}-SemiBold`,
49
- },
50
29
  }));
51
30
 
52
- const { canShowParticipants, show } = useShowChatAndParticipants();
53
-
54
- const showParticipantsSheet = () => {
55
- show('participants');
56
- };
57
-
58
31
  if (!live) {
59
32
  return null;
60
33
  }
61
34
 
62
35
  return (
63
- <View style={styles.container}>
64
- {/* Live */}
65
- <View style={[styles.live, hmsRoomStyles.live]}>
66
- <Text testID={TestIds.live_text} style={[styles.liveText, hmsRoomStyles.liveText]}>LIVE</Text>
67
- </View>
68
-
69
- {/* Viewer Count */}
70
- {typeof previewPeerCount === 'number' ? (
71
- <TouchableOpacity
72
- style={[styles.viewers, hmsRoomStyles.viewers]}
73
- onPress={showParticipantsSheet}
74
- disabled={!canShowParticipants}
75
- >
76
- <EyeIcon testID={TestIds.peer_count_icon} />
77
-
78
- <Text testID={TestIds.peer_count} style={[styles.count, hmsRoomStyles.count]}>
79
- {previewPeerCount}
80
- </Text>
81
- </TouchableOpacity>
82
- ) : null}
36
+ <View style={[styles.live, hmsRoomStyles.live]}>
37
+ <Text testID={TestIds.live_text} style={[styles.liveText, hmsRoomStyles.liveText]}>LIVE</Text>
83
38
  </View>
84
39
  );
85
40
  };
@@ -87,13 +42,11 @@ const _HMSLiveIndicator = () => {
87
42
  export const HMSLiveIndicator = React.memo(_HMSLiveIndicator);
88
43
 
89
44
  const styles = StyleSheet.create({
90
- container: {
91
- flexDirection: 'row',
92
- },
93
45
  live: {
94
46
  paddingHorizontal: 8,
95
- paddingVertical: 4,
47
+ paddingVertical: 6,
96
48
  borderRadius: 4,
49
+ marginRight: 8,
97
50
  alignItems: 'center',
98
51
  justifyContent: 'center',
99
52
  },
@@ -104,22 +57,4 @@ const styles = StyleSheet.create({
104
57
  textAlign: 'center',
105
58
  textAlignVertical: 'center',
106
59
  },
107
- viewers: {
108
- flexDirection: 'row',
109
- alignItems: 'center',
110
- paddingVertical: 4,
111
- paddingRight: 8,
112
- paddingLeft: 6,
113
- marginLeft: 8,
114
- borderRadius: 4,
115
- },
116
- count: {
117
- fontSize: 10,
118
- lineHeight: Platform.OS === 'android' ? 16 : undefined,
119
- letterSpacing: 1.5,
120
- textAlign: 'center',
121
- textAlignVertical: 'center',
122
-
123
- marginLeft: 4,
124
- },
125
60
  });