agora-appbuilder-core 4.0.0-beta.64 → 4.0.0-beta.66

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.0-beta.64",
3
+ "version": "4.0.0-beta.66",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -46,6 +46,7 @@ import LocalEventEmitter, {
46
46
  LocalEventsEnum,
47
47
  } from '../rtm-events-api/LocalEvents';
48
48
  import {PSTNUserLabel} from '../language/default-labels/videoCallScreenLabels';
49
+ import {controlMessageEnum} from '../components/ChatContext';
49
50
  export enum UserType {
50
51
  ScreenShare = 'screenshare',
51
52
  }
@@ -495,9 +496,15 @@ const RtmConfigure = (props: any) => {
495
496
  waitingRoomStatusRef.current?.waitingRoomStatus !==
496
497
  WaitingRoomStatus.APPROVED
497
498
  ) {
498
- //todo: hari/bhupen added important rtm message in the queue and run it later when user join the call
499
- evt = data.evt;
500
- value = data.value;
499
+ if (
500
+ data.evt === controlMessageEnum.muteAudio ||
501
+ data.evt === controlMessageEnum.muteVideo
502
+ ) {
503
+ return;
504
+ } else {
505
+ evt = data.evt;
506
+ value = data.value;
507
+ }
501
508
  } else {
502
509
  evt = data.evt;
503
510
  value = data.value;
@@ -6,6 +6,7 @@ import {useToolbarMenu} from '../../utils/useMenu';
6
6
  import IconButton, {IconButtonProps} from '../../atoms/IconButton';
7
7
  import {useActionSheet} from '../../utils/useActionSheet';
8
8
  import {useString} from '../../utils/useString';
9
+ import {toolbarItemVirtualBackgroundText} from '../../language/default-labels/videoCallScreenLabels';
9
10
 
10
11
  interface VBButtonProps {
11
12
  isVBOpen: boolean;
@@ -18,7 +19,7 @@ const VBButton = (props: VBButtonProps) => {
18
19
  const {isVBOpen, setIsVBOpen, showLabel = false} = props;
19
20
  const {isToolbarMenuItem} = useToolbarMenu();
20
21
  const {isOnActionSheet} = useActionSheet();
21
- const vbLabel = useString('toolbarItemVirtualBackgroundText')();
22
+ const vbLabel = useString(toolbarItemVirtualBackgroundText)();
22
23
 
23
24
  const onPress = () => {
24
25
  setIsVBOpen(prev => !prev);
@@ -25,12 +25,14 @@ import {
25
25
  vbPanelImageUploadErrorToastHeading,
26
26
  vbPanelImageUploadErrorToastSubHeading,
27
27
  } from '../../../src/language/default-labels/videoCallScreenLabels';
28
+ import {TextDataInterface} from 'customization-api';
28
29
 
29
30
  interface VBCardProps {
30
31
  type: VBMode;
31
32
  icon: keyof IconsInterface;
32
33
  path?: ImageSourcePropType;
33
34
  label?: string;
35
+ translationKey?: keyof TextDataInterface;
34
36
  position?: number;
35
37
  isOnPrecall?: boolean;
36
38
  isMobile?: boolean;
@@ -59,6 +61,7 @@ const VBCard: React.FC<VBCardProps> = ({
59
61
  position,
60
62
  isOnPrecall,
61
63
  isMobile,
64
+ translationKey,
62
65
  }) => {
63
66
  const {
64
67
  setVBmode,
@@ -80,6 +83,7 @@ const VBCard: React.FC<VBCardProps> = ({
80
83
  const uploadErrorSubHeading = useString(
81
84
  vbPanelImageUploadErrorToastSubHeading,
82
85
  )();
86
+ const translation = useString(translationKey)();
83
87
 
84
88
  const isSelected = path ? path == selectedImage : vbMode === type;
85
89
 
@@ -197,7 +201,7 @@ const VBCard: React.FC<VBCardProps> = ({
197
201
  name={icon}
198
202
  tintColor={$config.SECONDARY_ACTION_COLOR}
199
203
  />
200
- {label ? (
204
+ {label && translation ? (
201
205
  <View>
202
206
  <Text
203
207
  style={{
@@ -207,7 +211,7 @@ const VBCard: React.FC<VBCardProps> = ({
207
211
  color: $config.SECONDARY_ACTION_COLOR,
208
212
  paddingVertical: 4,
209
213
  }}>
210
- {label}
214
+ {translation}
211
215
  </Text>
212
216
  </View>
213
217
  ) : (
@@ -201,42 +201,13 @@ const CaptionIconBtn = (props: CaptionIconBtnProps) => {
201
201
  (isHost || (!isHost && isSTTActive))
202
202
  );
203
203
  return (
204
- <View style={styles.iconWithText}>
205
- <View style={styles.iconContainer}>
206
- <CaptionIcon
207
- isOnActionSheet={true}
208
- showLabel={false}
209
- closeActionSheet={onPress}
210
- />
211
- </View>
212
- {showLabel && (
213
- <View>
214
- <Text
215
- style={[
216
- styles.iconText,
217
- {
218
- color: isDisabled
219
- ? $config.SEMANTIC_NEUTRAL
220
- : $config.FONT_COLOR,
221
- },
222
- ]}>
223
- {isCaptionON ? 'Hide' : 'Show'}
224
- </Text>
225
- <Text
226
- style={[
227
- styles.iconText,
228
- {
229
- color: isDisabled
230
- ? $config.SEMANTIC_NEUTRAL
231
- : $config.FONT_COLOR,
232
- marginTop: 0,
233
- },
234
- ]}>
235
- Caption
236
- </Text>
237
- </View>
238
- )}
239
- </View>
204
+ <ToolbarItem>
205
+ <CaptionIcon
206
+ isOnActionSheet={true}
207
+ showLabel={true}
208
+ closeActionSheet={onPress}
209
+ />
210
+ </ToolbarItem>
240
211
  );
241
212
  };
242
213
 
@@ -257,38 +228,9 @@ const TranscriptIconBtn = (props: TranscriptIconProps) => {
257
228
  (isHost || (!isHost && isSTTActive))
258
229
  );
259
230
  return (
260
- <View style={styles.iconWithText}>
261
- <View style={styles.iconContainer}>
262
- <TranscriptIcon isOnActionSheet={true} showLabel={false} />
263
- </View>
264
- {showLabel && (
265
- <View>
266
- <Text
267
- style={[
268
- styles.iconText,
269
- {
270
- color: isDisabled
271
- ? $config.SEMANTIC_NEUTRAL
272
- : $config.FONT_COLOR,
273
- },
274
- ]}>
275
- {isTranscriptON ? 'Hide' : 'Show'}
276
- </Text>
277
- <Text
278
- style={[
279
- styles.iconText,
280
- {
281
- color: isDisabled
282
- ? $config.SEMANTIC_NEUTRAL
283
- : $config.FONT_COLOR,
284
- marginTop: 0,
285
- },
286
- ]}>
287
- Transcript
288
- </Text>
289
- </View>
290
- )}
291
- </View>
231
+ <ToolbarItem>
232
+ <TranscriptIcon isOnActionSheet={true} showLabel={true} />
233
+ </ToolbarItem>
292
234
  );
293
235
  };
294
236
 
@@ -541,16 +483,16 @@ const ActionSheetContent = props => {
541
483
  order: 8,
542
484
  hide: 'no',
543
485
  align: 'start',
544
- component: <LayoutIcon />,
486
+ component:
487
+ !isAudioRoom &&
488
+ (isAudioVideoControlsDisabled ? null : <SwitchCameraIcon />),
545
489
  },
546
490
  {
547
491
  default: true,
548
492
  order: 9,
549
493
  hide: 'no',
550
494
  align: 'start',
551
- component:
552
- !isAudioRoom &&
553
- (isAudioVideoControlsDisabled ? null : <SwitchCameraIcon />),
495
+ component: <LayoutIcon />,
554
496
  },
555
497
  {
556
498
  default: true,
@@ -62,8 +62,13 @@ const CaptionIcon = (props: CaptionIconProps) => {
62
62
  : $config.SECONDARY_ACTION_COLOR,
63
63
  },
64
64
  btnTextProps: {
65
- text: showLabel ? label : '',
65
+ text: showLabel
66
+ ? isOnActionSheet
67
+ ? label?.replace(' ', '\n')
68
+ : label
69
+ : '',
66
70
  textColor: $config.FONT_COLOR,
71
+ numberOfLines: 2,
67
72
  },
68
73
  };
69
74
  iconButtonProps.isOnActionSheet = isOnActionSheet;
@@ -114,7 +114,7 @@ const Transcript = (props: TranscriptProps) => {
114
114
  ) : (
115
115
  <TranscriptText
116
116
  user={defaultContent[item.uid].name}
117
- time={item.time}
117
+ time={item?.time}
118
118
  value={item.text}
119
119
  searchQuery={searchQuery}
120
120
  />
@@ -285,7 +285,7 @@ const Transcript = (props: TranscriptProps) => {
285
285
  style={styles.contentContainer}
286
286
  data={renderedData}
287
287
  renderItem={renderItem}
288
- keyExtractor={item => item.uid + '-' + item.time}
288
+ keyExtractor={item => item.uid + '-' + item?.time}
289
289
  onContentSizeChange={handleContentSizeChange}
290
290
  onScroll={
291
291
  isWebInternal()
@@ -68,8 +68,13 @@ const TranscriptIcon = (props: TranscriptIconProps) => {
68
68
  },
69
69
  disabled: isDisabled,
70
70
  btnTextProps: {
71
- text: showLabel ? label(isTranscriptON) : '',
71
+ text: showLabel
72
+ ? isOnActionSheet
73
+ ? label(isTranscriptON)?.replace(' ', '\n')
74
+ : label(isTranscriptON)
75
+ : '',
72
76
  textColor: $config.FONT_COLOR,
77
+ numberOfLines: 2,
73
78
  },
74
79
  };
75
80
  iconButtonProps.isOnActionSheet = isOnActionSheet;
@@ -88,12 +88,14 @@ export const formatTranscriptContent = (
88
88
  return `${defaultContent[item?.uid?.split('-')[1]]?.name} ${item.text}`;
89
89
  }
90
90
  return `${defaultContent[item.uid].name} ${formatTime(
91
- Number(item.time),
91
+ Number(item?.time),
92
92
  )}:\n${item.text}`;
93
93
  })
94
94
  .join('\n\n');
95
95
 
96
- const startTime = formatDateWithTimeZone(new Date(meetingTranscript[0].time));
96
+ const startTime = formatDateWithTimeZone(
97
+ new Date(meetingTranscript[0]?.time),
98
+ );
97
99
 
98
100
  const attendees = Object.entries(defaultContent)
99
101
  .filter(
@@ -68,6 +68,7 @@ const LocalRaiseHand = (props: LocalRaiseHandProps) => {
68
68
  }
69
69
  },
70
70
  };
71
+ iconButtonProps.isOnActionSheet = isOnActionSheet;
71
72
  if (isOnActionSheet) {
72
73
  // iconButtonProps.containerStyle = {
73
74
  // backgroundColor: $config.CARD_LAYER_2_COLOR,