agora-appbuilder-core 4.0.25 → 4.0.26-beta-2

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 (29) hide show
  1. package/package.json +1 -1
  2. package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
  3. package/template/customization-api/typeDefinition.ts +3 -8
  4. package/template/customization-api/utils.ts +1 -0
  5. package/template/defaultConfig.js +51 -51
  6. package/template/src/AppWrapper.tsx +1 -1
  7. package/template/src/assets/font-styles.css +4 -0
  8. package/template/src/assets/fonts/icomoon.ttf +0 -0
  9. package/template/src/assets/selection.json +1 -3452
  10. package/template/src/atoms/ActionMenu.tsx +88 -23
  11. package/template/src/atoms/Carousel.tsx +30 -24
  12. package/template/src/atoms/CustomIcon.tsx +1 -0
  13. package/template/src/atoms/ParticipantsCount.tsx +3 -10
  14. package/template/src/atoms/RecordingInfo.tsx +25 -30
  15. package/template/src/atoms/Toolbar.tsx +0 -8
  16. package/template/src/atoms/ToolbarPreset.tsx +77 -45
  17. package/template/src/components/Controls.tsx +289 -218
  18. package/template/src/components/Leftbar.tsx +62 -43
  19. package/template/src/components/Navbar.tsx +80 -77
  20. package/template/src/components/NavbarMobile.tsx +51 -46
  21. package/template/src/components/Rightbar.tsx +60 -43
  22. package/template/src/components/room-info/useRoomInfo.tsx +1 -1
  23. package/template/src/language/default-labels/videoCallScreenLabels.ts +1 -2
  24. package/template/src/pages/video-call/ActionSheet.tsx +4 -4
  25. package/template/src/pages/video-call/ActionSheetContent.tsx +134 -211
  26. package/template/src/pages/video-call/VideoCallMobileView.tsx +21 -27
  27. package/template/src/pages/video-call/VideoCallScreen.tsx +30 -20
  28. package/template/src/pages/video-call/index.ts +2 -0
  29. package/template/src/utils/common.tsx +48 -0
@@ -137,10 +137,10 @@ const ActionSheet = props => {
137
137
  default:
138
138
  }
139
139
  };
