@100mslive/react-native-room-kit 1.0.1 → 1.0.2-beta.0

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 (256) hide show
  1. package/lib/commonjs/HMSPrebuilt.js +16 -14
  2. package/lib/commonjs/HMSPrebuilt.js.map +1 -1
  3. package/lib/commonjs/HMSRoomSetup.js +85 -44
  4. package/lib/commonjs/HMSRoomSetup.js.map +1 -1
  5. package/lib/commonjs/Icons/Hand/assets/hand-off.png +0 -0
  6. package/lib/commonjs/Icons/Hand/assets/hand-off@2x.png +0 -0
  7. package/lib/commonjs/Icons/Hand/assets/hand-off@3x.png +0 -0
  8. package/lib/commonjs/Icons/Hand/index.js +2 -1
  9. package/lib/commonjs/Icons/Hand/index.js.map +1 -1
  10. package/lib/commonjs/Icons/Recording/assets/recording-off.png +0 -0
  11. package/lib/commonjs/Icons/Recording/assets/recording-off@2x.png +0 -0
  12. package/lib/commonjs/Icons/Recording/assets/recording-off@3x.png +0 -0
  13. package/lib/commonjs/Icons/Recording/index.js +2 -1
  14. package/lib/commonjs/Icons/Recording/index.js.map +1 -1
  15. package/lib/commonjs/components/DisplayView.js +3 -1
  16. package/lib/commonjs/components/DisplayView.js.map +1 -1
  17. package/lib/commonjs/components/EndRoomModal.js +29 -0
  18. package/lib/commonjs/components/EndRoomModal.js.map +1 -0
  19. package/lib/commonjs/components/EndRoomModalContent.js +9 -2
  20. package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
  21. package/lib/commonjs/components/Footer.js +9 -1
  22. package/lib/commonjs/components/Footer.js.map +1 -1
  23. package/lib/commonjs/components/HMSKeyboardAvoidingView.js +3 -18
  24. package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
  25. package/lib/commonjs/components/HMSLocalScreenshareNotification.js +2 -2
  26. package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
  27. package/lib/commonjs/components/HMSManageLeave.js +3 -178
  28. package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
  29. package/lib/commonjs/components/HMSNotification.js +4 -3
  30. package/lib/commonjs/components/HMSNotification.js.map +1 -1
  31. package/lib/commonjs/components/HMSNotifications.js +32 -6
  32. package/lib/commonjs/components/HMSNotifications.js.map +1 -1
  33. package/lib/commonjs/components/HMSOverlayChatView.js +7 -1
  34. package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
  35. package/lib/commonjs/components/HMSReconnectingNotification.js +33 -0
  36. package/lib/commonjs/components/HMSReconnectingNotification.js.map +1 -0
  37. package/lib/commonjs/components/HMSRecordingIndicator.js +1 -1
  38. package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
  39. package/lib/commonjs/components/HMSTerminalErrorNotification.js +66 -0
  40. package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -0
  41. package/lib/commonjs/components/LeaveRoomBottomSheet.js +175 -0
  42. package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -0
  43. package/lib/commonjs/components/Meeting.js +4 -0
  44. package/lib/commonjs/components/Meeting.js.map +1 -1
  45. package/lib/commonjs/components/MeetingScreenContent.js +3 -2
  46. package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
  47. package/lib/commonjs/components/PIPView.js +80 -15
  48. package/lib/commonjs/components/PIPView.js.map +1 -1
  49. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +23 -1
  50. package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
  51. package/lib/commonjs/components/PeerVideoTile/AvatarView.js +4 -4
  52. package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js +3 -1
  53. package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
  54. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +1 -1
  55. package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  56. package/lib/commonjs/components/PreviewForRoleChangeModal.js +2 -2
  57. package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
  58. package/lib/commonjs/components/RoomSettingsModalContent.js +4 -7
  59. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  60. package/lib/commonjs/components/StopRecordingModalContent.js +4 -1
  61. package/lib/commonjs/components/StopRecordingModalContent.js.map +1 -1
  62. package/lib/commonjs/hooks-util.js +191 -27
  63. package/lib/commonjs/hooks-util.js.map +1 -1
  64. package/lib/commonjs/index.js +11 -0
  65. package/lib/commonjs/index.js.map +1 -1
  66. package/lib/commonjs/redux/actionTypes.js +6 -1
  67. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  68. package/lib/commonjs/redux/actions/index.js +22 -1
  69. package/lib/commonjs/redux/actions/index.js.map +1 -1
  70. package/lib/commonjs/redux/reducers/appState.js +17 -1
  71. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  72. package/lib/commonjs/redux/reducers/userState.js +5 -1
  73. package/lib/commonjs/redux/reducers/userState.js.map +1 -1
  74. package/lib/commonjs/types.js +10 -1
  75. package/lib/commonjs/types.js.map +1 -1
  76. package/lib/commonjs/utils/types.js +11 -1
  77. package/lib/commonjs/utils/types.js.map +1 -1
  78. package/lib/commonjs/utils.js +1 -7
  79. package/lib/commonjs/utils.js.map +1 -1
  80. package/lib/module/HMSPrebuilt.js +16 -14
  81. package/lib/module/HMSPrebuilt.js.map +1 -1
  82. package/lib/module/HMSRoomSetup.js +81 -40
  83. package/lib/module/HMSRoomSetup.js.map +1 -1
  84. package/lib/module/Icons/Hand/assets/hand-off.png +0 -0
  85. package/lib/module/Icons/Hand/assets/hand-off@2x.png +0 -0
  86. package/lib/module/Icons/Hand/assets/hand-off@3x.png +0 -0
  87. package/lib/module/Icons/Hand/index.js +2 -1
  88. package/lib/module/Icons/Hand/index.js.map +1 -1
  89. package/lib/module/Icons/Recording/assets/recording-off.png +0 -0
  90. package/lib/module/Icons/Recording/assets/recording-off@2x.png +0 -0
  91. package/lib/module/Icons/Recording/assets/recording-off@3x.png +0 -0
  92. package/lib/module/Icons/Recording/index.js +2 -1
  93. package/lib/module/Icons/Recording/index.js.map +1 -1
  94. package/lib/module/components/DisplayView.js +3 -1
  95. package/lib/module/components/DisplayView.js.map +1 -1
  96. package/lib/module/components/EndRoomModal.js +20 -0
  97. package/lib/module/components/EndRoomModal.js.map +1 -0
  98. package/lib/module/components/EndRoomModalContent.js +9 -2
  99. package/lib/module/components/EndRoomModalContent.js.map +1 -1
  100. package/lib/module/components/Footer.js +9 -1
  101. package/lib/module/components/Footer.js.map +1 -1
  102. package/lib/module/components/HMSKeyboardAvoidingView.js +4 -19
  103. package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
  104. package/lib/module/components/HMSLocalScreenshareNotification.js +1 -1
  105. package/lib/module/components/HMSManageLeave.js +5 -181
  106. package/lib/module/components/HMSManageLeave.js.map +1 -1
  107. package/lib/module/components/HMSNotification.js +4 -3
  108. package/lib/module/components/HMSNotification.js.map +1 -1
  109. package/lib/module/components/HMSNotifications.js +28 -2
  110. package/lib/module/components/HMSNotifications.js.map +1 -1
  111. package/lib/module/components/HMSOverlayChatView.js +7 -1
  112. package/lib/module/components/HMSOverlayChatView.js.map +1 -1
  113. package/lib/module/components/HMSReconnectingNotification.js +24 -0
  114. package/lib/module/components/HMSReconnectingNotification.js.map +1 -0
  115. package/lib/module/components/HMSRecordingIndicator.js +1 -1
  116. package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
  117. package/lib/module/components/HMSTerminalErrorNotification.js +57 -0
  118. package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -0
  119. package/lib/module/components/LeaveRoomBottomSheet.js +167 -0
  120. package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -0
  121. package/lib/module/components/Meeting.js +5 -1
  122. package/lib/module/components/Meeting.js.map +1 -1
  123. package/lib/module/components/MeetingScreenContent.js +3 -2
  124. package/lib/module/components/MeetingScreenContent.js.map +1 -1
  125. package/lib/module/components/PIPView.js +81 -16
  126. package/lib/module/components/PIPView.js.map +1 -1
  127. package/lib/module/components/Participants/ParticipantsItemOptions.js +24 -2
  128. package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
  129. package/lib/module/components/PeerVideoTile/AvatarView.js +4 -4
  130. package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js +3 -1
  131. package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
  132. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +1 -1
  133. package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
  134. package/lib/module/components/PreviewForRoleChangeModal.js +1 -1
  135. package/lib/module/components/RoomSettingsModalContent.js +6 -9
  136. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  137. package/lib/module/components/StopRecordingModalContent.js +4 -1
  138. package/lib/module/components/StopRecordingModalContent.js.map +1 -1
  139. package/lib/module/hooks-util.js +182 -24
  140. package/lib/module/hooks-util.js.map +1 -1
  141. package/lib/module/index.js +1 -0
  142. package/lib/module/index.js.map +1 -1
  143. package/lib/module/redux/actionTypes.js +6 -1
  144. package/lib/module/redux/actionTypes.js.map +1 -1
  145. package/lib/module/redux/actions/index.js +18 -0
  146. package/lib/module/redux/actions/index.js.map +1 -1
  147. package/lib/module/redux/reducers/appState.js +17 -1
  148. package/lib/module/redux/reducers/appState.js.map +1 -1
  149. package/lib/module/redux/reducers/userState.js +5 -1
  150. package/lib/module/redux/reducers/userState.js.map +1 -1
  151. package/lib/module/types.js +9 -0
  152. package/lib/module/types.js.map +1 -1
  153. package/lib/module/utils/types.js +11 -0
  154. package/lib/module/utils/types.js.map +1 -1
  155. package/lib/module/utils.js +0 -6
  156. package/lib/module/utils.js.map +1 -1
  157. package/lib/typescript/HMSPrebuilt.d.ts +2 -16
  158. package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
  159. package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
  160. package/lib/typescript/Icons/Hand/index.d.ts +1 -0
  161. package/lib/typescript/Icons/Hand/index.d.ts.map +1 -1
  162. package/lib/typescript/Icons/Recording/index.d.ts +1 -0
  163. package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
  164. package/lib/typescript/components/DisplayView.d.ts.map +1 -1
  165. package/lib/typescript/components/EndRoomModal.d.ts +6 -0
  166. package/lib/typescript/components/EndRoomModal.d.ts.map +1 -0
  167. package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
  168. package/lib/typescript/components/Footer.d.ts +1 -0
  169. package/lib/typescript/components/Footer.d.ts.map +1 -1
  170. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +1 -0
  171. package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
  172. package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
  173. package/lib/typescript/components/HMSNotification.d.ts +1 -0
  174. package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
  175. package/lib/typescript/components/HMSNotifications.d.ts +1 -0
  176. package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
  177. package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
  178. package/lib/typescript/components/HMSReconnectingNotification.d.ts +5 -0
  179. package/lib/typescript/components/HMSReconnectingNotification.d.ts.map +1 -0
  180. package/lib/typescript/components/HMSTerminalErrorNotification.d.ts +10 -0
  181. package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -0
  182. package/lib/typescript/components/LeaveRoomBottomSheet.d.ts +6 -0
  183. package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -0
  184. package/lib/typescript/components/Meeting.d.ts.map +1 -1
  185. package/lib/typescript/components/PIPView.d.ts.map +1 -1
  186. package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
  187. package/lib/typescript/components/PeerVideoTile/PeerAudioIndicator.d.ts.map +1 -1
  188. package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
  189. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  190. package/lib/typescript/components/StopRecordingModalContent.d.ts.map +1 -1
  191. package/lib/typescript/hooks-util.d.ts +20 -7
  192. package/lib/typescript/hooks-util.d.ts.map +1 -1
  193. package/lib/typescript/index.d.ts +2 -0
  194. package/lib/typescript/index.d.ts.map +1 -1
  195. package/lib/typescript/redux/actionTypes.d.ts +3 -0
  196. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  197. package/lib/typescript/redux/actions/index.d.ts +23 -14
  198. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  199. package/lib/typescript/redux/index.d.ts +5 -7
  200. package/lib/typescript/redux/index.d.ts.map +1 -1
  201. package/lib/typescript/redux/reducers/appState.d.ts +4 -5
  202. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  203. package/lib/typescript/redux/reducers/index.d.ts +5 -7
  204. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  205. package/lib/typescript/redux/reducers/userState.d.ts +2 -2
  206. package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
  207. package/lib/typescript/types.d.ts +79 -0
  208. package/lib/typescript/types.d.ts.map +1 -1
  209. package/lib/typescript/utils/types.d.ts +24 -0
  210. package/lib/typescript/utils/types.d.ts.map +1 -1
  211. package/lib/typescript/utils.d.ts +0 -5
  212. package/lib/typescript/utils.d.ts.map +1 -1
  213. package/package.json +2 -2
  214. package/src/HMSPrebuilt.tsx +32 -23
  215. package/src/HMSRoomSetup.tsx +105 -53
  216. package/src/Icons/Hand/assets/hand-off.png +0 -0
  217. package/src/Icons/Hand/assets/hand-off@2x.png +0 -0
  218. package/src/Icons/Hand/assets/hand-off@3x.png +0 -0
  219. package/src/Icons/Hand/index.tsx +13 -3
  220. package/src/Icons/Recording/assets/recording-off.png +0 -0
  221. package/src/Icons/Recording/assets/recording-off@2x.png +0 -0
  222. package/src/Icons/Recording/assets/recording-off@3x.png +0 -0
  223. package/src/Icons/Recording/index.tsx +9 -2
  224. package/src/components/DisplayView.tsx +6 -0
  225. package/src/components/EndRoomModal.tsx +24 -0
  226. package/src/components/EndRoomModalContent.tsx +9 -2
  227. package/src/components/Footer.tsx +18 -2
  228. package/src/components/HMSKeyboardAvoidingView.tsx +5 -23
  229. package/src/components/HMSLocalScreenshareNotification.tsx +1 -1
  230. package/src/components/HMSManageLeave.tsx +4 -228
  231. package/src/components/HMSNotification.tsx +4 -2
  232. package/src/components/HMSNotifications.tsx +41 -7
  233. package/src/components/HMSOverlayChatView.tsx +6 -1
  234. package/src/components/HMSReconnectingNotification.tsx +27 -0
  235. package/src/components/HMSRecordingIndicator.tsx +1 -1
  236. package/src/components/HMSTerminalErrorNotification.tsx +70 -0
  237. package/src/components/LeaveRoomBottomSheet.tsx +199 -0
  238. package/src/components/Meeting.tsx +7 -0
  239. package/src/components/MeetingScreenContent.tsx +2 -2
  240. package/src/components/PIPView.tsx +113 -25
  241. package/src/components/Participants/ParticipantsItemOptions.tsx +26 -4
  242. package/src/components/PeerVideoTile/AvatarView.tsx +4 -4
  243. package/src/components/PeerVideoTile/PeerAudioIndicator.tsx +6 -1
  244. package/src/components/PeerVideoTile/PeerVideoTileView.tsx +4 -2
  245. package/src/components/PreviewForRoleChangeModal.tsx +1 -1
  246. package/src/components/RoomSettingsModalContent.tsx +5 -9
  247. package/src/components/StopRecordingModalContent.tsx +3 -1
  248. package/src/hooks-util.ts +240 -23
  249. package/src/index.ts +2 -0
  250. package/src/redux/actionTypes.ts +7 -0
  251. package/src/redux/actions/index.ts +19 -7
  252. package/src/redux/reducers/appState.ts +18 -1
  253. package/src/redux/reducers/userState.ts +7 -3
  254. package/src/types.ts +71 -0
  255. package/src/utils/types.ts +27 -0
  256. package/src/utils.ts +0 -6
