agora-appbuilder-core 4.0.13 → 4.0.15

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 (71) hide show
  1. package/package.json +1 -1
  2. package/template/_package-lock.json +1364 -1576
  3. package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
  4. package/template/customization-api/sub-components.ts +6 -4
  5. package/template/customization-api/types.ts +0 -6
  6. package/template/defaultConfig.js +0 -3
  7. package/template/global.d.ts +0 -3
  8. package/template/ios/Podfile.lock +0 -10
  9. package/template/package-lock.json +1364 -1576
  10. package/template/package.json +0 -4
  11. package/template/src/SDKAppWrapper.tsx +8 -2
  12. package/template/src/app-state/useMessages.ts +9 -49
  13. package/template/src/assets/font-styles.css +125 -289
  14. package/template/src/assets/fonts/icomoon.ttf +0 -0
  15. package/template/src/assets/selection.json +1 -1
  16. package/template/src/atoms/ActionMenu.tsx +2 -5
  17. package/template/src/atoms/CustomIcon.tsx +1 -17
  18. package/template/src/atoms/ImageIcon.tsx +3 -19
  19. package/template/src/atoms/Popup.tsx +4 -13
  20. package/template/src/atoms/ToolbarPreset.tsx +57 -6
  21. package/template/src/auth/AuthProvider.tsx +0 -5
  22. package/template/src/auth/config.ts +3 -12
  23. package/template/src/components/Chat.tsx +1 -7
  24. package/template/src/components/ChatContext.ts +0 -12
  25. package/template/src/components/CommonStyles.ts +2 -2
  26. package/template/src/components/Controls.tsx +57 -29
  27. package/template/src/components/Leftbar.tsx +4 -4
  28. package/template/src/components/Navbar.tsx +54 -29
  29. package/template/src/components/NavbarMobile.tsx +23 -33
  30. package/template/src/components/PinnedVideo.tsx +1 -1
  31. package/template/src/components/RTMConfigure.tsx +0 -1
  32. package/template/src/components/SdkApiContext.tsx +4 -1
  33. package/template/src/components/chat-messages/useChatMessages.tsx +607 -411
  34. package/template/src/components/chat-ui/useChatUIControls.tsx +0 -53
  35. package/template/src/components/meeting-info-invite/MeetingInfoGridTile.tsx +1 -4
  36. package/template/src/components/participants/Participant.tsx +1 -0
  37. package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +1 -6
  38. package/template/src/components/precall/joinWaitingRoomBtn.tsx +1 -6
  39. package/template/src/components/room-info/useRoomInfo.tsx +5 -5
  40. package/template/src/language/default-labels/videoCallScreenLabels.ts +6 -86
  41. package/template/src/pages/VideoCall.tsx +4 -3
  42. package/template/src/pages/video-call/ActionSheetContent.tsx +32 -3
  43. package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +12 -22
  44. package/template/src/pages/video-call/VideoComponent.tsx +11 -5
  45. package/template/src/pages/video-call/index.ts +0 -8
  46. package/template/src/subComponents/ChatBubble.tsx +32 -252
  47. package/template/src/subComponents/ChatContainer.tsx +4 -14
  48. package/template/src/subComponents/ChatInput.ios.tsx +184 -0
  49. package/template/src/subComponents/ChatInput.tsx +100 -276
  50. package/template/src/subComponents/RemoteMutePopup.tsx +131 -12
  51. package/template/src/subComponents/caption/CaptionContainer.tsx +2 -6
  52. package/template/src/subComponents/recording/useRecording.tsx +1 -3
  53. package/template/src/utils/SdkMethodEvents.ts +1 -0
  54. package/template/src/utils/common.tsx +17 -0
  55. package/template/src/utils/index.tsx +0 -30
  56. package/template/src/utils/useEndCall.ts +0 -7
  57. package/template/src/utils/useJoinRoom.ts +7 -33
  58. package/template/android/link-assets-manifest.json +0 -13
  59. package/template/ios/link-assets-manifest.json +0 -13
  60. package/template/src/atoms/InlinePopup.tsx +0 -185
  61. package/template/src/components/chat/chatConfigure.native.tsx +0 -488
  62. package/template/src/components/chat/chatConfigure.tsx +0 -473
  63. package/template/src/subComponents/ChatInput.native.tsx +0 -269
  64. package/template/src/subComponents/chat/ChatActionMenu.tsx +0 -224
  65. package/template/src/subComponents/chat/ChatAttachment.native.tsx +0 -234
  66. package/template/src/subComponents/chat/ChatAttachment.tsx +0 -145
  67. package/template/src/subComponents/chat/ChatEmoji.native.tsx +0 -75
  68. package/template/src/subComponents/chat/ChatEmoji.tsx +0 -181
  69. package/template/src/subComponents/chat/ChatSendButton.tsx +0 -141
  70. package/template/src/subComponents/chat/ChatUploadStatus.tsx +0 -65
  71. package/template/src/subComponents/chat/ImagePopup.tsx +0 -400