140
- const orientation = useOrientation();
141
- if (orientation === 'LANDSCAPE') {
142
- return <></>;
143
- }
140
+ // const orientation = useOrientation();
141
+ // if (orientation === 'LANDSCAPE') {
142
+ // return <></>;
143
+ // }
144
144
  return (
145
145
  <>
146
146
  {showOverlay && (
@@ -1,5 +1,11 @@
1
1
  /* eslint-disable react-native/no-inline-styles */
2
- import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
2
+ import {
3
+ StyleSheet,
4
+ Text,
5
+ TouchableOpacity,
6
+ useWindowDimensions,
7
+ View,
8
+ } from 'react-native';
3
9
  import React, {useContext} from 'react';
4
10
  import ImageIcon from '../../atoms/ImageIcon';
5
11
  import LocalAudioMute from '../../subComponents/LocalAudioMute';
@@ -28,7 +34,7 @@ import {
28
34
  useContent,
29
35
  useLocalUserInfo,
30
36
  ToolbarItem,
31
- ToolbarCustomItem,
37
+ ToolbarItemHide,
32
38
  } from 'customization-api';
33
39
  import LayoutIconButton from '../../subComponents/LayoutIconButton';
34
40
  import CaptionIcon from '../../../src/subComponents/caption/CaptionIcon';
@@ -43,10 +49,7 @@ import {EventNames} from '../../rtm-events';
43
49
  import events from '../../rtm-events-api';
44
50
  import {getLanguageLabel} from '../../subComponents/caption/utils';
45
51
  import Toast from '../../../react-native-toast-message';
46
- import {
47
- CustomToolbarSort,
48
- updateToolbarDefaultConfig,
49
- } from '../../utils/common';
52
+ import {CustomToolbarMerge, CustomToolbarSorting} from '../../utils/common';
50
53
  import {ActionSheetProvider} from '../../utils/useActionSheet';
51
54
  import {useWaitingRoomContext} from '../../components/contexts/WaitingRoomContext';
52
55
  import {useSetRoomInfo} from '../../components/room-info/useSetRoomInfo';
@@ -57,6 +60,7 @@ import {
57
60
  sttSpokenLanguageToastHeading,
58
61
  sttSpokenLanguageToastSubHeading,
59
62
  } from '../../language/default-labels/videoCallScreenLabels';
63
+ import {filterObject} from '../../utils/index';
60
64
  //Icon for expanding Action Sheet
61
65
  interface ShowMoreIconProps {
62
66
  isExpanded: boolean;
@@ -121,7 +125,7 @@ const VBIcon = () => {
121
125
  <VBButton
122
126
  isVBOpen={isVBActive}
123
127
  setIsVBOpen={setIsVBActive}
124
- showLabel={true}
128
+ showLabel={$config.ICON_TEXT}
125
129
  />
126
130
  </ToolbarItem>
127
131
  );
@@ -199,58 +203,29 @@ interface CaptionIconBtnProps {
199
203
  }
200
204
 
201
205
  const CaptionIconBtn = (props: CaptionIconBtnProps) => {
202
- const {showLabel = $config.ICON_TEXT, onPress} = props;
203
- const {isCaptionON, isSTTActive} = useCaption();
204
- const {
205
- data: {isHost},
206
- } = useRoomInfo();
207
- const isDisabled = !(
208
- $config.ENABLE_STT &&
209
- (isHost || (!isHost && isSTTActive))
210
- );
206
+ const {onPress = () => {}} = props;
211
207
  return (
212
208
  <ToolbarItem>
213
209
  <CaptionIcon
214
210
  isOnActionSheet={true}
215
- showLabel={true}
211
+ showLabel={$config.ICON_TEXT}
216
212
  closeActionSheet={onPress}
217
213
  />
218
214
  </ToolbarItem>
219
215
  );
220
216
  };
221
217
 
222
- interface TranscriptIconProps {
223
- showLabel?: boolean;
224
- }
225
-
226
- const TranscriptIconBtn = (props: TranscriptIconProps) => {
227
- const {showLabel = $config.ICON_TEXT} = props;
228
- const {sidePanel} = useSidePanel();
229
- const isTranscriptON = sidePanel === SidePanelType.Transcript;
230
- const {isSTTActive} = useCaption();
231
- const {
232
- data: {isHost},
233
- } = useRoomInfo();
234
- const isDisabled = !(
235
- $config.ENABLE_STT &&
236
- (isHost || (!isHost && isSTTActive))
237
- );
218
+ const TranscriptIconBtn = () => {
238
219
  if (!$config.ENABLE_MEETING_TRANSCRIPT) {
239
220
  return null;
240
221
  }
241
222
  return (
242
223
  <ToolbarItem>
243
- <TranscriptIcon isOnActionSheet={true} showLabel={true} />
224
+ <TranscriptIcon isOnActionSheet={true} showLabel={$config.ICON_TEXT} />
244
225
  </ToolbarItem>
245
226
  );
246
227
  };
247
228
 
248
- const ToastIcon = ({color}) => (
249
- <View style={{marginRight: 12, alignSelf: 'center', width: 24, height: 24}}>
250
- <ImageIcon iconType="plain" tintColor={color} name={'lang-select'} />
251
- </View>
252
- );
253
-
254
229
  const ActionSheetContent = props => {
255
230
  const heading = useString<'Set' | 'Changed'>(sttSpokenLanguageToastHeading);
256
231
  const subheading = useString<{
@@ -263,18 +238,16 @@ const ActionSheetContent = props => {
263
238
  const {
264
239
  handleSheetChanges,
265
240
  isExpanded,
266
- customItems = [],
267
241
  includeDefaultItems = true,
268
242
  displayCustomBottomSheetContent = false,
269
243
  customBottomSheetContent,
270
244
  native = false,
271
- defaultItemsConfig = {},
245
+ items = {},
272
246
  } = props;
273
247
 
274
248
  const {localUid} = useContext(ChatContext);
275
249
  const {isScreenshareActive} = useScreenshare();
276
250
  const {rtcProps} = useContext(PropsContext);
277
- const {setSidePanel} = useSidePanel();
278
251
  const {setRoomInfo} = useSetRoomInfo();
279
252
  const {
280
253
  data: {isHost},
@@ -393,183 +366,118 @@ const ActionSheetContent = props => {
393
366
 
394
367
  const isPendingWaitingRoomApproval = isHost && waitingRoomUids.length > 0;
395
368
 
396
- const defaultItems = [
397
- {
398
- default: true,
369
+ const defaultItems = {
370
+ 'local-audio': {
399
371
  order: 0,
400
- hide: 'no',
401
- align: 'start',
402
- componentName: 'local-audio',
403
- component: isAudioVideoControlsDisabled ? null : <AudioIcon />,
372
+ component: isAudioVideoControlsDisabled ? null : AudioIcon,
404
373
  },
405
- {
406
- default: true,
407
- order: 0,
408
- hide: 'no',
409
- align: 'start',
410
- /*For AudioCast Host:Chat ,Attendee:Raise Hand
411
- For VoiceChat Host:Chat, Attendee:Chat
412
- */
413
- componentName: 'chat',
414
- component: (isAudioCastHost ||
415
- isVoiceChatHost ||
416
- isVoiceChatAudience) && <ChatIcon />,
417
- },
418
-
419
- {
420
- default: true,
421
- order: 0,
422
- hide: 'no',
423
- align: 'start',
424
- componentName: 'raise-hand',
374
+ 'raise-hand': {
375
+ order: $config.RAISE_HAND && isAudioRoom ? 0 : 4,
425
376
  component:
426
- (isAudioCastAudience && isLiveStream && isAudience) ||
427
- (isBroadCasting && !isHost) ? (
428
- $config.RAISE_HAND && isAudioRoom ? (
429
- <LiveStreamIcon />
430
- ) : null
431
- ) : null,
377
+ ((isAudioCastAudience && isLiveStream && isAudience) ||
378
+ (isBroadCasting && !isHost)
379
+ ? LiveStreamIcon
380
+ : null) ||
381
+ ((isLiveStream && isAudience) || (isBroadCasting && !isHost)
382
+ ? LiveStreamIcon
383
+ : null),
432
384
  },
433
- {
434
- default: true,
385
+ 'local-video': {
435
386
  order: 1,
436
- hide: 'no',
437
- align: 'start',
438
- componentName: 'local-video',
439
387
  component:
440
- !isAudioRoom && (isAudioVideoControlsDisabled ? null : <CamIcon />),
388
+ !isAudioRoom && (isAudioVideoControlsDisabled ? null : CamIcon),
441
389
  },
442
- {
443
- default: true,
390
+ 'end-call': {
444
391
  order: 2,
445
- hide: 'no',
446
- align: 'start',
447
- componentName: 'end-call',
448
- component: <EndCallIcon />,
392
+ component: EndCallIcon,
449
393
  },
450
- //reset of the controls
451
- {
452
- default: true,
453
- order: 4,
454
- hide: 'no',
455
- align: 'start',
456
- componentName: 'raise-hand',
457
- component:
458
- (isLiveStream && isAudience) || (isBroadCasting && !isHost) ? (
459
- $config.RAISE_HAND && !isAudioRoom ? (
460
- <LiveStreamIcon />
461
- ) : null
462
- ) : null,
463
- },
464
-
465
- {
466
- default: true,
467
- order: 5,
468
- hide: 'no',
469
- align: 'start',
470
- componentName: 'chat',
471
- component: !(
472
- isAudioCastHost ||
473
- isVoiceChatHost ||
474
- isVoiceChatAudience
475
- ) && <ChatIcon />,
394
+ chat: {
395
+ order: !(isAudioCastHost || isVoiceChatHost || isVoiceChatAudience)
396
+ ? 5
397
+ : 0,
398
+ /*For AudioCast Host:Chat ,Attendee:Raise Hand
399
+ For VoiceChat Host:Chat, Attendee:Chat
400
+ */
401
+ component: ChatIcon,
476
402
  },
477
- {
478
- default: true,
403
+ participant: {
479
404
  order: 6,
480
- hide: 'no',
481
- align: 'start',
482
- componentName: 'participant',
483
- component: <ParticipantsIcon />,
405
+ component: ParticipantsIcon,
484
406
  },
485
- {
486
- default: true,
407
+ recording: {
487
408
  order: 7,
488
- hide: 'no',
489
- align: 'start',
490
- componentName: 'recording',
491
- component: isHost && $config.CLOUD_RECORDING ? <RecordingIcon /> : null,
409
+ component: isHost && $config.CLOUD_RECORDING ? RecordingIcon : null,
492
410
  },
493
- {
494
- default: true,
411
+ 'virtual-background': {
495
412
  order: 7,
496
- hide: 'no',
497
- align: 'start',
498
- componentName: 'virtual-background',
499
413
  component:
500
- $config.ENABLE_VIRTUAL_BACKGROUND && !$config.AUDIO_ROOM ? (
501
- <VBIcon />
502
- ) : null,
414
+ $config.ENABLE_VIRTUAL_BACKGROUND && !$config.AUDIO_ROOM
415
+ ? VBIcon
416
+ : null,
503
417
  },
504
- {
505
- default: true,
418
+ 'switch-camera': {
506
419
  order: 8,
507
- hide: 'no',
508
- align: 'start',
509
- componentName: 'switch-camera',
510
420
  component:
511
421
  !isAudioRoom &&
512
- (isAudioVideoControlsDisabled ? null : <SwitchCameraIcon />),
422
+ (isAudioVideoControlsDisabled ? null : SwitchCameraIcon),
513
423
  },
514
- {
515
- default: true,
424
+ layout: {
516
425
  order: 9,
517
- hide: 'no',
518
- align: 'start',
519
- componentName: 'layout',
520
- component: <LayoutIcon />,
426
+ component: LayoutIcon,
521
427
  },
522
- {
523
- default: true,
428
+ settings: {
524
429
  order: 10,
525
- hide: 'no',
526
- align: 'start',
527
- componentName: 'settings',
528
- component: <SettingsIcon />,
430
+ component: SettingsIcon,
529
431
  },
530
- {
531
- default: true,
432
+ invite: {
532
433
  order: 11,
533
- hide: 'no',
534
- align: 'start',
535
- componentName: 'invite',
536
- component: <ShareIcon />,
434
+ component: ShareIcon,
537
435
  },
538
- {
539
- default: true,
436
+ caption: {
540
437
  order: 12,
541
- hide: 'no',
542
- align: 'start',
543
- componentName: 'caption',
544
- component: (
545
- <CaptionIconBtn
546
- onPress={() => handleSheetChanges(isExpanded ? 0 : 1)}
547
- />
548
- ),
438
+ component: CaptionIconBtn,
439
+ props: {
440
+ onPress: () => handleSheetChanges(isExpanded ? 0 : 1),
441
+ },
549
442
  },
550
- {
551
- default: true,
443
+ transcript: {
552
444
  order: 13,
553
- hide: 'no',
554
- align: 'start',
555
- componentName: 'transcript',
556
- component: <TranscriptIconBtn />,
445
+ component: TranscriptIconBtn,
557
446
  },
558
- ];
447
+ };
559
448
 
560
- const isHidden = i => {
561
- return i?.hide === 'yes';
449
+ const {width, height} = useWindowDimensions();
450
+
451
+ const isHidden = (hide: ToolbarItemHide = false) => {
452
+ try {
453
+ return typeof hide === 'boolean'
454
+ ? hide
455
+ : typeof hide === 'function'
456
+ ? hide(width, height)
457
+ : false;
458
+ } catch (error) {
459
+ console.log('debugging isHidden error', error);
460
+ return false;
461
+ }
562
462
  };
563
- const combinedItems = customItems
564
- ?.concat(
565
- includeDefaultItems
566
- ? updateToolbarDefaultConfig(defaultItems, defaultItemsConfig)
567
- : [],
568
- )
569
- ?.filter(i => !isHidden(i))
570
- //to filter empty component because of some condition array will have empty component
571
- ?.filter(i => i?.component)
572
- ?.sort(CustomToolbarSort);
463
+
464
+ const combinedData = {...items, ...items?.more?.fields};
465
+
466
+ const mergedItems = CustomToolbarMerge(
467
+ includeDefaultItems ? defaultItems : {},
468
+ combinedData,
469
+ );
470
+
471
+ const displayItems = filterObject(
472
+ mergedItems,
473
+ ([_, v]) => !isHidden(v?.hide) && v?.component,
474
+ );
475
+
476
+ console.log('debugging displayItems', displayItems);
477
+
478
+ const displayItemsOrdered = CustomToolbarSorting(displayItems);
479
+
480
+ console.log('debugging displayItemsOrdered', displayItemsOrdered);
573
481
 
574
482
  if (displayCustomBottomSheetContent) {
575
483
  return <View>{customBottomSheetContent}</View>;
@@ -585,17 +493,25 @@ const ActionSheetContent = props => {
585
493
  ]}>
586
494
  {/**If no items more than 4 then render firstrender first 3 items and render show more icon */}
587
495
  {/**If no items more less or equal to 4 then render n items and don't show more icon */}
588
- {combinedItems
589
- ?.slice(0, combinedItems?.length > 4 ? 3 : 4)
496
+ {displayItemsOrdered
497
+ ?.slice(0, displayItemsOrdered?.length > 4 ? 3 : 4)
590
498
  ?.map(i => {
591
- const Component = i?.component;
592
- if (Component) {
593
- return i?.default ? Component : <Component />;
594
- } else {
499
+ try {
500
+ const Component = displayItems[i]?.component;
501
+ if (Component) {
502
+ return <Component />;
503
+ } else {
504
+ return null;
505
+ }
506
+ } catch (error) {
507
+ console.error(
508
+ 'Error on rendering toolbar item in ActionSheet',
509
+ error,
510
+ );
595
511
  return null;
596
512
  }
597
513
  })}
598
- {combinedItems && combinedItems?.length > 4 ? (
514
+ {displayItemsOrdered && displayItemsOrdered?.length > 4 ? (
599
515
  <ShowMoreIcon
600
516
  isExpanded={isExpanded}
601
517
  showNotification={
@@ -611,25 +527,34 @@ const ActionSheetContent = props => {
611
527
  </View>
612
528
  </ActionSheetProvider>
613
529
 
614
- <CarouselWrapper data={combinedItems?.slice(3, combinedItems?.length)} />
530
+ <CarouselWrapper
531
+ data={displayItemsOrdered?.slice(3, displayItemsOrdered?.length)}
532
+ dataObject={displayItems}
533
+ />
615
534
  </View>
616
535
  );
617
536
  };
618
- const CarouselWrapper = ({data}) => {
537
+ const CarouselWrapper = ({data, dataObject}) => {
619
538
  const createSlides = () => {
620
539
  const slides = [];
621
540
  const items = data || [];
622
541
  // one slide can contain max of 8 icons
623
542
  for (let i = 0; i < items.length; i += 8) {
624
543
  const slideItems = items.slice(i, i + 8).map(item => {
625
- const Component = item?.component;
626
- return Component ? (
627
- item.default ? (
628
- Component
629
- ) : (
630
- <Component key={item.id} />
631
- )
632
- ) : null;
544
+ try {
545
+ const Component = dataObject[item]?.component;
546
+ if (Component) {
547
+ return <Component />;
548
+ } else {
549
+ return null;
550
+ }
551
+ } catch (error) {
552
+ console.error(
553
+ 'Error on rendering toolbar item in CarouselWrapper',
554
+ error,
555
+ );
556
+ return null;
557
+ }
633
558
  });
634
559
 
635
560
  slides.push({
@@ -645,13 +570,11 @@ const CarouselWrapper = ({data}) => {
645
570
 
646
571
  const isPaginationRequired = slides.length > 1;
647
572
 
648
- if (isPaginationRequired)
649
- return (
650
- <View style={{flexDirection: 'row'}}>
651
- <Carousel data={slides} />
652
- </View>
653
- );
654
- return <View style={styles.row}>{slides[0].component}</View>;
573
+ return (
574
+ <View style={{flexDirection: 'row'}}>
575
+ <Carousel data={slides} isPaginationRequired={isPaginationRequired} />
576
+ </View>
577
+ );
655
578
  };
656
579
 
657
580
  export default ActionSheetContent;
@@ -21,7 +21,7 @@ import {DispatchContext, RtcContext} from '../../../agora-rn-uikit';
21
21
  import {
22
22
  useLocalUserInfo,
23
23
  useContent,
24
- ToolbarCustomItem,
24
+ ToolbarPresetProps,
25
25
  } from 'customization-api';
26
26
  import CaptionContainer from '../../subComponents/caption/CaptionContainer';
27
27
  import {useScreenContext} from '../../components/contexts/ScreenShareContext';
@@ -32,7 +32,7 @@ import useAppState from '../../utils/useAppState';
32
32
  import {ToolbarPosition, ToolbarProvider} from '../../utils/useToolbar';
33
33
  import {ActionSheetProvider} from '../../utils/useActionSheet';
34
34
  import {useCustomization} from 'customization-implementation';
35
- import NavbarMobile from '../../components/NavbarMobile';
35
+ import NavbarMobile, {NavbarProps} from '../../components/NavbarMobile';
36
36
  import {useVB} from '../../components/virtual-background/useVB';
37
37
  import VBPanel from '../../components/virtual-background/VBPanel';
38
38
  import {WhiteboardListener} from '../../components/Controls';
@@ -163,23 +163,22 @@ const VideoCallView = React.memo(() => {
163
163
  const {BottombarComponent, BottombarProps, TopbarComponent, TopbarProps} =
164
164
  useCustomization(data => {
165
165
  let components: {
166
- BottombarComponent: React.ComponentType;
167
- BottombarProps?: ToolbarCustomItem[];
168
- TopbarComponent: React.ComponentType;
169
- TopbarProps?: ToolbarCustomItem[];
166
+ BottombarComponent: React.ComponentType<any>;
167
+ BottombarProps?: ToolbarPresetProps['items'];
168
+ TopbarComponent: React.ComponentType<NavbarProps>;
169
+ TopbarProps?: ToolbarPresetProps['items'];
170
170
  } = {
171
171
  BottombarComponent: ActionSheet,
172
- BottombarProps: [],
173
- //@ts-ignore
172
+ BottombarProps: {},
174
173
  TopbarComponent: NavbarMobile,
175
- TopbarProps: [],
174
+ TopbarProps: {},
176
175
  };
177
176
  if (
178
177
  data?.components?.videoCall &&
179
178
  typeof data?.components?.videoCall === 'object'
180
179
  ) {
181
180
  if (
182
- data?.components?.videoCall.bottomToolBar &&
181
+ data?.components?.videoCall?.bottomToolBar &&
183
182
  typeof data?.components?.videoCall.bottomToolBar !== 'object' &&
184
183
  isValidReactComponent(data?.components?.videoCall.bottomToolBar)
185
184
  ) {
@@ -187,25 +186,25 @@ const VideoCallView = React.memo(() => {
187
186
  data?.components?.videoCall.bottomToolBar;
188
187
  }
189
188
  if (
190
- data?.components?.videoCall.bottomToolBar &&
191
- typeof data?.components?.videoCall.bottomToolBar === 'object' &&
192
- data?.components?.videoCall.bottomToolBar.length
189
+ data?.components?.videoCall?.bottomToolBar &&
190
+ typeof data?.components?.videoCall?.bottomToolBar === 'object' &&
191
+ Object.keys(data?.components?.videoCall.bottomToolBar)?.length
193
192
  ) {
194
193
  components.BottombarProps = data?.components?.videoCall.bottomToolBar;
195
194
  }
196
195
 
197
196
  if (
198
- data?.components?.videoCall.topToolBar &&
199
- typeof data?.components?.videoCall.topToolBar !== 'object' &&
197
+ data?.components?.videoCall?.topToolBar &&
198
+ typeof data?.components?.videoCall?.topToolBar !== 'object' &&
200
199
  isValidReactComponent(data?.components?.videoCall.topToolBar)
201
200
  ) {
202
201
  components.TopbarComponent = data?.components?.videoCall.topToolBar;
203
202
  }
204
203
 
205
204
  if (
206
- data?.components?.videoCall.topToolBar &&
207
- typeof data?.components?.videoCall.topToolBar === 'object' &&
208
- data?.components?.videoCall.topToolBar.length
205
+ data?.components?.videoCall?.topToolBar &&
206
+ typeof data?.components?.videoCall?.topToolBar === 'object' &&
207
+ Object.keys(data?.components?.videoCall.topToolBar).length
209
208
  ) {
210
209
  components.TopbarProps = data?.components?.videoCall.topToolBar;
211
210
  }
@@ -218,12 +217,8 @@ const VideoCallView = React.memo(() => {
218
217
  <View style={styles.container}>
219
218
  <>
220
219
  <ToolbarProvider value={{position: ToolbarPosition.top}}>
221
- {TopbarProps?.length ? (
222
- <TopbarComponent
223
- //@ts-ignore
224
- customItems={TopbarProps}
225
- includeDefaultItems={false}
226
- />
220
+ {Object.keys(TopbarProps)?.length ? (
221
+ <TopbarComponent items={TopbarProps} includeDefaultItems={false} />
227
222
  ) : (
228
223
  <TopbarComponent />
229
224
  )}
@@ -234,10 +229,9 @@ const VideoCallView = React.memo(() => {
234
229
  </View>
235
230
  <ToolbarProvider value={{position: ToolbarPosition.bottom}}>
236
231
  <ActionSheetProvider>
237
- {BottombarProps?.length ? (
232
+ {Object.keys(BottombarProps)?.length ? (
238
233
  <BottombarComponent
239
- //@ts-ignore
240
- customItems={BottombarProps}
234
+ items={BottombarProps}
241
235
  includeDefaultItems={false}
242
236
  />
243
237
  ) : (