@100mslive/react-native-room-kit 1.1.8 → 1.1.9-beta.1

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 (215) hide show
  1. package/lib/commonjs/HMSInstanceSetup.js +11 -5
  2. package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
  3. package/lib/commonjs/Icons/AddImage/assets/add-image.png +0 -0
  4. package/lib/commonjs/Icons/AddImage/assets/add-image@2x.png +0 -0
  5. package/lib/commonjs/Icons/AddImage/assets/add-image@3x.png +0 -0
  6. package/lib/commonjs/Icons/AddImage/index.js +33 -0
  7. package/lib/commonjs/Icons/AddImage/index.js.map +1 -0
  8. package/lib/commonjs/Icons/BlurPeople/assets/blur-people.png +0 -0
  9. package/lib/commonjs/Icons/BlurPeople/assets/blur-people@2x.png +0 -0
  10. package/lib/commonjs/Icons/BlurPeople/assets/blur-people@3x.png +0 -0
  11. package/lib/commonjs/Icons/BlurPeople/index.js +33 -0
  12. package/lib/commonjs/Icons/BlurPeople/index.js.map +1 -0
  13. package/lib/commonjs/Icons/CrossCircle/assets/cross-circle-large.png +0 -0
  14. package/lib/commonjs/Icons/CrossCircle/assets/cross-circle-large@2x.png +0 -0
  15. package/lib/commonjs/Icons/CrossCircle/assets/cross-circle-large@3x.png +0 -0
  16. package/lib/commonjs/Icons/CrossCircle/index.js +7 -2
  17. package/lib/commonjs/Icons/CrossCircle/index.js.map +1 -1
  18. package/lib/commonjs/Icons/VirtualBackground/assets/virtual-background.png +0 -0
  19. package/lib/commonjs/Icons/VirtualBackground/assets/virtual-background@2x.png +0 -0
  20. package/lib/commonjs/Icons/VirtualBackground/assets/virtual-background@3x.png +0 -0
  21. package/lib/commonjs/Icons/VirtualBackground/index.js +33 -0
  22. package/lib/commonjs/Icons/VirtualBackground/index.js.map +1 -0
  23. package/lib/commonjs/Icons/index.js +33 -0
  24. package/lib/commonjs/Icons/index.js.map +1 -1
  25. package/lib/commonjs/components/Chat/ChatMessage.js +13 -1
  26. package/lib/commonjs/components/Chat/ChatMessage.js.map +1 -1
  27. package/lib/commonjs/components/HLSDescriptionPane.js +3 -29
  28. package/lib/commonjs/components/HLSDescriptionPane.js.map +1 -1
  29. package/lib/commonjs/components/HMSHLSMessage.js +14 -1
  30. package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
  31. package/lib/commonjs/components/HMSManageCameraRotation.js +11 -4
  32. package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -1
  33. package/lib/commonjs/components/HMSManageLocalVideo.js +11 -4
  34. package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -1
  35. package/lib/commonjs/components/HMSManageVirtualBackground.js +55 -0
  36. package/lib/commonjs/components/HMSManageVirtualBackground.js.map +1 -0
  37. package/lib/commonjs/components/HMSOverlayMessageView.js +14 -1
  38. package/lib/commonjs/components/HMSOverlayMessageView.js.map +1 -1
  39. package/lib/commonjs/components/HMSRoomOptions.js +2 -1
  40. package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
  41. package/lib/commonjs/components/Preview.js +8 -3
  42. package/lib/commonjs/components/Preview.js.map +1 -1
  43. package/lib/commonjs/components/RoomSettingsModalContent.js +29 -0
  44. package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
  45. package/lib/commonjs/components/VirtualBackgroundBottomSheet.js +52 -0
  46. package/lib/commonjs/components/VirtualBackgroundBottomSheet.js.map +1 -0
  47. package/lib/commonjs/components/VirtualBackgroundModalContent.js +364 -0
  48. package/lib/commonjs/components/VirtualBackgroundModalContent.js.map +1 -0
  49. package/lib/commonjs/modules/imagePickerWrapper.js +19 -0
  50. package/lib/commonjs/modules/imagePickerWrapper.js.map +1 -0
  51. package/lib/commonjs/modules/videoPluginWrapper.js +13 -0
  52. package/lib/commonjs/modules/videoPluginWrapper.js.map +1 -0
  53. package/lib/commonjs/redux/actionTypes.js +3 -0
  54. package/lib/commonjs/redux/actionTypes.js.map +1 -1
  55. package/lib/commonjs/redux/actions/index.js +14 -2
  56. package/lib/commonjs/redux/actions/index.js.map +1 -1
  57. package/lib/commonjs/redux/reducers/appState.js +9 -1
  58. package/lib/commonjs/redux/reducers/appState.js.map +1 -1
  59. package/lib/commonjs/redux/reducers/hmsStates.js +6 -0
  60. package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
  61. package/lib/commonjs/utils/functions.js +33 -1
  62. package/lib/commonjs/utils/functions.js.map +1 -1
  63. package/lib/commonjs/utils/types.js +1 -0
  64. package/lib/commonjs/utils/types.js.map +1 -1
  65. package/lib/module/HMSInstanceSetup.js +12 -6
  66. package/lib/module/HMSInstanceSetup.js.map +1 -1
  67. package/lib/module/Icons/AddImage/assets/add-image.png +0 -0
  68. package/lib/module/Icons/AddImage/assets/add-image@2x.png +0 -0
  69. package/lib/module/Icons/AddImage/assets/add-image@3x.png +0 -0
  70. package/lib/module/Icons/AddImage/index.js +25 -0
  71. package/lib/module/Icons/AddImage/index.js.map +1 -0
  72. package/lib/module/Icons/BlurPeople/assets/blur-people.png +0 -0
  73. package/lib/module/Icons/BlurPeople/assets/blur-people@2x.png +0 -0
  74. package/lib/module/Icons/BlurPeople/assets/blur-people@3x.png +0 -0
  75. package/lib/module/Icons/BlurPeople/index.js +25 -0
  76. package/lib/module/Icons/BlurPeople/index.js.map +1 -0
  77. package/lib/module/Icons/CrossCircle/assets/cross-circle-large.png +0 -0
  78. package/lib/module/Icons/CrossCircle/assets/cross-circle-large@2x.png +0 -0
  79. package/lib/module/Icons/CrossCircle/assets/cross-circle-large@3x.png +0 -0
  80. package/lib/module/Icons/CrossCircle/index.js +7 -2
  81. package/lib/module/Icons/CrossCircle/index.js.map +1 -1
  82. package/lib/module/Icons/VirtualBackground/assets/virtual-background.png +0 -0
  83. package/lib/module/Icons/VirtualBackground/assets/virtual-background@2x.png +0 -0
  84. package/lib/module/Icons/VirtualBackground/assets/virtual-background@3x.png +0 -0
  85. package/lib/module/Icons/VirtualBackground/index.js +25 -0
  86. package/lib/module/Icons/VirtualBackground/index.js.map +1 -0
  87. package/lib/module/Icons/index.js +3 -0
  88. package/lib/module/Icons/index.js.map +1 -1
  89. package/lib/module/components/Chat/ChatMessage.js +15 -3
  90. package/lib/module/components/Chat/ChatMessage.js.map +1 -1
  91. package/lib/module/components/HLSDescriptionPane.js +2 -28
  92. package/lib/module/components/HLSDescriptionPane.js.map +1 -1
  93. package/lib/module/components/HMSHLSMessage.js +15 -2
  94. package/lib/module/components/HMSHLSMessage.js.map +1 -1
  95. package/lib/module/components/HMSManageCameraRotation.js +11 -4
  96. package/lib/module/components/HMSManageCameraRotation.js.map +1 -1
  97. package/lib/module/components/HMSManageLocalVideo.js +11 -4
  98. package/lib/module/components/HMSManageLocalVideo.js.map +1 -1
  99. package/lib/module/components/HMSManageVirtualBackground.js +46 -0
  100. package/lib/module/components/HMSManageVirtualBackground.js.map +1 -0
  101. package/lib/module/components/HMSOverlayMessageView.js +15 -2
  102. package/lib/module/components/HMSOverlayMessageView.js.map +1 -1
  103. package/lib/module/components/HMSRoomOptions.js +2 -1
  104. package/lib/module/components/HMSRoomOptions.js.map +1 -1
  105. package/lib/module/components/Preview.js +8 -3
  106. package/lib/module/components/Preview.js.map +1 -1
  107. package/lib/module/components/RoomSettingsModalContent.js +31 -2
  108. package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
  109. package/lib/module/components/VirtualBackgroundBottomSheet.js +43 -0
  110. package/lib/module/components/VirtualBackgroundBottomSheet.js.map +1 -0
  111. package/lib/module/components/VirtualBackgroundModalContent.js +355 -0
  112. package/lib/module/components/VirtualBackgroundModalContent.js.map +1 -0
  113. package/lib/module/modules/imagePickerWrapper.js +14 -0
  114. package/lib/module/modules/imagePickerWrapper.js.map +1 -0
  115. package/lib/module/modules/videoPluginWrapper.js +8 -0
  116. package/lib/module/modules/videoPluginWrapper.js.map +1 -0
  117. package/lib/module/redux/actionTypes.js +3 -0
  118. package/lib/module/redux/actionTypes.js.map +1 -1
  119. package/lib/module/redux/actions/index.js +10 -0
  120. package/lib/module/redux/actions/index.js.map +1 -1
  121. package/lib/module/redux/reducers/appState.js +9 -1
  122. package/lib/module/redux/reducers/appState.js.map +1 -1
  123. package/lib/module/redux/reducers/hmsStates.js +6 -0
  124. package/lib/module/redux/reducers/hmsStates.js.map +1 -1
  125. package/lib/module/utils/functions.js +29 -1
  126. package/lib/module/utils/functions.js.map +1 -1
  127. package/lib/module/utils/types.js +1 -0
  128. package/lib/module/utils/types.js.map +1 -1
  129. package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -1
  130. package/lib/typescript/Icons/AddImage/index.d.ts +7 -0
  131. package/lib/typescript/Icons/AddImage/index.d.ts.map +1 -0
  132. package/lib/typescript/Icons/BlurPeople/index.d.ts +7 -0
  133. package/lib/typescript/Icons/BlurPeople/index.d.ts.map +1 -0
  134. package/lib/typescript/Icons/CrossCircle/index.d.ts +1 -0
  135. package/lib/typescript/Icons/CrossCircle/index.d.ts.map +1 -1
  136. package/lib/typescript/Icons/VirtualBackground/index.d.ts +7 -0
  137. package/lib/typescript/Icons/VirtualBackground/index.d.ts.map +1 -0
  138. package/lib/typescript/Icons/index.d.ts +3 -0
  139. package/lib/typescript/Icons/index.d.ts.map +1 -1
  140. package/lib/typescript/components/Chat/ChatMessage.d.ts.map +1 -1
  141. package/lib/typescript/components/HLSDescriptionPane.d.ts.map +1 -1
  142. package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
  143. package/lib/typescript/components/HMSManageCameraRotation.d.ts +8 -1
  144. package/lib/typescript/components/HMSManageCameraRotation.d.ts.map +1 -1
  145. package/lib/typescript/components/HMSManageLocalVideo.d.ts +8 -1
  146. package/lib/typescript/components/HMSManageLocalVideo.d.ts.map +1 -1
  147. package/lib/typescript/components/HMSManageVirtualBackground.d.ts +8 -0
  148. package/lib/typescript/components/HMSManageVirtualBackground.d.ts.map +1 -0
  149. package/lib/typescript/components/HMSOverlayMessageView.d.ts.map +1 -1
  150. package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
  151. package/lib/typescript/components/Preview.d.ts.map +1 -1
  152. package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
  153. package/lib/typescript/components/VirtualBackgroundBottomSheet.d.ts +3 -0
  154. package/lib/typescript/components/VirtualBackgroundBottomSheet.d.ts.map +1 -0
  155. package/lib/typescript/components/VirtualBackgroundModalContent.d.ts +6 -0
  156. package/lib/typescript/components/VirtualBackgroundModalContent.d.ts.map +1 -0
  157. package/lib/typescript/modules/imagePickerWrapper.d.ts +6 -0
  158. package/lib/typescript/modules/imagePickerWrapper.d.ts.map +1 -0
  159. package/lib/typescript/modules/videoPluginWrapper.d.ts +19 -0
  160. package/lib/typescript/modules/videoPluginWrapper.d.ts.map +1 -0
  161. package/lib/typescript/redux/actionTypes.d.ts +2 -0
  162. package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
  163. package/lib/typescript/redux/actions/index.d.ts +11 -0
  164. package/lib/typescript/redux/actions/index.d.ts.map +1 -1
  165. package/lib/typescript/redux/index.d.ts +2 -0
  166. package/lib/typescript/redux/index.d.ts.map +1 -1
  167. package/lib/typescript/redux/reducers/appState.d.ts +1 -0
  168. package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
  169. package/lib/typescript/redux/reducers/hmsStates.d.ts +7 -1
  170. package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
  171. package/lib/typescript/redux/reducers/index.d.ts +2 -0
  172. package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
  173. package/lib/typescript/utils/functions.d.ts +2 -0
  174. package/lib/typescript/utils/functions.d.ts.map +1 -1
  175. package/lib/typescript/utils/types.d.ts +1 -0
  176. package/lib/typescript/utils/types.d.ts.map +1 -1
  177. package/package.json +8 -2
  178. package/src/HMSInstanceSetup.tsx +17 -4
  179. package/src/Icons/AddImage/assets/add-image.png +0 -0
  180. package/src/Icons/AddImage/assets/add-image@2x.png +0 -0
  181. package/src/Icons/AddImage/assets/add-image@3x.png +0 -0
  182. package/src/Icons/AddImage/index.tsx +33 -0
  183. package/src/Icons/BlurPeople/assets/blur-people.png +0 -0
  184. package/src/Icons/BlurPeople/assets/blur-people@2x.png +0 -0
  185. package/src/Icons/BlurPeople/assets/blur-people@3x.png +0 -0
  186. package/src/Icons/BlurPeople/index.tsx +33 -0
  187. package/src/Icons/CrossCircle/assets/cross-circle-large.png +0 -0
  188. package/src/Icons/CrossCircle/assets/cross-circle-large@2x.png +0 -0
  189. package/src/Icons/CrossCircle/assets/cross-circle-large@3x.png +0 -0
  190. package/src/Icons/CrossCircle/index.tsx +19 -3
  191. package/src/Icons/VirtualBackground/assets/virtual-background.png +0 -0
  192. package/src/Icons/VirtualBackground/assets/virtual-background@2x.png +0 -0
  193. package/src/Icons/VirtualBackground/assets/virtual-background@3x.png +0 -0
  194. package/src/Icons/VirtualBackground/index.tsx +33 -0
  195. package/src/Icons/index.ts +3 -0
  196. package/src/components/Chat/ChatMessage.tsx +19 -2
  197. package/src/components/HLSDescriptionPane.tsx +2 -33
  198. package/src/components/HMSHLSMessage.tsx +16 -1
  199. package/src/components/HMSManageCameraRotation.tsx +18 -4
  200. package/src/components/HMSManageLocalVideo.tsx +20 -4
  201. package/src/components/HMSManageVirtualBackground.tsx +76 -0
  202. package/src/components/HMSOverlayMessageView.tsx +16 -1
  203. package/src/components/HMSRoomOptions.tsx +3 -0
  204. package/src/components/Preview.tsx +12 -5
  205. package/src/components/RoomSettingsModalContent.tsx +33 -0
  206. package/src/components/VirtualBackgroundBottomSheet.tsx +62 -0
  207. package/src/components/VirtualBackgroundModalContent.tsx +500 -0
  208. package/src/modules/imagePickerWrapper.ts +20 -0
  209. package/src/modules/videoPluginWrapper.ts +32 -0
  210. package/src/redux/actionTypes.ts +4 -0
  211. package/src/redux/actions/index.ts +11 -0
  212. package/src/redux/reducers/appState.ts +8 -0
  213. package/src/redux/reducers/hmsStates.ts +14 -0
  214. package/src/utils/{functions.ts → functions.tsx} +34 -0
  215. package/src/utils/types.ts +1 -0