@@ -85,6 +85,8 @@ export type HMSIOSScreenShareConfig = {
85
85
  preferredExtension: string;
86
86
  };
87
87
 
88
+ export type OnLeaveHandler = (reason: OnLeaveReason) => void;
89
+
88
90
  export const SUPPORTED_ASPECT_RATIOS = [
89
91
  { value: 16 / 9, id: '16:9' },
90
92
  { value: 9 / 16, id: '9:16' },
@@ -104,3 +106,28 @@ export const ChatBottomSheetTabs = ['Chat', 'Participants'] as const;
104
106
  export const ChatBroadcastFilter = { name: 'everyone' } as const;
105
107
 
106
108
  export const PeerListRefreshInterval = 5000; // in milliseconds
109
+
110
+ export enum OnLeaveReason {
111
+ /**
112
+ * User left the meeting room by pressing the "Leave" or "End Stream" button in Leave Modal
113
+ */
114
+ LEAVE = 'leave',
115
+ /**
116
+ * User was removed from the meeting room by another HMSPeer
117
+ */
118
+ PEER_KICKED = 'peer_kicked',
119
+ /**
120
+ * Meeting Room was ended by user or another HMSPeer
121
+ */
122
+ ROOM_END = 'room_ended',
123
+ /**
124
+ * Due to network issues, user left the meeting room
125
+ */
126
+ NETWORK_ISSUES = 'network_issues',
127
+ /**
128
+ * User left the meeting room by pressing the "end" button in PIP window
129
+ */
130
+ PIP = 'pip',
131
+ };
132
+
133
+ export const TerminalExceptionCodes = [4005, 1003, 2000, "4005", "1003", "2000"];
package/src/utils.ts CHANGED
@@ -22,9 +22,3 @@ export const getJoinConfig = (): typeof DEFAULT_JOINING_CONFIG => {
22
22
 
23
23
  return config;
24
24
  };
25
-
26
- export enum NotificationTypes {
27
- ROLE_CHANGE_DECLINED = 'role_change_declined',
28
- HAND_RAISE = 'hand_raise',
29
- LOCAL_SCREENSHARE = 'local_screenshare',
30
- }