agora-appbuilder-core 2.3.0-beta.9 → 3.0.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 (205) hide show
  1. package/Readme.md +11 -6
  2. package/package.json +1 -1
  3. package/template/Gulpfile.js +121 -83
  4. package/template/_gitignore +2 -2
  5. package/template/_package-lock.json +12959 -13248
  6. package/template/agora-rn-uikit/src/AgoraUIKit.tsx +2 -2
  7. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +2 -0
  8. package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +3 -3
  9. package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +4 -5
  10. package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +3 -1
  11. package/template/agora-rn-uikit/src/Controls/LocalControls.tsx +2 -2
  12. package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +1 -1
  13. package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +1 -1
  14. package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +1 -1
  15. package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +1 -1
  16. package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +4 -4
  17. package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +7 -5
  18. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +1 -1
  19. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +1 -1
  20. package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +2 -2
  21. package/template/agora-rn-uikit/src/Rtc/Create.tsx +88 -43
  22. package/template/agora-rn-uikit/src/Rtc/Join.tsx +13 -4
  23. package/template/agora-rn-uikit/src/RtcConfigure.tsx +36 -19
  24. package/template/agora-rn-uikit/src/Utils/permission.ts +17 -6
  25. package/template/babel.config.js +9 -9
  26. package/template/bridge/rtc/webNg/RtcEngine.ts +51 -26
  27. package/template/customization-api/action-library.ts +22 -0
  28. package/template/{fpe-api/context.ts → customization-api/app-state.ts} +16 -14
  29. package/template/customization-api/customEvents.ts +9 -0
  30. package/template/{fpe-api/install.ts → customization-api/customize.ts} +27 -26
  31. package/template/{fpe-api → customization-api}/index.ts +11 -6
  32. package/template/{fpe-api/components.ts → customization-api/sub-components.ts} +22 -3
  33. package/template/{fpe-api → customization-api}/typeDefinition.ts +13 -14
  34. package/template/customization-api/utils.ts +30 -0
  35. package/template/{fpe-implementation → customization-implementation}/createHook.ts +0 -0
  36. package/template/{fpe-implementation/dummyFpe.ts → customization-implementation/dummyConfig.ts} +4 -4
  37. package/template/customization-implementation/index.ts +4 -0
  38. package/template/{fpe-api/useFpe.tsx → customization-implementation/useCustomization.tsx} +12 -12
  39. package/template/{fpe.config.js → customization.config.js} +11 -11
  40. package/template/electron/main/index.js +42 -35
  41. package/template/esbuild.rsdk.go +8 -17
  42. package/template/global.d.ts +4 -3
  43. package/template/index.rsdk.tsx +13 -5
  44. package/template/index.wsdk.tsx +21 -5
  45. package/template/package.json +3 -0
  46. package/template/react-native-toast-message/src/index.js +3 -7
  47. package/template/react-native-toast-message/src/{index.wsdk.js → index.sdk.tsx} +1 -1
  48. package/template/react-native-toast-message/src/styles.sdk.ts +17 -0
  49. package/template/src/App.tsx +8 -4
  50. package/template/src/AppWrapper.tsx +8 -6
  51. package/template/src/SDKAppWrapper.tsx +28 -21
  52. package/template/src/app-state/useLocalUserInfo.ts +8 -0
  53. package/template/src/app-state/useMessages.ts +52 -0
  54. package/template/src/atoms/PrimaryButton.tsx +2 -2
  55. package/template/src/atoms/SecondaryButton.tsx +12 -4
  56. package/template/src/atoms/TextInput.tsx +2 -2
  57. package/template/src/components/Chat.tsx +22 -11
  58. package/template/src/components/ChatContext.ts +10 -27
  59. package/template/src/components/Controls.native.tsx +13 -7
  60. package/template/src/components/Controls.tsx +15 -24
  61. package/template/src/components/DeviceConfigure.tsx +4 -3
  62. package/template/src/components/EventsConfigure.tsx +54 -0
  63. package/template/src/components/GridVideo.tsx +5 -6
  64. package/template/src/components/HostControlView.tsx +13 -19
  65. package/template/src/components/Navbar.tsx +54 -41
  66. package/template/src/components/NetworkQualityContext.tsx +4 -3
  67. package/template/src/components/ParticipantsView.tsx +7 -7
  68. package/template/src/components/PinnedVideo.tsx +3 -4
  69. package/template/src/components/Precall.native.tsx +3 -3
  70. package/template/src/components/Precall.tsx +14 -10
  71. package/template/src/components/RTMConfigure.tsx +61 -219
  72. package/template/src/components/SettingsView.tsx +6 -3
  73. package/template/src/components/Share.tsx +24 -18
  74. package/template/src/components/chat-messages/useChatMessages.tsx +397 -80
  75. package/template/src/components/chat-notification/useChatNotification.tsx +2 -2
  76. package/template/src/components/chat-ui/useChatUIControl.tsx +1 -1
  77. package/template/src/components/common/Logo.tsx +3 -2
  78. package/template/src/components/contexts/LiveStreamDataContext.tsx +3 -3
  79. package/template/src/components/contexts/ScreenShareContext.tsx +3 -1
  80. package/template/src/components/contexts/VideoMeetingDataContext.tsx +85 -0
  81. package/template/src/components/contexts/WhiteboardContext.tsx +8 -8
  82. package/template/src/components/livestream/LiveStreamContext.tsx +88 -74
  83. package/template/src/components/meeting-info/useMeetingInfo.tsx +23 -19
  84. package/template/src/components/meeting-info/useSetMeetingInfo.tsx +1 -1
  85. package/template/src/components/participants/AllAudienceParticipants.tsx +2 -2
  86. package/template/src/components/participants/AllHostParticipants.tsx +4 -4
  87. package/template/src/components/participants/MeParticipant.tsx +5 -3
  88. package/template/src/components/participants/ParticipantName.tsx +2 -2
  89. package/template/src/components/participants/RemoteParticipants.tsx +9 -7
  90. package/template/src/components/precall/LocalMute.native.tsx +14 -10
  91. package/template/src/components/precall/LocalMute.tsx +7 -5
  92. package/template/src/components/precall/VideoPreview.native.tsx +6 -6
  93. package/template/src/components/precall/VideoPreview.tsx +3 -3
  94. package/template/src/components/precall/joinCallBtn.tsx +3 -3
  95. package/template/src/components/precall/meetingTitle.tsx +3 -1
  96. package/template/src/components/precall/selectDevice.tsx +2 -2
  97. package/template/src/components/precall/usePreCall.tsx +1 -1
  98. package/template/src/components/styles.ts +3 -3
  99. package/template/src/components/useShareLink.tsx +69 -29
  100. package/template/src/components/useUserPreference.tsx +16 -15
  101. package/template/src/components/useWakeLock.tsx +3 -3
  102. package/template/src/language/i18nTypes.ts +1 -1
  103. package/template/src/language/index.ts +2 -2
  104. package/template/src/language/useLanguage.tsx +2 -3
  105. package/template/src/pages/Authenticate.tsx +3 -2
  106. package/template/src/pages/Create.tsx +18 -20
  107. package/template/src/pages/Join.tsx +6 -7
  108. package/template/src/pages/VideoCall.tsx +74 -66
  109. package/template/src/pages/create/useCreate.tsx +1 -1
  110. package/template/src/pages/video-call/CustomUserContextHolder.tsx +14 -6
  111. package/template/src/pages/video-call/DefaultLayouts.ts +8 -8
  112. package/template/src/pages/video-call/{NameWithMicStatus.tsx → NameWithMicIcon.tsx} +8 -1
  113. package/template/src/pages/video-call/RenderComponent.tsx +7 -10
  114. package/template/src/pages/video-call/VideoCallScreen.tsx +31 -22
  115. package/template/src/pages/video-call/VideoComponent.tsx +13 -15
  116. package/template/src/pages/video-call/VideoRenderer.tsx +6 -6
  117. package/template/src/pages/video-call/useLayoutsData.ts +23 -0
  118. package/template/src/rtm/RTMEngine.ts +13 -0
  119. package/template/src/rtm-events/EventUtils.ts +20 -20
  120. package/template/src/rtm-events/EventsQueue.ts +9 -3
  121. package/template/src/rtm-events/constants.ts +5 -0
  122. package/template/src/rtm-events/index.tsx +1 -3
  123. package/template/src/{custom-events/CustomEvents.ts → rtm-events-api/Events.ts} +67 -61
  124. package/template/src/rtm-events-api/index.tsx +6 -0
  125. package/template/src/rtm-events-api/types.ts +22 -0
  126. package/template/src/subComponents/ChatBubble.tsx +24 -8
  127. package/template/src/subComponents/ChatContainer.tsx +24 -15
  128. package/template/src/subComponents/ChatInput.tsx +56 -42
  129. package/template/src/subComponents/LanguageSelector.tsx +2 -2
  130. package/template/src/subComponents/LayoutIconDropdown.native.tsx +5 -5
  131. package/template/src/subComponents/LayoutIconDropdown.tsx +7 -7
  132. package/template/src/subComponents/LocalAudioMute.tsx +3 -4
  133. package/template/src/subComponents/LocalEndCall.tsx +3 -6
  134. package/template/src/subComponents/LocalSwitchCamera.tsx +3 -4
  135. package/template/src/subComponents/LocalVideoMute.tsx +3 -3
  136. package/template/src/subComponents/NetworkQualityPill.tsx +8 -9
  137. package/template/src/subComponents/OpenInNativeButton.tsx +2 -3
  138. package/template/src/subComponents/RemoteAudioMute.tsx +5 -11
  139. package/template/src/subComponents/RemoteEndCall.tsx +3 -10
  140. package/template/src/subComponents/RemoteVideoMute.tsx +3 -10
  141. package/template/src/subComponents/SelectDevice.tsx +1 -1
  142. package/template/src/subComponents/SelectOAuth.tsx +3 -2
  143. package/template/src/subComponents/SidePanelButtons.ts +6 -5
  144. package/template/src/subComponents/TextWithTooltip.tsx +6 -2
  145. package/template/src/subComponents/{toastConfig.tsx → ToastConfig.tsx} +2 -2
  146. package/template/src/subComponents/chat/ChatParticipants.tsx +6 -5
  147. package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +2 -2
  148. package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +4 -3
  149. package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +2 -2
  150. package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +2 -4
  151. package/template/src/subComponents/livestream/index.ts +2 -2
  152. package/template/src/subComponents/recording/useRecording.tsx +44 -23
  153. package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +11 -5
  154. package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +46 -34
  155. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +97 -38
  156. package/template/src/subComponents/screenshare/useScreenshare.tsx +1 -1
  157. package/template/src/utils/SdkEvents.ts +9 -46
  158. package/template/src/utils/common.tsx +25 -9
  159. package/template/src/utils/getUniqueID.ts +5 -0
  160. package/template/src/utils/isMobileOrTablet.native.ts +2 -2
  161. package/template/src/utils/isMobileOrTablet.ts +21 -8
  162. package/template/src/utils/useButtonTemplate.tsx +1 -1
  163. package/template/src/utils/useCreateMeeting.ts +21 -10
  164. package/template/src/utils/useGetMeetingPhrase.ts +11 -8
  165. package/template/src/utils/{IsAttendeeUser.ts → useIsAttendee.ts} +3 -1
  166. package/template/src/utils/{isAudioEnabled.ts → useIsAudioEnabled.ts} +4 -4
  167. package/template/src/utils/{isHostUser.ts → useIsHost.ts} +13 -16
  168. package/template/src/utils/{isPSTNUser.ts → useIsPSTN.ts} +2 -2
  169. package/template/src/utils/{isScreenShareUser.ts → useIsScreenShare.ts} +0 -0
  170. package/template/src/utils/{isVideoEnabled.ts → useIsVideoEnabled.ts} +5 -6
  171. package/template/src/utils/useJoinMeeting.ts +8 -6
  172. package/template/src/utils/useLayout.tsx +5 -5
  173. package/template/src/utils/useMutePSTN.ts +5 -3
  174. package/template/src/utils/useMuteToggleLocal.ts +3 -4
  175. package/template/src/utils/useRemoteEndCall.ts +11 -10
  176. package/template/src/utils/useRemoteMute.ts +42 -20
  177. package/template/src/utils/useSidePanel.tsx +1 -1
  178. package/template/src/utils/useString.ts +2 -2
  179. package/template/src/utils/useUserName.ts +11 -0
  180. package/template/tsconfig_fpeApi.json +8 -9
  181. package/template/tsconfig_rsdk_index.json +8 -9
  182. package/template/tsconfig_wsdk_index.json +8 -9
  183. package/template/webpack.commons.js +9 -9
  184. package/template/webpack.rsdk.config.js +4 -2
  185. package/template/webpack.ts.config.js +6 -6
  186. package/template/webpack.wsdk.config.js +2 -1
  187. package/template/fpe-api/fpeEvents.ts +0 -9
  188. package/template/fpe-api/utils.ts +0 -61
  189. package/template/fpe-implementation/index.ts +0 -1
  190. package/template/fpe-todo.txt +0 -14
  191. package/template/src/components/RTMEvents.tsx +0 -84
  192. package/template/src/custom-events/index.tsx +0 -4
  193. package/template/src/custom-events/types.ts +0 -51
  194. package/template/src/pages/video-call/CustomLayout.ts +0 -17
  195. package/template/src/rtm-events/types.ts +0 -7
  196. package/template/src/utils/getMeetingInvite.ts +0 -53
  197. package/template/src/utils/useGroupMessages.ts +0 -24
  198. package/template/src/utils/useNavParams.ts +0 -6
  199. package/template/src/utils/useNavigateTo.ts +0 -8
  200. package/template/src/utils/usePrivateMessages.ts +0 -33
  201. package/template/src/utils/useSendControlMessage.ts +0 -51
  202. package/template/src/utils/useSendMessage.ts +0 -40
  203. package/template/src/utils/useSetUnreadMessageCount.ts +0 -43
  204. package/template/src/utils/useUnreadMessageCount.ts +0 -50
  205. package/template/src/utils/useUserList.ts +0 -26