@@ -20,22 +20,6 @@ export enum ChatType {
20
20
  Private,
21
21
  }
22
22
 
23
- export enum UploadStatus {
24
- NOT_STARTED = 'notStarted',
25
- IN_PROGRESS = 'inProgress',
26
- SUCCESS = 'success',
27
- FAILURE = 'failure',
28
- }
29
-
30
- export interface File {
31
- file_length: number;
32
- file_ext: string;
33
- file_url: string;
34
- file_name: string;
35
- file_type: string;
36
- file_obj: object;
37
- }
38
-
39
23
  export interface ChatUIControlsInterface {
40
24
  chatType: ChatType;
41
25
  privateChatUser: UidType;
@@ -45,14 +29,6 @@ export interface ChatUIControlsInterface {
45
29
  setInputActive: React.Dispatch<SetStateAction<boolean>>;
46
30
  message: string;
47
31
  setMessage: React.Dispatch<SetStateAction<string>>;
48
- inputHeight: number;
49
- setInputHeight: React.Dispatch<SetStateAction<number>>;
50
- showEmojiPicker: boolean;
51
- setShowEmojiPicker: React.Dispatch<SetStateAction<boolean>>;
52
- uploadStatus: UploadStatus;
53
- setUploadStatus: React.Dispatch<SetStateAction<UploadStatus>>;
54
- uploadedFiles: File[];
55
- setUploadedFiles: React.Dispatch<SetStateAction<File[]>>;
56
32
  }
57
33
 
58
34
  const ChatUIControlsContext = React.createContext<ChatUIControlsInterface>({
@@ -63,39 +39,18 @@ const ChatUIControlsContext = React.createContext<ChatUIControlsInterface>({
63
39
  setPrivateChatUser: () => {},
64
40
  setMessage: () => {},
65
41
  inputActive: false,
66
- inputHeight: 0,
67
- setInputHeight: () => {},
68
42
  setInputActive: () => {},
69
- showEmojiPicker: false,
70
- setShowEmojiPicker: () => {},
71
- uploadStatus: UploadStatus.NOT_STARTED,
72
- setUploadStatus: () => {},
73
- uploadedFiles: [],
74
- setUploadedFiles: () => {},
75
43
  });
76
44
 
77
45
  interface ChatUIControlsProviderProps {
78
46
  children: React.ReactNode;
79
47
  }
80
48
 
81
- export const MIN_HEIGHT = 43;
82
- export const MAX_HEIGHT = 92;
83
- export const LINE_HEIGHT = 17;
84
- export const MAX_UPLOAD_SIZE = 10; //MB
85
- export const MAX_TEXT_MESSAGE_SIZE = 5; //KB
86
-
87
49
  const ChatUIControlsProvider = (props: ChatUIControlsProviderProps) => {
88
50
  const [chatType, setChatType] = useState<ChatType>(ChatType.Group);
89
51
  const [inputActive, setInputActive] = useState(false);
90
52
  const [privateChatUser, setPrivateChatUser] = useState<UidType>(0);
91
53
  const [message, setMessage] = useState('');
92
- const [showEmojiPicker, setShowEmojiPicker] = useState(false);
93
- const [uploadStatus, setUploadStatus] = useState<UploadStatus>(
94
- UploadStatus.NOT_STARTED,
95
- );
96
- const [uploadedFiles, setUploadedFiles] = useState<File[]>([]);
97
- const [inputHeight, setInputHeight] = React.useState(MIN_HEIGHT);
98
-
99
54
  return (
100
55
  <ChatUIControlsContext.Provider
101
56
  value={{
@@ -105,16 +60,8 @@ const ChatUIControlsProvider = (props: ChatUIControlsProviderProps) => {
105
60
  setPrivateChatUser,
106
61
  message,
107
62
  setMessage,
108
- inputHeight,
109
- setInputHeight,
110
63
  inputActive,
111
64
  setInputActive,
112
- showEmojiPicker,
113
- setShowEmojiPicker,
114
- uploadStatus,
115
- setUploadStatus,
116
- uploadedFiles,
117
- setUploadedFiles,
118
65
  }}>
119
66
  {props.children}
120
67
  </ChatUIControlsContext.Provider>
@@ -63,10 +63,7 @@ export default function MeetingInfoGridTile() {
63
63
  return (
64
64
  <View style={style.root}>
65
65
  <ScrollView
66
- contentContainerStyle={[
67
- style.scroll,
68
- !isMobile && {paddingLeft: 0, paddingRight: 0},
69
- ]}>
66
+ contentContainerStyle={[style.scroll, !isMobile && {paddingLeft: 0}]}>
70
67
  <View style={style.inviteContainerTile}>
71
68
  <View style={style.inviteTile}>
72
69
  <MeetingInfo
@@ -19,6 +19,7 @@ import {isMobileUA, isWebInternal} from '../../utils/common';
19
19
  import ActionMenu, {ActionMenuItem} from '../../atoms/ActionMenu';
20
20
  import Spacer from '../../atoms/Spacer';
21
21
  import useRemoteEndCall from '../../utils/useRemoteEndCall';
22
+ import {useChatMessages} from '../chat-messages/useChatMessages';
22
23
  import LocalVideoMute from '../../subComponents/LocalVideoMute';
23
24
  import LocalAudioMute from '../../subComponents/LocalAudioMute';
24
25
  import RemoveMeetingPopup from '../../subComponents/RemoveMeetingPopup';
@@ -100,7 +100,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
100
100
 
101
101
  useEffect(() => {
102
102
  events.on(EventNames.WAITING_ROOM_RESPONSE, data => {
103
- const {approved, mainUser, screenShare, whiteboard, chat} = JSON.parse(
103
+ const {approved, mainUser, screenShare, whiteboard} = JSON.parse(
104
104
  data?.payload,
105
105
  );
106
106
  // stop polling if user has responsed with yes / no
@@ -127,11 +127,6 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
127
127
  screenShareToken: screenShare.rtc,
128
128
  screenShareUid: screenShare.uid,
129
129
  whiteboard,
130
- chat: {
131
- user_token: chat.userToken,
132
- group_id: chat.groupId,
133
- is_group_owner: chat.isGroupOwner,
134
- },
135
130
  },
136
131
  };
137
132
  });
@@ -105,7 +105,7 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
105
105
 
106
106
  useEffect(() => {
107
107
  events.on(EventNames.WAITING_ROOM_RESPONSE, data => {
108
- const {approved, mainUser, screenShare, whiteboard, chat} = JSON.parse(
108
+ const {approved, mainUser, screenShare, whiteboard} = JSON.parse(
109
109
  data?.payload,
110
110
  );
111
111
  // stop polling if user has responsed with yes / no
@@ -133,11 +133,6 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
133
133
  screenShareToken: screenShare.rtc,
134
134
  screenShareUid: screenShare.uid,
135
135
  whiteboard,
136
- chat: {
137
- user_token: chat.userToken,
138
- group_id: chat.groupId,
139
- is_group_owner: chat.isGroupOwner,
140
- },
141
136
  },
142
137
  };
143
138
  });
@@ -14,6 +14,7 @@ import {createHook} from 'customization-implementation';
14
14
  import {UidType} from '../../../agora-rn-uikit';
15
15
  import {LanguageType} from '../../subComponents/caption/utils';
16
16
  import {BoardColor} from '../whiteboard/WhiteboardConfigure';
17
+ import {joinRoomPreference} from '../../utils/useJoinRoom';
17
18
 
18
19
  export enum WaitingRoomStatus {
19
20
  NOT_REQUESTED = 1,
@@ -37,11 +38,6 @@ export interface RoomData {
37
38
  room_uuid: string;
38
39
  room_token: string;
39
40
  };
40
- chat?: {
41
- user_token: string;
42
- group_id: string;
43
- is_group_owner: boolean;
44
- };
45
41
  isSeparateHostLink: boolean;
46
42
  channel?: string;
47
43
  uid?: UidType;
@@ -71,6 +67,7 @@ export interface RoomInfoContextInterface {
71
67
  langChanged?: Boolean;
72
68
  };
73
69
  isSTTActive?: boolean;
70
+ roomPreference?: joinRoomPreference;
74
71
  }
75
72
 
76
73
  export const validateMeetingInfoData = (
@@ -112,6 +109,9 @@ export const RoomInfoDefaultValue: RoomInfoContextInterface = {
112
109
  },
113
110
  isSeparateHostLink: true,
114
111
  },
112
+ roomPreference: {
113
+ disableShareTile: false,
114
+ },
115
115
  };
116
116
 
117
117
  const RoomInfoContext = createContext(RoomInfoDefaultValue);
@@ -205,39 +205,10 @@ export const groupChatWelcomeContent = 'groupChatWelcomeContent';
205
205
 
206
206
  export const peoplePanelHeaderText = 'peoplePanelHeaderText';
207
207
 
208
- export const groupChatMeetingInputPlaceHolderText =
209
- 'groupChatMeetingInputPlaceHolderText';
210
- export const groupChatLiveInputPlaceHolderText =
211
- 'groupChatLiveInputPlaceHolderText';
208
+ export const groupChatInputPlaceHolderText = 'groupChatInputPlaceHolderText';
212
209
  export const privateChatInputPlaceHolderText =
213
210
  'privateChatInputPlaceHolderText';
214
211
 
215
- export const chatActionMenuDownloadText = 'chatActionMenuDownloadText';
216
- export const chatActionMenuCopyLinkText = 'chatActionMenuCopyLinkText';
217
- export const chatActionMenuDeleteText = 'chatActionMenuDeleteText';
218
- export const chatMsgDeletedText = 'chatMsgDeletedText';
219
- export const chatSendMessageBtnText = 'chatSendMessageBtnText';
220
- export const chatUploadErrorToastHeading = 'chatUploadErrorToastHeading';
221
- export const chatUploadErrorFileSizeToastHeading =
222
- 'chatUploadErrorFileSizeToastHeading';
223
- export const chatUploadErrorFileSizeToastSubHeading =
224
- 'chatUploadErrorFileSizeToastSubHeading';
225
- export const chatUploadErrorFileTypeToastSubHeading =
226
- 'chatUploadErrorFileTypeToastSubHeading';
227
- export const chatSendErrorTextSizeToastHeading =
228
- 'chatSendErrorTextSizeToastHeading';
229
- export const chatSendErrorTextSizeToastSubHeading =
230
- 'chatSendErrorTextSizeToastSubHeading';
231
-
232
- export const chatMessageDeleteConfirmBtnText =
233
- 'chatMessageDeleteConfirmBtnText';
234
- export const chatPublicMessageDeletePopupText =
235
- 'chatPublicMessageDeletePopupText';
236
- export const chatPrivateMessageDeletePopupText =
237
- 'chatPrivateMessageDeletePopupText';
238
- export const chatUploadStatusInProgress = 'chatUploadStatusInProgress';
239
- export const chatUploadStatusFailure = 'chatUploadStatusFailure';
240
-
241
212
  export const peoplePanelTurnoffAllCameraBtnText =
242
213
  'peoplePanelTurnoffAllCameraBtnText';
243
214
  export const peoplePanelMuteAllMicBtnText = 'peoplePanelMuteAllMicBtnText';
@@ -319,8 +290,6 @@ export const livestreamingAttendeeWaitingForHostToJoinText =
319
290
  'livestreamingAttendeeWaitingForHostToJoinText';
320
291
 
321
292
  export const publicChatToastHeading = 'publicChatToastHeading';
322
- export const publicChatImgToastHeading = 'publicChatImgToastHeading';
323
- export const publicChatFileToastHeading = 'publicChatFileToastHeading';
324
293
 
325
294
  export const multiplePublicChatToastHeading = 'multiplePublicChatToastHeading';
326
295
  export const multiplePublicChatToastSubHeading =
@@ -627,27 +596,9 @@ export interface I18nVideoCallScreenLabelsInterface {
627
596
 
628
597
  [groupChatWelcomeContent]?: I18nConditionalType;
629
598
 
630
- [groupChatLiveInputPlaceHolderText]?: I18nBaseType;
631
- [groupChatMeetingInputPlaceHolderText]?: I18nBaseType;
599
+ [groupChatInputPlaceHolderText]?: I18nBaseType;
632
600
  [privateChatInputPlaceHolderText]?: I18nBaseType;
633
601
 
634
- [chatActionMenuDownloadText]?: I18nBaseType;
635
- [chatActionMenuCopyLinkText]?: I18nBaseType;
636
- [chatActionMenuDeleteText]?: I18nBaseType;
637
- [chatSendMessageBtnText]?: I18nBaseType;
638
- [chatMsgDeletedText]?: I18nBaseType;
639
- [chatMessageDeleteConfirmBtnText]?: I18nBaseType;
640
- [chatPublicMessageDeletePopupText]?: I18nBaseType;
641
- [chatPrivateMessageDeletePopupText]?: I18nBaseType;
642
- [chatUploadErrorToastHeading]?: I18nBaseType;
643
- [chatUploadErrorFileSizeToastHeading]?: I18nBaseType;
644
- [chatSendErrorTextSizeToastHeading]?: I18nBaseType;
645
- [chatUploadErrorFileSizeToastSubHeading]?: I18nBaseType;
646
- [chatSendErrorTextSizeToastSubHeading]?: I18nBaseType;
647
- [chatUploadErrorFileTypeToastSubHeading]?: I18nBaseType;
648
- [chatUploadStatusInProgress]?: I18nBaseType;
649
- [chatUploadStatusFailure]?: I18nBaseType;
650
-
651
602
  [peoplePanelTurnoffAllCameraBtnText]?: I18nBaseType;
652
603
  [peoplePanelMuteAllMicBtnText]?: I18nBaseType;
653
604
 
@@ -699,9 +650,6 @@ export interface I18nVideoCallScreenLabelsInterface {
699
650
  [livestreamingAttendeeInviteOthersText]?: I18nBaseType;
700
651
 
701
652
  [publicChatToastHeading]?: I18nBaseType;
702
- [publicChatImgToastHeading]?: I18nBaseType;
703
- [publicChatFileToastHeading]?: I18nBaseType;
704
-
705
653
  [multiplePublicChatToastHeading]?: I18nBaseType;
706
654
  [multiplePublicChatToastSubHeading]?: I18nBaseType<publicChatToastSubHeadingDataInterface>;
707
655
 
@@ -1009,7 +957,7 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
1009
957
 
1010
958
  [peoplePanelHeaderText]: 'People',
1011
959
 
1012
- [chatPanelGroupTabText]: 'Public',
960
+ [chatPanelGroupTabText]: 'Group',
1013
961
  [chatPanelPrivateTabText]: 'Private',
1014
962
 
1015
963
  [groupChatWelcomeContent]: noMessage =>
@@ -1017,31 +965,9 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
1017
965
  ? 'Welcome to Chat!\nAll messages are deleted when call ends.'
1018
966
  : 'All messages are deleted when call ends.',
1019
967
 
1020
- [groupChatLiveInputPlaceHolderText]: name => `Chat publicly as ${name}...`,
1021
- [groupChatMeetingInputPlaceHolderText]: name => `Type Message Here`,
968
+ [groupChatInputPlaceHolderText]: name => `Chat publicly as ${name}...`,
1022
969
  [privateChatInputPlaceHolderText]: name => `Private Message to ${name}`,
1023
970
 
1024
- [chatActionMenuDownloadText]: 'Download',
1025
- [chatActionMenuCopyLinkText]: 'Copy File Link',
1026
- [chatActionMenuDeleteText]: 'Delete',
1027
- [chatSendMessageBtnText]: 'Send',
1028
- [chatMsgDeletedText]: name => `${name} deleted this message`,
1029
-
1030
- [chatUploadErrorToastHeading]: 'Attachment Upload Error',
1031
- [chatUploadErrorFileSizeToastHeading]: 'File size is too large',
1032
- [chatSendErrorTextSizeToastHeading]: 'Text size is too large',
1033
- [chatUploadErrorFileSizeToastSubHeading]: size =>
1034
- `You can send attachments upto ${size}MB in size`,
1035
- [chatSendErrorTextSizeToastSubHeading]: size =>
1036
- `You can send text message upto ${size}KB in size`,
1037
- [chatUploadErrorFileTypeToastSubHeading]: type => `${type} is not supported`,
1038
- [chatUploadStatusInProgress]: `Uploading... Please wait`,
1039
- [chatUploadStatusFailure]: `Something went wrong while sharing.Let'as try again`,
1040
- [chatMessageDeleteConfirmBtnText]: `Delete`,
1041
- [chatPublicMessageDeletePopupText]: `Are you sure you want to delete this message for everyone in the public chat? `,
1042
- [chatPrivateMessageDeletePopupText]: (name: string) =>
1043
- `Are you sure you want to delete this message for ${name}`,
1044
-
1045
971
  [peoplePanelTurnoffAllCameraBtnText]: 'Turn off all cameras',
1046
972
  [peoplePanelMuteAllMicBtnText]: 'Mute All',
1047
973
 
@@ -1107,13 +1033,7 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
1107
1033
  [publicChatToastHeading]: (name: string) =>
1108
1034
  `${name} commented in the public chat`,
1109
1035
 
1110
- [publicChatImgToastHeading]: (name: string) =>
1111
- `${name} sent an image in the public chat`,
1112
-
1113
- [publicChatFileToastHeading]: (name: string) =>
1114
- `${name} sent a file in the public chat`,
1115
-
1116
- [multiplePublicChatToastHeading]: 'New messages in Public Chat',
1036
+ [multiplePublicChatToastHeading]: 'New comments in Public Chat',
1117
1037
  [multiplePublicChatToastSubHeading]: ({count, from}) =>
1118
1038
  `You have ${count} new messages from ${from}`,
1119
1039
 
@@ -1123,7 +1043,7 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
1123
1043
  `You’ve received ${count} private messages`,
1124
1044
 
1125
1045
  [multiplePublicAndPrivateChatToastHeading]:
1126
- 'New messages in Public & Private Chat',
1046
+ 'New comments in Public & Private Chat',
1127
1047
  [multiplePublicAndPrivateChatToastSubHeading]: ({
1128
1048
  publicChatCount,
1129
1049
  privateChatCount,
@@ -46,6 +46,7 @@ import {SidePanelProvider} from '../utils/useSidePanel';
46
46
  import {NetworkQualityProvider} from '../components/NetworkQualityContext';
47
47
  import {ChatNotificationProvider} from '../components/chat-notification/useChatNotification';
48
48
  import {ChatUIControlsProvider} from '../components/chat-ui/useChatUIControls';
49
+ import {ChatMessagesProvider} from '../components/chat-messages/useChatMessages';
49
50
  import {ScreenShareProvider} from '../components/contexts/ScreenShareContext';
50
51
  import {LiveStreamDataProvider} from '../components/contexts/LiveStreamDataContext';
51
52
  import {VideoMeetingDataProvider} from '../components/contexts/VideoMeetingDataContext';
@@ -67,8 +68,6 @@ import {VideoQualityContextProvider} from '../app-state/useVideoQuality';
67
68
  import {VBProvider} from '../components/virtual-background/useVB';
68
69
  import {DisableChatProvider} from '../components/disable-chat/useDisableChat';
69
70
  import {WaitingRoomProvider} from '../components/contexts/WaitingRoomContext';
70
- import {isWeb} from '../utils/common';
71
- import {ChatMessagesProvider} from '../components/chat-messages/useChatMessages';
72
71
  import VideoCallScreenWrapper from './video-call/VideoCallScreenWrapper';
73
72
  import {useIsRecordingBot} from '../subComponents/recording/useIsRecordingBot';
74
73
  import {videoRoomStartingCallText} from '../language/default-labels/videoCallScreenLabels';
@@ -232,6 +231,7 @@ const VideoCall: React.FC = () => {
232
231
  meetingDetails: sdkMeetingDetails,
233
232
  skipPrecall,
234
233
  promise,
234
+ preference,
235
235
  } = SdkJoinState;
236
236
 
237
237
  const sdkMeetingPath = `/${sdkMeetingPhrase}`;
@@ -247,12 +247,13 @@ const VideoCall: React.FC = () => {
247
247
  ...roomInfo.data,
248
248
  ...sdkMeetingDetails,
249
249
  },
250
+ roomPreference: preference,
250
251
  };
251
252
  });
252
253
  } else if (sdkMeetingPhrase) {
253
254
  setQueryComplete(false);
254
255
  currentMeetingPhrase.current = sdkMeetingPath;
255
- useJoin(sdkMeetingPhrase).catch(error => {
256
+ useJoin(sdkMeetingPhrase, preference).catch(error => {
256
257
  setGlobalErrorMessage(error);
257
258
  history.push('/');
258
259
  currentMeetingPhrase.current = '';
@@ -24,7 +24,12 @@ import {
24
24
  import {useChatNotification} from '../../components/chat-notification/useChatNotification';
25
25
  import {SidePanelType} from '../../subComponents/SidePanelEnum';
26
26
  import {useSidePanel} from '../../utils/useSidePanel';
27
- import {useContent, useLocalUserInfo, ToolbarItem} from 'customization-api';
27
+ import {
28
+ useContent,
29
+ useLocalUserInfo,
30
+ ToolbarItem,
31
+ ToolbarCustomItem,
32
+ } from 'customization-api';
28
33
  import LayoutIconButton from '../../subComponents/LayoutIconButton';
29
34
  import CaptionIcon from '../../../src/subComponents/caption/CaptionIcon';
30
35
  import TranscriptIcon from '../../../src/subComponents/caption/TranscriptIcon';
@@ -38,7 +43,10 @@ import {EventNames} from '../../rtm-events';
38
43
  import events from '../../rtm-events-api';
39
44
  import {getLanguageLabel} from '../../subComponents/caption/utils';
40
45
  import Toast from '../../../react-native-toast-message';
41
- import {CustomToolbarSort} from '../../utils/common';
46
+ import {
47
+ CustomToolbarSort,
48
+ updateToolbarDefaultConfig,
49
+ } from '../../utils/common';
42
50
  import {ActionSheetProvider} from '../../utils/useActionSheet';
43
51
  import {useWaitingRoomContext} from '../../components/contexts/WaitingRoomContext';
44
52
  import {useSetRoomInfo} from '../../components/room-info/useSetRoomInfo';
@@ -257,6 +265,7 @@ const ActionSheetContent = props => {
257
265
  displayCustomBottomSheetContent = false,
258
266
  customBottomSheetContent,
259
267
  native = false,
268
+ defaultItemsConfig = {},
260
269
  } = props;
261
270
 
262
271
  const {localUid} = useContext(ChatContext);
@@ -387,6 +396,7 @@ const ActionSheetContent = props => {
387
396
  order: 0,
388
397
  hide: 'no',
389
398
  align: 'start',
399
+ componentName: 'local-audio',
390
400
  component: isAudioVideoControlsDisabled ? null : <AudioIcon />,
391
401
  },
392
402
  {
@@ -397,6 +407,7 @@ const ActionSheetContent = props => {
397
407
  /*For AudioCast Host:Chat ,Attendee:Raise Hand
398
408
  For VoiceChat Host:Chat, Attendee:Chat
399
409
  */
410
+ componentName: 'chat',
400
411
  component: (isAudioCastHost ||
401
412
  isVoiceChatHost ||
402
413
  isVoiceChatAudience) && <ChatIcon />,
@@ -407,6 +418,7 @@ const ActionSheetContent = props => {
407
418
  order: 0,
408
419
  hide: 'no',
409
420
  align: 'start',
421
+ componentName: 'raise-hand',
410
422
  component:
411
423
  (isAudioCastAudience && isLiveStream && isAudience) ||
412
424
  (isBroadCasting && !isHost) ? (
@@ -420,6 +432,7 @@ const ActionSheetContent = props => {
420
432
  order: 1,
421
433
  hide: 'no',
422
434
  align: 'start',
435
+ componentName: 'local-video',
423
436
  component:
424
437
  !isAudioRoom && (isAudioVideoControlsDisabled ? null : <CamIcon />),
425
438
  },
@@ -428,6 +441,7 @@ const ActionSheetContent = props => {
428
441
  order: 2,
429
442
  hide: 'no',
430
443
  align: 'start',
444
+ componentName: 'end-call',
431
445
  component: <EndCallIcon />,
432
446
  },
433
447
  //reset of the controls
@@ -436,6 +450,7 @@ const ActionSheetContent = props => {
436
450
  order: 4,
437
451
  hide: 'no',
438
452
  align: 'start',
453
+ componentName: 'raise-hand',
439
454
  component:
440
455
  (isLiveStream && isAudience) || (isBroadCasting && !isHost) ? (
441
456
  $config.RAISE_HAND && !isAudioRoom ? (
@@ -449,6 +464,7 @@ const ActionSheetContent = props => {
449
464
  order: 5,
450
465
  hide: 'no',
451
466
  align: 'start',
467
+ componentName: 'chat',
452
468
  component: !(
453
469
  isAudioCastHost ||
454
470
  isVoiceChatHost ||
@@ -460,6 +476,7 @@ const ActionSheetContent = props => {
460
476
  order: 6,
461
477
  hide: 'no',
462
478
  align: 'start',
479
+ componentName: 'participant',
463
480
  component: <ParticipantsIcon />,
464
481
  },
465
482
  {
@@ -467,6 +484,7 @@ const ActionSheetContent = props => {
467
484
  order: 7,
468
485
  hide: 'no',
469
486
  align: 'start',
487
+ componentName: 'recording',
470
488
  component: isHost && $config.CLOUD_RECORDING ? <RecordingIcon /> : null,
471
489
  },
472
490
  {
@@ -474,6 +492,7 @@ const ActionSheetContent = props => {
474
492
  order: 7,
475
493
  hide: 'no',
476
494
  align: 'start',
495
+ componentName: 'virtual-background',
477
496
  component:
478
497
  $config.ENABLE_VIRTUAL_BACKGROUND && !$config.AUDIO_ROOM ? (
479
498
  <VBIcon />
@@ -484,6 +503,7 @@ const ActionSheetContent = props => {
484
503
  order: 8,
485
504
  hide: 'no',
486
505
  align: 'start',
506
+ componentName: 'switch-camera',
487
507
  component:
488
508
  !isAudioRoom &&
489
509
  (isAudioVideoControlsDisabled ? null : <SwitchCameraIcon />),
@@ -493,6 +513,7 @@ const ActionSheetContent = props => {
493
513
  order: 9,
494
514
  hide: 'no',
495
515
  align: 'start',
516
+ componentName: 'layout',
496
517
  component: <LayoutIcon />,
497
518
  },
498
519
  {
@@ -500,6 +521,7 @@ const ActionSheetContent = props => {
500
521
  order: 10,
501
522
  hide: 'no',
502
523
  align: 'start',
524
+ componentName: 'settings',
503
525
  component: <SettingsIcon />,
504
526
  },
505
527
  {
@@ -507,6 +529,7 @@ const ActionSheetContent = props => {
507
529
  order: 11,
508
530
  hide: 'no',
509
531
  align: 'start',
532
+ componentName: 'invite',
510
533
  component: <ShareIcon />,
511
534
  },
512
535
  {
@@ -514,6 +537,7 @@ const ActionSheetContent = props => {
514
537
  order: 12,
515
538
  hide: 'no',
516
539
  align: 'start',
540
+ componentName: 'caption',
517
541
  component: (
518
542
  <CaptionIconBtn
519
543
  onPress={() => handleSheetChanges(isExpanded ? 0 : 1)}
@@ -525,6 +549,7 @@ const ActionSheetContent = props => {
525
549
  order: 13,
526
550
  hide: 'no',
527
551
  align: 'start',
552
+ componentName: 'transcript',
528
553
  component: <TranscriptIconBtn />,
529
554
  },
530
555
  ];
@@ -533,8 +558,12 @@ const ActionSheetContent = props => {
533
558
  return i?.hide === 'yes';
534
559
  };
535
560
  const combinedItems = customItems
561
+ ?.concat(
562
+ includeDefaultItems
563
+ ? updateToolbarDefaultConfig(defaultItems, defaultItemsConfig)
564
+ : [],
565
+ )
536
566
  ?.filter(i => !isHidden(i))
537
- ?.concat(includeDefaultItems ? defaultItems : [])
538
567
  //to filter empty component because of some condition array will have empty component
539
568
  ?.filter(i => i?.component)
540
569
  ?.sort(CustomToolbarSort);
@@ -6,7 +6,6 @@ import {useLocation} from '../../components/Router';
6
6
  import {getParamFromURL} from '../../utils/common';
7
7
  import {useUserPreference} from '../../components/useUserPreference';
8
8
  import WhiteboardConfigure from '../../components/whiteboard/WhiteboardConfigure';
9
- import ChatConfigure from '../../components/chat/chatConfigure';
10
9
 
11
10
  const VideoCallScreenWithRecordingBot: React.FC = () => {
12
11
  const location = useLocation();
@@ -22,30 +21,21 @@ const VideoCallScreenWithRecordingBot: React.FC = () => {
22
21
 
23
22
  const VideoCallScreenWrapper: React.FC = () => {
24
23
  const {rtcProps} = useContext(PropsContext);
25
- let configComponent: React.ReactNode;
26
24
 
27
- const videoComponent = rtcProps?.recordingBot ? (
28
- <VideoCallScreenWithRecordingBot />
29
- ) : (
30
- <VideoCallScreen />
31
- );
32
-
33
- if ($config.CHAT && $config.ENABLE_WHITEBOARD) {
34
- configComponent = (
35
- <ChatConfigure>
36
- <WhiteboardConfigure>{videoComponent}</WhiteboardConfigure>
37
- </ChatConfigure>
38
- );
39
- } else if ($config.CHAT) {
40
- configComponent = <ChatConfigure>{videoComponent}</ChatConfigure>;
41
- } else if ($config.ENABLE_WHITEBOARD) {
42
- configComponent = (
43
- <WhiteboardConfigure>{videoComponent}</WhiteboardConfigure>
25
+ if ($config.ENABLE_WHITEBOARD) {
26
+ return (
27
+ <WhiteboardConfigure>
28
+ {rtcProps?.recordingBot ? (
29
+ <VideoCallScreenWithRecordingBot />
30
+ ) : (
31
+ <VideoCallScreen />
32
+ )}
33
+ </WhiteboardConfigure>
44
34
  );
45
- } else {
46
- configComponent = videoComponent;
35
+ } else if (rtcProps?.recordingBot) {
36
+ return <VideoCallScreenWithRecordingBot />;
47
37
  }
48
- return <>{configComponent}</>;
38
+ return <VideoCallScreen />;
49
39
  };
50
40
 
51
41
  export default VideoCallScreenWrapper;
@@ -4,7 +4,7 @@ import useLayoutsData from './useLayoutsData';
4
4
  import {isArray, useIsDesktop, isValidReactComponent} from '../../utils/common';
5
5
  import {PropsContext, ClientRoleType} from '../../../agora-rn-uikit';
6
6
  import {useLayout} from '../../utils/useLayout';
7
- import {useContent} from 'customization-api';
7
+ import {useContent, useRoomInfo} from 'customization-api';
8
8
  import {getGridLayoutName} from './DefaultLayouts';
9
9
  import {DispatchContext} from '../../../agora-rn-uikit';
10
10
  import MeetingInfoGridTile from '../../components/meeting-info-invite/MeetingInfoGridTile';
@@ -22,11 +22,17 @@ const VideoComponent = () => {
22
22
  const {audienceUids, hostUids} = useLiveStreamDataContext();
23
23
  const [showNoUserInfo, setShowNoUserInfo] = useState(false);
24
24
 
25
+ const {
26
+ roomPreference: {disableShareTile},
27
+ } = useRoomInfo();
28
+
25
29
  useEffect(() => {
26
- setTimeout(() => {
27
- setShowNoUserInfo(true);
28
- }, 2500);
29
- }, []);
30
+ if (!disableShareTile) {
31
+ setTimeout(() => {
32
+ setShowNoUserInfo(true);
33
+ }, 2500);
34
+ }
35
+ }, [disableShareTile]);
30
36
 
31
37
  const currentLayoutRef = useRef(currentLayout);
32
38
  const gridLayoutName = getGridLayoutName();
@@ -21,10 +21,6 @@ import Controls, {
21
21
  } from '../../components/Controls';
22
22
  import ChatBubble from '../../subComponents/ChatBubble';
23
23
  import {ChatInput} from '../../subComponents/ChatInput';
24
- import {ChatAttachmentButton} from '../../subComponents/chat/ChatAttachment';
25
- import ChatSendButton from '../../subComponents/chat/ChatSendButton';
26
- import ChatUploadStatus from '../../subComponents/chat/ChatUploadStatus';
27
- import {ChatEmojiButton} from '../../subComponents/chat/ChatEmoji';
28
24
  import SettingsView from '../../components/SettingsView';
29
25
  import WhiteboardButton from '../../components/whiteboard/WhiteboardButton';
30
26
 
@@ -54,9 +50,5 @@ export {
54
50
  Controls,
55
51
  ChatBubble,
56
52
  ChatInput,
57
- ChatAttachmentButton,
58
- ChatEmojiButton,
59
- ChatUploadStatus,
60
- ChatSendButton,
61
53
  ToolbarComponents,
62
54
  };