@@ -3,6 +3,7 @@ import {
3
3
  Dimensions,
4
4
  PermissionsAndroid,
5
5
  StatusBar,
6
+ Text,
6
7
  } from 'react-native';
7
8
  import Toast from 'react-native-simple-toast';
8
9
  import {
@@ -23,6 +24,7 @@ import type {
23
24
  } from '@100mslive/react-native-hms';
24
25
 
25
26
  import type { PeerTrackNode } from './types';
27
+ import * as React from 'react';
26
28
 
27
29
  export const getMeetingUrl = () =>
28
30
  'https://yogi.app.100ms.live/streaming/meeting/nih-bkn-vek';
@@ -570,3 +572,35 @@ export function getLabelFromPollQuestionType(
570
572
  return 'Short Answer';
571
573
  }
572
574
  }
575
+
576
+ export function splitLinksAndContent(
577
+ text: string,
578
+ { pressHandler, style }: any
579
+ ): string | (string | React.ReactElement)[] {
580
+ // Regular expression to find links in a string
581
+ const pattern = /(^|\s)http[s]?:\/\/\S+/g;
582
+
583
+ // Find all links in the text
584
+ const links = text.match(pattern) || [];
585
+
586
+ if (links.length <= 0) {
587
+ return text;
588
+ }
589
+
590
+ // Split the text into an array of links and content
591
+ const parts = text.replace(pattern, '^<link>^').split('^');
592
+
593
+ return parts.map((p, i) => {
594
+ if (p !== '<link>') {
595
+ return p;
596
+ }
597
+ const link = links.pop();
598
+ return link ? (
599
+ <Text key={link + i} onPress={() => pressHandler(link)} style={style}>
600
+ {link}
601
+ </Text>
602
+ ) : (
603
+ p
604
+ );
605
+ });
606
+ }
@@ -59,6 +59,7 @@ export enum ModalTypes {
59
59
  CHAT_MORE_ACTIONS = 'chatMoreActions',
60
60
  MESSAGE_OPTIONS = 'messageOptions',
61
61
  POLLS_AND_QUIZZES = 'pollsAndQuizzes',
62
+ VIRTUAL_BACKGROUND = 'virtualBackground',
62
63
  DEFAULT = '',
63
64
  }
64
65