@@ -30,8 +30,8 @@ import LiveStreamContext from './livestream';
30
30
  import {numFormatter} from '../utils/index';
31
31
  import {useLayout} from '../utils/useLayout';
32
32
  import {useChatNotification} from '../components/chat-notification/useChatNotification';
33
- import useCustomLayout from '../pages/video-call/CustomLayout';
34
- import {isIOS, isValidReactComponent, isWeb} from '../utils/common';
33
+ import useLayoutsData from '../pages/video-call/useLayoutsData';
34
+ import {isIOS, isValidReactComponent, isWebInternal} from '../utils/common';
35
35
  import {useChangeDefaultLayout} from '../pages/video-call/DefaultLayouts';
36
36
  import {useRecording} from '../subComponents/recording/useRecording';
37
37
  import LayoutIconDropdown from '../subComponents/LayoutIconDropdown';
@@ -49,7 +49,7 @@ import Styles from './styles';
49
49
  const RenderSeparator = () => {
50
50
  const {getDimensionData} = useContext(DimensionContext);
51
51
  const {isDesktop} = getDimensionData();
52
- return isWeb && isDesktop ? (
52
+ return isWebInternal() && isDesktop ? (
53
53
  <View style={style.navItem}>
54
54
  <View style={style.navItemSeparator}></View>
55
55
  </View>
@@ -60,6 +60,7 @@ const RenderSeparator = () => {
60
60
 
61
61
  const ParticipantsCountView = () => {
62
62
  const {onlineUsersCount} = useContext(ChatContext);
63
+
63
64
  return (
64
65
  <>
65
66
  {onlineUsersCount !== 0 && (
@@ -77,7 +78,7 @@ const ParticipantsCountView = () => {
77
78
  );
78
79
  };
79
80
 
80
- interface ParticipantsIconButtonInterface {
81
+ interface ParticipantsIconButtonProps {
81
82
  liveStreamingRequestAlertIconPosition?: {
82
83
  top?: number;
83
84
  right?: number;
@@ -91,10 +92,10 @@ interface ParticipantsIconButtonInterface {
91
92
  buttonTemplateName?: ButtonTemplateName,
92
93
  ) => JSX.Element;
93
94
  }
94
- const ParticipantsIconButton = (props: ParticipantsIconButtonInterface) => {
95
+ const ParticipantsIconButton = (props: ParticipantsIconButtonProps) => {
95
96
  const {
96
97
  liveStreamingRequestAlertIconPosition = {
97
- top: isWeb ? -10 : 2,
98
+ top: isWebInternal() ? -10 : 2,
98
99
  left: undefined,
99
100
  right: undefined,
100
101
  bottom: undefined,
@@ -153,7 +154,7 @@ const ParticipantsIconButton = (props: ParticipantsIconButtonInterface) => {
153
154
  );
154
155
  };
155
156
 
156
- interface ChatIconButtonInterface {
157
+ interface ChatIconButtonProps {
157
158
  badgeContainerPosition?: {
158
159
  top?: number;
159
160
  right?: number;
@@ -170,10 +171,10 @@ interface ChatIconButtonInterface {
170
171
  ) => JSX.Element;
171
172
  }
172
173
 
173
- const ChatIconButton = (props: ChatIconButtonInterface) => {
174
+ const ChatIconButton = (props: ChatIconButtonProps) => {
174
175
  const {
175
176
  badgeContainerPosition = {
176
- top: isWeb ? -10 : 2,
177
+ top: isWebInternal() ? -10 : 2,
177
178
  left: undefined,
178
179
  right: undefined,
179
180
  bottom: undefined,
@@ -248,7 +249,7 @@ const ChatIconButton = (props: ChatIconButtonInterface) => {
248
249
  );
249
250
  };
250
251
 
251
- interface LayoutIconButtonInterface {
252
+ interface LayoutIconButtonProps {
252
253
  modalPosition?: {
253
254
  top?: number;
254
255
  right?: number;
@@ -262,18 +263,19 @@ interface LayoutIconButtonInterface {
262
263
  ) => JSX.Element;
263
264
  }
264
265
 
265
- const LayoutIconButton = (props: LayoutIconButtonInterface) => {
266
+ const LayoutIconButton = (props: LayoutIconButtonProps) => {
266
267
  const {modalPosition} = props;
268
+
267
269
  //commented for v1 release
268
270
  //const layoutLabel = useString('layoutLabel')('');
269
271
  const layoutLabel = 'Layouts';
270
272
  const defaultTemplateValue = useButtonTemplate().buttonTemplateName;
271
273
  const {buttonTemplateName = defaultTemplateValue} = props;
272
274
  const [showDropdown, setShowDropdown] = useState(false);
273
- const layouts = useCustomLayout();
275
+ const layouts = useLayoutsData();
274
276
  const changeLayout = useChangeDefaultLayout();
275
- const {activeLayoutName} = useLayout();
276
- const layout = layouts.findIndex((item) => item.name === activeLayoutName);
277
+ const {currentLayout} = useLayout();
278
+ const layout = layouts.findIndex((item) => item.name === currentLayout);
277
279
  const renderLayoutIcon = (showDropdown?: boolean) => {
278
280
  let onPress = () => {};
279
281
  let renderContent = [];
@@ -348,7 +350,10 @@ const Navbar = () => {
348
350
  //commented for v1 release
349
351
  //const recordingLabel = useString('recordingLabel')();
350
352
  const recordingLabel = 'Recording';
351
- const {meetingTitle} = useMeetingInfo();
353
+ const {
354
+ data: {meetingTitle},
355
+ } = useMeetingInfo();
356
+
352
357
  const {isRecordingActive} = useRecording();
353
358
  const {getDimensionData} = useContext(DimensionContext);
354
359
  const {isDesktop} = getDimensionData();
@@ -356,15 +361,15 @@ const Navbar = () => {
356
361
  return (
357
362
  <View
358
363
  style={[
359
- isWeb ? style.navHolder : style.navHolderNative,
364
+ isWebInternal() ? style.navHolder : style.navHolderNative,
360
365
  {backgroundColor: $config.SECONDARY_FONT_COLOR + 80},
361
- isWeb
366
+ isWebInternal()
362
367
  ? {
363
368
  justifyContent: isMobileOrTablet() ? 'space-between' : 'flex-end',
364
369
  }
365
370
  : {},
366
371
  ]}>
367
- {isRecordingActive && !isMobileOrTablet() ? (
372
+ {isRecordingActive ? (
368
373
  <View
369
374
  style={[
370
375
  style.recordingView,
@@ -379,17 +384,19 @@ const Navbar = () => {
379
384
  }}
380
385
  color="#FD0845"
381
386
  />
382
- <Text
383
- style={{
384
- fontSize: isWeb ? 16 : 12,
385
- color: '#FD0845',
386
- fontWeight: '400',
387
- alignSelf: 'center',
388
- textAlign: 'center',
389
- flex: 1,
390
- }}>
391
- {recordingLabel}
392
- </Text>
387
+ {!isMobileOrTablet() && (
388
+ <Text
389
+ style={{
390
+ fontSize: isWebInternal() ? 16 : 12,
391
+ color: '#FD0845',
392
+ fontWeight: '400',
393
+ alignSelf: 'center',
394
+ textAlign: 'center',
395
+ flex: 1,
396
+ }}>
397
+ {recordingLabel}
398
+ </Text>
399
+ )}
393
400
  </View>
394
401
  ) : (
395
402
  <></>
@@ -398,11 +405,11 @@ const Navbar = () => {
398
405
  style={[
399
406
  style.roomNameContainer,
400
407
  // @ts-ignore
401
- isWeb && !isMobileOrTablet()
408
+ isWebInternal() && !isMobileOrTablet()
402
409
  ? {transform: [{translateX: '50%'}]}
403
410
  : {},
404
411
  ]}>
405
- {isWeb ? (
412
+ {isWebInternal() ? (
406
413
  <View
407
414
  style={{
408
415
  flexDirection: 'row',
@@ -443,7 +450,11 @@ const Navbar = () => {
443
450
  style.navContainer,
444
451
  {
445
452
  minWidth:
446
- isWeb && isDesktop ? 300 : isMobileOrTablet() ? 160 : 200,
453
+ isWebInternal() && isDesktop
454
+ ? 300
455
+ : isMobileOrTablet()
456
+ ? 160
457
+ : 200,
447
458
  },
448
459
  ]}>
449
460
  <ParticipantsCountView />
@@ -478,14 +489,15 @@ const Navbar = () => {
478
489
  </View>
479
490
  );
480
491
  };
481
- export const NavBarComponentsArray: [
492
+ type NavBarComponentsArrayProps = [
482
493
  (props: CopyJoinInfoProps) => JSX.Element,
483
494
  () => JSX.Element,
484
- (props: ParticipantsIconButtonInterface) => JSX.Element,
485
- (props: ChatIconButtonInterface) => JSX.Element,
486
- (props: LayoutIconButtonInterface) => JSX.Element,
495
+ (props: ParticipantsIconButtonProps) => JSX.Element,
496
+ (props: ChatIconButtonProps) => JSX.Element,
497
+ (props: LayoutIconButtonProps) => JSX.Element,
487
498
  (props: SettingsIconButtonProps) => JSX.Element,
488
- ] = [
499
+ ];
500
+ export const NavBarComponentsArray: NavBarComponentsArrayProps = [
489
501
  CopyJoinInfo,
490
502
  ParticipantsCountView,
491
503
  ParticipantsIconButton,
@@ -493,6 +505,7 @@ export const NavBarComponentsArray: [
493
505
  LayoutIconButton,
494
506
  SettingsIconButton,
495
507
  ];
508
+
496
509
  const style = StyleSheet.create({
497
510
  backDrop: {
498
511
  position: 'absolute',
@@ -517,7 +530,7 @@ const style = StyleSheet.create({
517
530
  height: 35,
518
531
  maxHeight: 30,
519
532
  position: 'absolute',
520
- left: 10,
533
+ left: isMobileOrTablet() ? '50%' : 10,
521
534
  paddingHorizontal: 5,
522
535
  flexDirection: 'row',
523
536
  alignItems: 'center',
@@ -566,7 +579,7 @@ const style = StyleSheet.create({
566
579
  justifyContent: 'center',
567
580
  backgroundColor: $config.PRIMARY_COLOR,
568
581
  color: $config.SECONDARY_FONT_COLOR,
569
- fontFamily: isIOS ? 'Helvetica' : 'sans-serif',
582
+ fontFamily: isIOS() ? 'Helvetica' : 'sans-serif',
570
583
  borderRadius: 10,
571
584
  position: 'absolute',
572
585
  paddingHorizontal: 5,
@@ -584,7 +597,7 @@ const style = StyleSheet.create({
584
597
  justifyContent: 'center',
585
598
  },
586
599
  chipText: {
587
- fontFamily: isIOS ? 'Helvetica' : 'sans-serif',
600
+ fontFamily: isIOS() ? 'Helvetica' : 'sans-serif',
588
601
  fontSize: 12,
589
602
  color: $config.SECONDARY_FONT_COLOR,
590
603
  },
@@ -598,7 +611,7 @@ const style = StyleSheet.create({
598
611
  display: 'flex',
599
612
  flexDirection: 'row',
600
613
  justifyContent: 'space-around',
601
- backgroundColor: isWeb
614
+ backgroundColor: isWebInternal()
602
615
  ? $config.SECONDARY_FONT_COLOR
603
616
  : $config.SECONDARY_FONT_COLOR + '00',
604
617
  paddingVertical: 4,
@@ -9,11 +9,12 @@
9
9
  information visit https://appbuilder.agora.io.
10
10
  *********************************************
11
11
  */
12
- import React, {createContext, useContext, useState} from 'react';
13
- import {RtcContext, UidType, useLocalUid} from '../../agora-rn-uikit';
12
+ import React, {createContext, useState} from 'react';
13
+ import {UidType, useLocalUid} from '../../agora-rn-uikit';
14
14
  import useMount from './useMount';
15
15
  import icons from '../assets/icons';
16
16
  import {NetworkQualities} from '../language/default-labels/videoCallScreenLabels';
17
+ import {useRtc} from 'customization-api';
17
18
 
18
19
  /**
19
20
  * Network Icons container object with color and string mapping to network quality stat [ 0 - 8]
@@ -101,7 +102,7 @@ export const NetworkQualityProvider: React.FC = (props: {
101
102
  useState<NetworkQualityStatsInterface>({
102
103
  [localUid]: 0,
103
104
  });
104
- const {RtcEngine} = useContext(RtcContext);
105
+ const {RtcEngine} = useRtc();
105
106
 
106
107
  useMount(() => {
107
108
  function handleNetworkQuality(
@@ -18,10 +18,9 @@ import AllHostParticipants from './participants/AllHostParticipants';
18
18
  import AllAudienceParticipants from './participants/AllAudienceParticipants';
19
19
  import CurrentLiveStreamRequestsView from '../subComponents/livestream/CurrentLiveStreamRequestsView';
20
20
  import {useString} from '../utils/useString';
21
- import {isWeb} from '../utils/common';
21
+ import {isWebInternal} from '../utils/common';
22
22
  import {useMeetingInfo} from './meeting-info/useMeetingInfo';
23
23
  import {useLiveStreamDataContext} from './contexts/LiveStreamDataContext';
24
-
25
24
  const ParticipantView = () => {
26
25
  const {liveStreamData, audienceUids, hostUids} = useLiveStreamDataContext();
27
26
  const {rtcProps} = useContext(PropsContext);
@@ -32,18 +31,19 @@ const ParticipantView = () => {
32
31
  const hostLabel = 'Host';
33
32
  const audienceLabel = 'Audience';
34
33
  const participantsLabel = 'Participants';
35
- const {isHost} = useMeetingInfo();
34
+ const {
35
+ data: {isHost},
36
+ } = useMeetingInfo();
36
37
  const [dim, setDim] = useState([
37
38
  Dimensions.get('window').width,
38
39
  Dimensions.get('window').height,
39
40
  Dimensions.get('window').width > Dimensions.get('window').height,
40
41
  ]);
41
42
  const isSmall = dim[0] < 700;
42
-
43
43
  return (
44
44
  <View
45
45
  style={
46
- isWeb
46
+ isWebInternal()
47
47
  ? isSmall
48
48
  ? style.participantViewNative
49
49
  : style.participantView
@@ -232,14 +232,14 @@ const style = StyleSheet.create({
232
232
  },
233
233
  participantText: {
234
234
  lineHeight: 24,
235
- fontSize: isWeb ? 18 : 16,
235
+ fontSize: isWebInternal() ? 18 : 16,
236
236
  flexDirection: 'row',
237
237
  letterSpacing: 0.3,
238
238
  color: $config.PRIMARY_FONT_COLOR,
239
239
  fontWeight: '300',
240
240
  },
241
241
  participantTextSmall: {
242
- fontSize: isWeb ? 14 : 12,
242
+ fontSize: isWebInternal() ? 14 : 12,
243
243
  },
244
244
  dummyView: {
245
245
  flex: 0.5,
@@ -9,7 +9,7 @@
9
9
  information visit https://appbuilder.agora.io.
10
10
  *********************************************
11
11
  */
12
- import React, {useState, useContext} from 'react';
12
+ import React, {useState} from 'react';
13
13
  import {
14
14
  ScrollView,
15
15
  View,
@@ -18,9 +18,8 @@ import {
18
18
  Text,
19
19
  Pressable,
20
20
  } from 'react-native';
21
- import {RtcContext} from '../../agora-rn-uikit';
22
21
  import {layoutProps} from '../../theme.json';
23
- import {layoutComponent} from 'fpe-api';
22
+ import {layoutComponent, useRtc} from 'customization-api';
24
23
  import RenderComponent from '../pages/video-call/RenderComponent';
25
24
  const {topPinned} = layoutProps;
26
25
 
@@ -40,7 +39,7 @@ const PinnedVideo: layoutComponent = ({renderData}) => {
40
39
  };
41
40
  const isSidePinnedlayout = topPinned === true ? false : dim[2]; // if either explicity set to false or auto evaluation
42
41
  const [maxUid, ...minUids] = renderData;
43
- const {dispatch} = useContext(RtcContext);
42
+ const {dispatch} = useRtc();
44
43
 
45
44
  return (
46
45
  <View
@@ -12,7 +12,7 @@
12
12
  import React, {useContext} from 'react';
13
13
  import {View, Text, StyleSheet} from 'react-native';
14
14
  import {ClientRole, PropsContext} from '../../agora-rn-uikit';
15
- import {useFpe} from 'fpe-api';
15
+ import {useCustomization} from 'customization-implementation';
16
16
  import {useString} from '../utils/useString';
17
17
  import {isValidReactComponent} from '../utils/common';
18
18
  import {
@@ -36,7 +36,7 @@ const Precall = () => {
36
36
  Textbox,
37
37
  PrecallAfterView,
38
38
  PrecallBeforeView,
39
- } = useFpe((data) => {
39
+ } = useCustomization((data) => {
40
40
  const components: {
41
41
  PrecallAfterView: React.ComponentType;
42
42
  PrecallBeforeView: React.ComponentType;
@@ -111,7 +111,7 @@ const Precall = () => {
111
111
  const isAudienceInLiveStreaming = () =>
112
112
  $config.EVENT_MODE && rtcProps?.role == ClientRole.Audience;
113
113
 
114
- const FpePrecallComponent = useFpe((data) => {
114
+ const FpePrecallComponent = useCustomization((data) => {
115
115
  // commented for v1 release
116
116
  // if (
117
117
  // data?.components?.precall &&
@@ -11,12 +11,12 @@
11
11
  */
12
12
  import React, {useState, useContext, useEffect} from 'react';
13
13
  import {View, Text, StyleSheet, Dimensions} from 'react-native';
14
- import {RtcContext, PropsContext, ClientRole} from '../../agora-rn-uikit';
15
- import {isValidReactComponent, isWeb} from '../utils/common';
14
+ import {PropsContext, ClientRole} from '../../agora-rn-uikit';
15
+ import {isValidReactComponent, isWebInternal} from '../utils/common';
16
16
  import ColorContext from './ColorContext';
17
17
  import {useMeetingInfo} from './meeting-info/useMeetingInfo';
18
18
  import PreCallLogo from './common/Logo';
19
- import {useFpe} from 'fpe-api';
19
+ import {useCustomization} from 'customization-implementation';
20
20
  import PreCallLocalMute from './precall/LocalMute';
21
21
  import {
22
22
  PreCallJoinBtn,
@@ -27,9 +27,10 @@ import {
27
27
  } from './precall/index';
28
28
  import SDKEvents from '../utils/SdkEvents';
29
29
  import isSDKCheck from '../utils/isSDK';
30
+ import {useRtc} from 'customization-api';
30
31
 
31
32
  const JoinRoomInputView = () => {
32
- const {JoinButton, Textbox} = useFpe((data) => {
33
+ const {JoinButton, Textbox} = useCustomization((data) => {
33
34
  let components: {
34
35
  JoinButton: React.ComponentType;
35
36
  Textbox: React.ComponentType;
@@ -68,7 +69,7 @@ const JoinRoomInputView = () => {
68
69
  );
69
70
  };
70
71
 
71
- const Precall = (props: any) => {
72
+ const Precall = () => {
72
73
  const {primaryColor} = useContext(ColorContext);
73
74
  const {rtcProps} = useContext(PropsContext);
74
75
  const {
@@ -77,7 +78,7 @@ const Precall = (props: any) => {
77
78
  DeviceSelect,
78
79
  PrecallAfterView,
79
80
  PrecallBeforeView,
80
- } = useFpe((data) => {
81
+ } = useCustomization((data) => {
81
82
  const components: {
82
83
  PrecallAfterView: React.ComponentType;
83
84
  PrecallBeforeView: React.ComponentType;
@@ -138,8 +139,11 @@ const Precall = (props: any) => {
138
139
  // }
139
140
  return components;
140
141
  });
141
- const {isJoinDataFetched, meetingTitle} = useMeetingInfo();
142
- const rtc = useContext(RtcContext);
142
+ const {
143
+ isJoinDataFetched,
144
+ data: {meetingTitle},
145
+ } = useMeetingInfo();
146
+ const rtc = useRtc();
143
147
  const isSDK = isSDKCheck();
144
148
 
145
149
  const [dim, setDim] = useState<[number, number]>([
@@ -152,7 +156,7 @@ const Precall = (props: any) => {
152
156
  };
153
157
 
154
158
  useEffect(() => {
155
- if (isWeb && !isSDK) {
159
+ if (isWebInternal() && !isSDK) {
156
160
  if (meetingTitle) {
157
161
  document.title = meetingTitle + ' | ' + $config.APP_NAME;
158
162
  }
@@ -178,7 +182,7 @@ const Precall = (props: any) => {
178
182
 
179
183
  const brandHolder = () => <PreCallLogo />;
180
184
 
181
- const FpePrecallComponent = useFpe((data) => {
185
+ const FpePrecallComponent = useCustomization((data) => {
182
186
  // commented for v1 release
183
187
  // if (
184
188
  // data?.components?.precall &&