agora-appbuilder-core 4.0.0-api.7 → 4.0.0-api.9

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 (97) hide show
  1. package/package.json +3 -3
  2. package/template/_package-lock.json +5911 -4861
  3. package/template/agora-rn-uikit/.eslintrc.js +5 -0
  4. package/template/agora-rn-uikit/package.json +14 -14
  5. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +41 -22
  6. package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +2 -2
  7. package/template/agora-rn-uikit/src/Rtc/Create.tsx +90 -57
  8. package/template/agora-rn-uikit/src/Rtc/Join.tsx +20 -16
  9. package/template/agora-rn-uikit/src/RtcConfigure.tsx +10 -10
  10. package/template/agora-rn-uikit/src/Utils/isBotUser.ts +15 -0
  11. package/template/agora-rn-uikit/src/Utils/quality.tsx +8 -0
  12. package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +32 -16
  13. package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +25 -14
  14. package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +15 -9
  15. package/template/agora-rn-uikit/src/index.ts +1 -1
  16. package/template/bridge/rtc/webNg/RtcEngine.ts +73 -58
  17. package/template/bridge/rtc/webNg/{SurfaceView.tsx → RtcSurfaceView.tsx} +20 -26
  18. package/template/bridge/rtc/webNg/Types.ts +20 -5
  19. package/template/bridge/rtc/webNg/index.ts +9 -13
  20. package/template/customization-api/temp.ts +2 -2
  21. package/template/customization-api/typeDefinition.ts +1 -2
  22. package/template/customization-api/utils.ts +1 -2
  23. package/template/index.js +1 -0
  24. package/template/ios/HelloWorld/HelloWorldDebug.entitlements +10 -0
  25. package/template/ios/HelloWorld.xcodeproj/project.pbxproj +4 -0
  26. package/template/ios/Podfile +1 -1
  27. package/template/ios/Podfile.lock +72 -140
  28. package/template/package.json +5 -4
  29. package/template/src/App.tsx +58 -1
  30. package/template/src/AppRoutes.tsx +16 -3
  31. package/template/src/AppWrapper.tsx +21 -19
  32. package/template/src/components/Chat.tsx +17 -8
  33. package/template/src/components/ChatContext.ts +0 -2
  34. package/template/src/components/Controls.tsx +5 -5
  35. package/template/src/components/Controls1.native.tsx +7 -3
  36. package/template/src/components/DeviceConfigure.native.tsx +2 -2
  37. package/template/src/components/DeviceConfigure.tsx +2 -2
  38. package/template/src/components/EventsConfigure.tsx +13 -22
  39. package/template/src/components/GraphQLProvider.tsx +47 -30
  40. package/template/src/components/GridVideo.tsx +6 -2
  41. package/template/src/components/NetworkQualityContext.tsx +11 -5
  42. package/template/src/components/ParticipantsView.tsx +3 -3
  43. package/template/src/components/PinnedVideo.tsx +2 -2
  44. package/template/src/components/Precall.native.tsx +9 -6
  45. package/template/src/components/Precall.tsx +9 -6
  46. package/template/src/components/StorageContext.tsx +5 -2
  47. package/template/src/components/ToastComponent.tsx +7 -1
  48. package/template/src/components/contexts/LiveStreamDataContext.tsx +3 -3
  49. package/template/src/components/livestream/LiveStreamContext.tsx +42 -33
  50. package/template/src/components/livestream/Types.ts +2 -2
  51. package/template/src/components/participants/Participant.tsx +1 -1
  52. package/template/src/components/participants/UserActionMenuOptions.tsx +7 -2
  53. package/template/src/components/recording-bot/RecordingBotRoute.tsx +42 -0
  54. package/template/src/components/virtual-background/useVB.native.tsx +16 -19
  55. package/template/src/components/virtual-background/useVB.tsx +1 -1
  56. package/template/src/components/whiteboard/WhiteboardConfigure.native.tsx +11 -0
  57. package/template/src/components/whiteboard/WhiteboardConfigure.tsx +5 -0
  58. package/template/src/components/whiteboard/WhiteboardView.native.tsx +91 -12
  59. package/template/src/components/whiteboard/WhiteboardWidget.tsx +15 -4
  60. package/template/src/language/default-labels/precallScreenLabels.ts +5 -3
  61. package/template/src/language/default-labels/videoCallScreenLabels.ts +93 -41
  62. package/template/src/pages/VideoCall.tsx +39 -37
  63. package/template/src/pages/video-call/ActionSheetContent.tsx +4 -3
  64. package/template/src/pages/video-call/NameWithMicIcon.tsx +2 -1
  65. package/template/src/pages/video-call/VideoCallMobileView.tsx +26 -2
  66. package/template/src/pages/video-call/VideoCallScreen.tsx +32 -12
  67. package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +41 -0
  68. package/template/src/pages/video-call/VideoComponent.tsx +5 -2
  69. package/template/src/pages/video-call/VideoRenderer.tsx +55 -34
  70. package/template/src/rtm-events/constants.ts +0 -2
  71. package/template/src/subComponents/ChatBubble.tsx +2 -0
  72. package/template/src/subComponents/LocalAudioMute.tsx +8 -47
  73. package/template/src/subComponents/LocalEndCall.tsx +5 -52
  74. package/template/src/subComponents/LocalSwitchCamera.tsx +3 -3
  75. package/template/src/subComponents/LocalVideoMute.tsx +8 -50
  76. package/template/src/subComponents/SelectDevice.tsx +5 -2
  77. package/template/src/subComponents/SelectDeviceSettings.backup.tsx +9 -6
  78. package/template/src/subComponents/caption/Caption.tsx +12 -10
  79. package/template/src/subComponents/caption/Transcript.tsx +13 -10
  80. package/template/src/subComponents/caption/useTranscriptDownload.native.ts +11 -16
  81. package/template/src/subComponents/caption/utils.ts +1 -0
  82. package/template/src/subComponents/livestream/ApprovedLiveStreamControlsView.tsx +2 -2
  83. package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +3 -2
  84. package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +1 -1
  85. package/template/src/subComponents/recording/useIsRecordingBot.tsx +38 -0
  86. package/template/src/subComponents/recording/useRecording.tsx +176 -135
  87. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +3 -3
  88. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +1 -22
  89. package/template/src/utils/index.tsx +16 -5
  90. package/template/src/utils/useEndCall.ts +65 -0
  91. package/template/src/utils/useIsLocalUserSpeaking.ts +6 -1
  92. package/template/{bridge/rtc/webNg/LocalView.tsx → src/utils/useLocalAudio.ts} +24 -6
  93. package/template/src/utils/useMuteToggleLocal.ts +10 -5
  94. package/template/src/utils/useSearchParams.tsx +18 -0
  95. package/template/src/wasms/agora-virtual-background.wasm +0 -0
  96. package/template/src/utils/endCallEveryOne.ts +0 -7
  97. package/template/src/utils/useDisableButton.tsx +0 -37
@@ -93,6 +93,8 @@ export interface whiteboardContextInterface {
93
93
  getWhiteboardUid: () => number;
94
94
  whiteboardStartedFirst?: boolean;
95
95
  clearAllCallback?: () => void;
96
+ isWhiteboardOnFullScreen?: boolean;
97
+ setWhiteboardOnFullScreen?: React.Dispatch<React.SetStateAction<boolean>>;
96
98
  }
97
99
 
98
100
  export interface WhiteboardPropsInterface {
@@ -101,6 +103,7 @@ export interface WhiteboardPropsInterface {
101
103
 
102
104
  const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
103
105
  // Defines intent, whether whiteboard should be active or not
106
+ const [isWhiteboardOnFullScreen, setWhiteboardOnFullScreen] = useState(false);
104
107
  const [whiteboardActive, setWhiteboardActive] = useState(false);
105
108
  const [whiteboardStartedFirst, setWhiteboardStartedFirst] = useState(false);
106
109
  const [boardColor, setBoardColor] = useState<BoardColor>(BoardColor.White);
@@ -430,6 +433,8 @@ const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
430
433
  insertImageIntoWhiteboard,
431
434
  whiteboardStartedFirst,
432
435
  clearAllCallback,
436
+ isWhiteboardOnFullScreen,
437
+ setWhiteboardOnFullScreen,
433
438
  }}>
434
439
  {props.children}
435
440
  </whiteboardContext.Provider>
@@ -10,37 +10,80 @@
10
10
  *********************************************
11
11
  */
12
12
 
13
- import React, {useContext, useRef} from 'react';
13
+ import React, {useContext, useEffect, useRef, useState} from 'react';
14
14
  import {whiteboardContext} from './WhiteboardConfigure';
15
- import {StyleSheet, View} from 'react-native';
15
+ import {StyleSheet, View, Text} from 'react-native';
16
16
  import {useRoomInfo} from 'customization-api';
17
17
  import {
18
18
  WhiteboardView as NativeWhiteboardView,
19
19
  RoomCallbackHandler,
20
20
  } from '@netless/react-native-whiteboard';
21
21
  import WhiteboardWidget from './WhiteboardWidget';
22
+ import {
23
+ whiteboardInitializingText,
24
+ whiteboardNativeInfoToastHeading,
25
+ } from '../../language/default-labels/videoCallScreenLabels';
26
+ import {useString} from '../../utils/useString';
27
+ import ThemeConfig from '../../theme';
28
+ import Toast from '../../../react-native-toast-message';
29
+ import {useContent} from 'customization-api';
30
+ import StorageContext from '../StorageContext';
22
31
 
23
32
  interface WhiteboardViewInterface {}
24
33
 
25
34
  const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
26
- const {getWhiteboardUid, whiteboardActive} = useContext(whiteboardContext);
35
+ const {getWhiteboardUid, whiteboardActive, isWhiteboardOnFullScreen} =
36
+ useContext(whiteboardContext);
37
+ const {setStore, store} = useContext(StorageContext);
38
+ const [isLoading, setIsLoading] = useState(true);
27
39
  const roomRef = useRef({});
28
40
  const sdkRef = useRef({});
29
41
  const {
30
42
  data: {whiteboard: {room_token, room_uuid} = {}},
31
43
  } = useRoomInfo();
44
+ const whiteboardInitializing = useString(whiteboardInitializingText)();
45
+ const whiteboardNativeInfoToastHeadingText = useString(
46
+ whiteboardNativeInfoToastHeading,
47
+ )();
48
+
49
+ useEffect(() => {
50
+ if (!store?.whiteboardNativeInfoToast) {
51
+ Toast.show({
52
+ leadingIconName: 'info',
53
+ type: 'info',
54
+ text1: whiteboardNativeInfoToastHeadingText,
55
+ visibilityTime: 5000,
56
+ primaryBtn: null,
57
+ secondaryBtn: null,
58
+ leadingIcon: null,
59
+ });
60
+ setStore(prevState => {
61
+ return {
62
+ ...prevState,
63
+ whiteboardNativeInfoToast: true,
64
+ };
65
+ });
66
+ }
67
+ }, [store]);
32
68
 
33
69
  const roomCallbacks: Partial<RoomCallbackHandler> = {
34
- onPhaseChanged: e => console.log('debugging onPhaseChanged changed: ', e),
35
- onRoomStateChanged: e =>
36
- console.log('debugging onRoomStateChanged changed: ', e),
37
- onDisconnectWithError: e =>
38
- console.log('debugging onDisconnectWithError: ', e),
70
+ onPhaseChanged: e => {
71
+ console.log('debugging onPhaseChanged changed: ', e);
72
+ setIsLoading(false);
73
+ },
74
+ // onRoomStateChanged: e =>
75
+ // console.log('debugging onRoomStateChanged changed: ', e),
76
+ onDisconnectWithError: e => {
77
+ console.log('debugging onDisconnectWithError: ', e);
78
+ setIsLoading(false);
79
+ },
39
80
  };
40
81
 
41
82
  const sdkCallbacks = {
42
- onSetupFail: error =>
43
- console.log('debugging whiteboard sdk setup fail: ', error),
83
+ onSetupFail: error => {
84
+ console.log('debugging whiteboard sdk setup fail: ', error);
85
+ setIsLoading(false);
86
+ },
44
87
  };
45
88
 
46
89
  const joinRoomCallback = (aRoom, aSdk, error) => {
@@ -48,7 +91,7 @@ const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
48
91
  sdkRef.current = aSdk;
49
92
 
50
93
  console.log('debugging aRoom', aRoom);
51
-
94
+ setIsLoading(false);
52
95
  if (error) {
53
96
  console.log(error);
54
97
  } else {
@@ -61,14 +104,29 @@ const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
61
104
  };
62
105
 
63
106
  return (
64
- <View style={style.whiteboardContainer}>
107
+ <View
108
+ style={
109
+ isWhiteboardOnFullScreen
110
+ ? style.whiteboardContainerLandscape
111
+ : style.whiteboardContainer
112
+ }>
65
113
  {whiteboardActive ? (
66
114
  <>
115
+ {isLoading ? (
116
+ <View style={style.placeholder}>
117
+ <Text style={style.loadingTextStyle}>
118
+ {whiteboardInitializing}
119
+ </Text>
120
+ </View>
121
+ ) : (
122
+ <></>
123
+ )}
67
124
  <WhiteboardWidget whiteboardRoom={roomRef} />
68
125
  <NativeWhiteboardView
69
126
  style={style.whiteboard}
70
127
  sdkConfig={{
71
128
  appIdentifier: $config.WHITEBOARD_APPIDENTIFIER,
129
+ userCursor: true,
72
130
  }}
73
131
  roomConfig={{
74
132
  uid: getWhiteboardUid()?.toString(),
@@ -90,11 +148,26 @@ const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
90
148
  };
91
149
 
92
150
  const style = StyleSheet.create({
151
+ placeholder: {
152
+ position: 'absolute',
153
+ top: '30%',
154
+ alignItems: 'center', //Centered horizontally
155
+ flex: 1,
156
+ zIndex: 999,
157
+ },
158
+ whiteboardContainerLandscape: {
159
+ flex: 1,
160
+ position: 'relative',
161
+ alignSelf: 'center',
162
+ alignItems: 'center',
163
+ transform: [{rotate: '90deg'}],
164
+ },
93
165
  whiteboardContainer: {
94
166
  flex: 1,
95
167
  flexDirection: 'column',
96
168
  alignItems: 'center',
97
169
  backgroundColor: 'black',
170
+ position: 'relative',
98
171
  },
99
172
  whiteboard: {
100
173
  aspectRatio: 16.0 / 9.0,
@@ -104,6 +177,12 @@ const style = StyleSheet.create({
104
177
  flex: 1,
105
178
  justifyContent: 'center',
106
179
  },
180
+ loadingTextStyle: {
181
+ color: $config.HARD_CODED_BLACK_COLOR,
182
+ fontFamily: ThemeConfig.FontFamily.sansPro,
183
+ fontSize: ThemeConfig.FontSize.small,
184
+ fontWeight: '600',
185
+ },
107
186
  });
108
187
 
109
188
  export default WhiteboardView;
@@ -22,7 +22,13 @@ import {
22
22
  import {whiteboardContext, BoardColor} from './WhiteboardConfigure';
23
23
  import events, {PersistanceLevel} from '../../rtm-events-api';
24
24
  import {EventNames} from '../../rtm-events';
25
- import {isMobileUA, isWebInternal, randomString} from '../../utils/common';
25
+ import {
26
+ isIOS,
27
+ isMobileUA,
28
+ isWebInternal,
29
+ randomString,
30
+ isAndroid,
31
+ } from '../../utils/common';
26
32
  import Toast from '../../../react-native-toast-message';
27
33
  import ThemeConfig from '../../theme';
28
34
  import {DefaultLayouts} from '../../pages/video-call/DefaultLayouts';
@@ -69,8 +75,12 @@ const WhiteboardWidget = ({whiteboardRoom}) => {
69
75
  const exportsuccess = useString(whiteboardExportSuccessToastHeading)();
70
76
 
71
77
  const [isInProgress, setIsInProgress] = useState(false);
72
- const {setBoardColor, boardColor, getWhiteboardUid} =
73
- useContext(whiteboardContext);
78
+ const {
79
+ setBoardColor,
80
+ boardColor,
81
+ getWhiteboardUid,
82
+ isWhiteboardOnFullScreen,
83
+ } = useContext(whiteboardContext);
74
84
  const {
75
85
  data: {whiteboard: {room_uuid} = {}},
76
86
  } = useRoomInfo();
@@ -199,7 +209,8 @@ const WhiteboardWidget = ({whiteboardRoom}) => {
199
209
  <>
200
210
  <View style={style.toolboxContainer}>
201
211
  <View style={style.toolboxNew} nativeID="toolbox">
202
- {!whiteboardRoom.current?.isWritable ? (
212
+ {(!whiteboardRoom.current?.isWritable || isIOS() || isAndroid()) &&
213
+ !isWhiteboardOnFullScreen ? (
203
214
  <View style={style.viewOnlyContainerStyle}>
204
215
  <ImageIcon
205
216
  name="view-only"
@@ -1,9 +1,9 @@
1
- import {ClientRole} from '../../../agora-rn-uikit';
1
+ import {ClientRoleType} from '../../../agora-rn-uikit';
2
2
  import {I18nBaseType, I18nConditionalType} from '../i18nTypes';
3
3
 
4
4
  export interface PrecallJoinBtnTextInterface {
5
5
  ready: boolean;
6
- role?: ClientRole;
6
+ role?: ClientRoleType;
7
7
  waitingRoom?: boolean;
8
8
  }
9
9
 
@@ -138,7 +138,9 @@ export const PrecallScreenLabels: I18nPrecallScreenLabelsInterface = {
138
138
  ? !role
139
139
  ? 'JOIN ROOM'
140
140
  : `JOIN ROOM AS ${
141
- role === ClientRole.Broadcaster ? 'HOST' : 'AUDIENCE'
141
+ role === ClientRoleType.ClientRoleBroadcaster
142
+ ? 'HOST'
143
+ : 'AUDIENCE'
142
144
  }`
143
145
  : `Loading...`;
144
146
  }
@@ -152,32 +152,49 @@ export const clearAllWhiteboardPopupSubHeading =
152
152
  export const clearAllWhiteboardPopupPrimaryBtnText =
153
153
  'clearAllWhiteboardPopupPrimaryBtnText';
154
154
 
155
- export const leavePopupHeading = `leave${room}PopupHeading`;
156
- export const leavePopupSubHeading = `leave${room}PopupSubHeading`;
157
- export const leavePopupPrimaryBtnText = `leave${room}PopupPrimaryBtnText`;
158
-
159
- export const removeUserFromRoomPopupHeading = `removeUserFrom${room}PopupHeading`;
160
- export const removeUserFromRoomPopupSubHeading = `removeUserFrom${room}PopupSubHeading`;
161
- export const removeUserFromRoomPopupPrimaryBtnText = `removeUserFrom${room}PopupPrimaryBtnText`;
162
-
163
- export const removeScreenshareFromRoomPopupHeading = `removeScreenshareFrom${room}PopupHeading`;
164
- export const removeScreenshareFromRoomPopupSubHeading = `removeScreenshareFrom${room}PopupSubHeading`;
165
- export const removeScreenshareFromRoomPopupPrimaryBtnText = `removeScreenshareFrom${room}PopupPrimaryBtnText`;
155
+ export const leavePopupHeading = `leave${room}PopupHeading` as const;
156
+ export const leavePopupSubHeading = `leave${room}PopupSubHeading` as const;
157
+ export const leavePopupPrimaryBtnText =
158
+ `leave${room}PopupPrimaryBtnText` as const;
159
+
160
+ export const removeUserFromRoomPopupHeading =
161
+ `removeUserFrom${room}PopupHeading` as const;
162
+ export const removeUserFromRoomPopupSubHeading =
163
+ `removeUserFrom${room}PopupSubHeading` as const;
164
+ export const removeUserFromRoomPopupPrimaryBtnText =
165
+ `removeUserFrom${room}PopupPrimaryBtnText` as const;
166
+
167
+ export const removeScreenshareFromRoomPopupHeading =
168
+ `removeScreenshareFrom${room}PopupHeading` as const;
169
+ export const removeScreenshareFromRoomPopupSubHeading =
170
+ `removeScreenshareFrom${room}PopupSubHeading` as const;
171
+ export const removeScreenshareFromRoomPopupPrimaryBtnText =
172
+ `removeScreenshareFrom${room}PopupPrimaryBtnText` as const;
166
173
 
167
174
  export const stt = 'stt';
168
175
 
169
- export const sttChangeLanguagePopupHeading = `${stt}ChangeSpokenLanguagePopupHeading`;
170
- export const sttChangeLanguagePopupSubHeading = `${stt}ChangeSpokenLanguagePopupSubHeading`;
171
- export const sttChangeLanguagePopupDropdownError = `${stt}ChangeSpokenLanguagePopupDropdownError`;
172
- export const sttChangeLanguagePopupDropdownInfo = `${stt}ChangeSpokenLanguagePopupDropdownInfo`;
173
- export const sttChangeLanguagePopupPrimaryBtnText = `${stt}ChangeSpokenLanguagePopupPrimaryBtnText`;
174
-
175
- export const sttChangeSpokenLanguageText = `${stt}ChangeSpokenLanguageText`;
176
- export const sttSettingSpokenLanguageText = `${stt}SettingSpokenLanguageText`;
177
- export const sttTranscriptPanelHeaderText = `${stt}TranscriptPanelHeaderText`;
178
- export const sttDownloadBtnText = `${stt}DownloadBtnText`;
179
- export const sttDownloadTranscriptBtnText = `${stt}DownloadTranscriptBtnText`;
180
- export const sttLanguageChangeInProgress = `${stt}LanguageChangeInProgress`;
176
+ export const sttChangeLanguagePopupHeading =
177
+ `${stt}ChangeSpokenLanguagePopupHeading` as const;
178
+ export const sttChangeLanguagePopupSubHeading =
179
+ `${stt}ChangeSpokenLanguagePopupSubHeading` as const;
180
+ export const sttChangeLanguagePopupDropdownError =
181
+ `${stt}ChangeSpokenLanguagePopupDropdownError` as const;
182
+ export const sttChangeLanguagePopupDropdownInfo =
183
+ `${stt}ChangeSpokenLanguagePopupDropdownInfo` as const;
184
+ export const sttChangeLanguagePopupPrimaryBtnText =
185
+ `${stt}ChangeSpokenLanguagePopupPrimaryBtnText` as const;
186
+
187
+ export const sttChangeSpokenLanguageText =
188
+ `${stt}ChangeSpokenLanguageText` as const;
189
+ export const sttSettingSpokenLanguageText =
190
+ `${stt}SettingSpokenLanguageText` as const;
191
+ export const sttTranscriptPanelHeaderText =
192
+ `${stt}TranscriptPanelHeaderText` as const;
193
+ export const sttDownloadBtnText = `${stt}DownloadBtnText` as const;
194
+ export const sttDownloadTranscriptBtnText =
195
+ `${stt}DownloadTranscriptBtnText` as const;
196
+ export const sttLanguageChangeInProgress =
197
+ `${stt}LanguageChangeInProgress` as const;
181
198
 
182
199
  export const chatPanelGroupTabText = 'chatPanelGroupTabText';
183
200
  export const chatPanelPrivateTabText = 'chatPanelPrivateTabText';
@@ -323,12 +340,14 @@ export const livestreamPromoteAsCoHostToastHeading =
323
340
  export const livestreamRequestAlreadyProcessed =
324
341
  'livestreamRequestAlreadyProcessed';
325
342
 
326
- export const videoRoomUserFallbackText = `video${room}UserFallbackText`;
343
+ export const videoRoomUserFallbackText =
344
+ `video${room}UserFallbackText` as const;
327
345
 
328
346
  export const peoplePanelMeText = 'peoplePanelMeText';
329
347
  export const peoplePanelPresenterText = 'peoplePanelPresenterText';
330
348
 
331
- export const userRemovedFromTheRoomToastHeading = `userRemovedFromThe${room}ToastHeading`;
349
+ export const userRemovedFromTheRoomToastHeading =
350
+ `userRemovedFromThe${room}ToastHeading` as const;
332
351
 
333
352
  export const vbPanelImageUploadErrorToastHeading =
334
353
  'vbPanelImageUploadErrorToastHeading';
@@ -380,6 +399,9 @@ export const whiteboardToolboxEraseText = 'whiteboardToolboxEraseText';
380
399
  export const whiteboardToolboxUploadText = 'whiteboardToolboxUploadText';
381
400
  export const whiteboardToolboxClearAllText = 'whiteboardToolboxClearAllText';
382
401
 
402
+ export const whiteboardNativeInfoToastHeading =
403
+ 'whiteboardNativeInfoToastHeading';
404
+
383
405
  export const sttSpokenLanguageToastHeading = `${stt}SpokenLanguageToastHeading`;
384
406
  export const sttSpokenLanguageToastSubHeading = `${stt}SpokenLanguageToastSubHeading`;
385
407
 
@@ -413,12 +435,16 @@ export const waitingRoomApprovalRejectionToastHeading =
413
435
  export const waitingRoomApprovalRejectionToastSubHeading =
414
436
  'waitingRoomApprovalRejectionToastSubHeading';
415
437
 
416
- export const videoRoomRecordingText = `video${room}RecordingText`;
417
- export const videoRoomGoToActiveSpeakerText = `video${room}GoToActiveSpeakerText`;
418
- export const videoRoomScreenshareText = `video${room}ScreenshareText`;
419
- export const videoRoomStartingCallText = `video${room}StartingCallText`;
420
- export const videoRoomScreenshareOverlayText = `video${room}ScreenshareOverlayText`;
421
- export const videoRoomScreenshareStopSharingBtnText = `video${room}ScreenshareStopSharingBtnText`;
438
+ export const videoRoomRecordingText = `video${room}RecordingText` as const;
439
+ export const videoRoomGoToActiveSpeakerText =
440
+ `video${room}GoToActiveSpeakerText` as const;
441
+ export const videoRoomScreenshareText = `video${room}ScreenshareText` as const;
442
+ export const videoRoomStartingCallText =
443
+ `video${room}StartingCallText` as const;
444
+ export const videoRoomScreenshareOverlayText =
445
+ `video${room}ScreenshareOverlayText` as const;
446
+ export const videoRoomScreenshareStopSharingBtnText =
447
+ `video${room}ScreenshareStopSharingBtnText` as const;
422
448
 
423
449
  export const chatPanelUserOfflineText = 'chatPanelUserOfflineText';
424
450
  export const chatPanelUnreadMessageText = 'chatPanelUnreadMessageText';
@@ -433,11 +459,21 @@ export const peoplePanelWaitingRoomRequestApprovalBtnTxt =
433
459
  export const peoplePanelWaitingRoomRequestDenyBtnTxt =
434
460
  'peoplePanelWaitingRoomRequestDenyBtnTxt';
435
461
 
436
- export const videoRoomScreenShareErrorToastHeading = `video${room}ScreenShareErrorToastHeading`;
437
- export const videoRoomScreenShareErrorToastSubHeading = `video${room}ScreenShareErrorToastSubHeading`;
438
-
439
- export const videoRoomRecordingToastHeading = `video${room}RecordingToastHeading`;
440
- export const videoRoomRecordingToastSubHeading = `video${room}RecordingToastSubHeading`;
462
+ export const videoRoomScreenShareErrorToastHeading =
463
+ `video${room}ScreenShareErrorToastHeading` as const;
464
+ export const videoRoomScreenShareErrorToastSubHeading =
465
+ `video${room}ScreenShareErrorToastSubHeading` as const;
466
+
467
+ export const videoRoomRecordingToastHeading =
468
+ `video${room}RecordingToastHeading` as const;
469
+ export const videoRoomRecordingToastSubHeading =
470
+ `video${room}RecordingToastSubHeading` as const;
471
+ export const videoRoomRecordingStartErrorToastHeading =
472
+ 'videoRoomRecordingStartErrorToastHeading';
473
+ export const videoRoomRecordingStopErrorToastHeading =
474
+ 'videoRoomRecordingStopErrorToastHeading';
475
+ export const videoRoomRecordingErrorToastSubHeading =
476
+ 'videoRoomRecordingErrorToastSubHeading';
441
477
 
442
478
  export const peoplePanelUserNotFoundLabel = 'peoplePanelUserNotFoundLabel';
443
479
  export const peoplePanelStreamingRequestSectionHeader =
@@ -447,12 +483,17 @@ export const peoplePanelLivestreamingApprovalBtnText =
447
483
  export const peoplePanelLivestreamingDenyBtnText =
448
484
  'peoplePanelLivestreamingDenyBtnText';
449
485
 
450
- export const sttTranscriptPanelSearchText = `${stt}TranscriptPanelSearchText`;
451
- export const sttTranscriptPanelNoSearchResultsFoundText = `${stt}TranscriptPanelNoSearchResultsFoundText`;
452
- export const sttTranscriptPanelViewLatestText = `${stt}TranscriptPanelViewLatestText`;
486
+ export const sttTranscriptPanelSearchText =
487
+ `${stt}TranscriptPanelSearchText` as const;
488
+ export const sttTranscriptPanelNoSearchResultsFoundText =
489
+ `${stt}TranscriptPanelNoSearchResultsFoundText` as const;
490
+ export const sttTranscriptPanelViewLatestText =
491
+ `${stt}TranscriptPanelViewLatestText` as const;
453
492
 
454
- export const videoRoomPeopleCountTooltipHostText = `video${room}PeopleCountTooltipHostText`;
455
- export const videoRoomPeopleCountTooltipAttendeeText = `video${room}PeopleCountTooltipAttendeeText`;
493
+ export const videoRoomPeopleCountTooltipHostText =
494
+ `video${room}PeopleCountTooltipHostText` as const;
495
+ export const videoRoomPeopleCountTooltipAttendeeText =
496
+ `video${room}PeopleCountTooltipAttendeeText` as const;
456
497
 
457
498
  export interface I18nVideoCallScreenLabelsInterface {
458
499
  [toolbarItemPeopleText]?: I18nBaseType;
@@ -679,6 +720,7 @@ export interface I18nVideoCallScreenLabelsInterface {
679
720
  [whiteboardFileUploadInfoToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
680
721
  [whiteboardFileUploadTypeErrorToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
681
722
  [whiteboardFileUploadTypeErrorToastSubHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
723
+ [whiteboardNativeInfoToastHeading]?: I18nBaseType;
682
724
 
683
725
  [sttSpokenLanguageToastHeading]?: I18nBaseType<sttSpokenLanguageToastHeadingDataType>;
684
726
  [sttSpokenLanguageToastSubHeading]?: I18nBaseType<sttSpokenLanguageToastSubHeadingDataInterface>;
@@ -725,6 +767,10 @@ export interface I18nVideoCallScreenLabelsInterface {
725
767
  [videoRoomScreenShareErrorToastSubHeading]?: I18nBaseType;
726
768
  [videoRoomRecordingToastHeading]?: I18nConditionalType;
727
769
  [videoRoomRecordingToastSubHeading]?: I18nDynamicType;
770
+ [videoRoomRecordingStartErrorToastHeading]?: I18nBaseType;
771
+ [videoRoomRecordingStopErrorToastHeading]?: I18nBaseType;
772
+ [videoRoomRecordingErrorToastSubHeading]?: I18nBaseType;
773
+
728
774
  [peoplePanelUserNotFoundLabel]?: I18nBaseType;
729
775
  [peoplePanelStreamingRequestSectionHeader]?: I18nBaseType;
730
776
  [peoplePanelLivestreamingApprovalBtnText]?: I18nBaseType;
@@ -1155,6 +1201,10 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
1155
1201
  active ? 'Recording Started' : 'Recording Stopped',
1156
1202
  [videoRoomRecordingToastSubHeading]: name =>
1157
1203
  `This room is being recorded by ${name}`,
1204
+ [videoRoomRecordingStartErrorToastHeading]: 'Recording failed to start',
1205
+ [videoRoomRecordingStopErrorToastHeading]: 'Recording failed to stop',
1206
+ [videoRoomRecordingErrorToastSubHeading]: 'There was an internal error.',
1207
+
1158
1208
  [peoplePanelUserNotFoundLabel]: 'User not found',
1159
1209
  [peoplePanelStreamingRequestSectionHeader]: 'STREAMING REQUEST',
1160
1210
  [peoplePanelLivestreamingApprovalBtnText]: 'Accept',
@@ -1167,4 +1217,6 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
1167
1217
  [videoRoomPeopleCountTooltipHostText]: 'Host',
1168
1218
  [videoRoomPeopleCountTooltipAttendeeText]: ({eventMode}) =>
1169
1219
  eventMode ? 'Audience' : 'Attendee',
1220
+ [whiteboardNativeInfoToastHeading]:
1221
+ 'Use two finger to move around the whiteboard',
1170
1222
  };
@@ -11,12 +11,13 @@
11
11
  */
12
12
  // @ts-nocheck
13
13
  import React, {useState, useContext, useEffect, useRef} from 'react';
14
+ import {useApolloClient} from '@apollo/client';
14
15
  import {View, StyleSheet, Text} from 'react-native';
15
16
  import {
16
17
  RtcConfigure,
17
18
  PropsProvider,
18
- ClientRole,
19
- ChannelProfile,
19
+ ClientRoleType,
20
+ ChannelProfileType,
20
21
  LocalUserContext,
21
22
  UidType,
22
23
  CallbacksInterface,
@@ -49,7 +50,6 @@ import {
49
50
  WaitingRoomStatus,
50
51
  } from '../components/room-info/useRoomInfo';
51
52
  import {SidePanelProvider} from '../utils/useSidePanel';
52
- import VideoCallScreen from './video-call/VideoCallScreen';
53
53
  import {NetworkQualityProvider} from '../components/NetworkQualityContext';
54
54
  import {ChatNotificationProvider} from '../components/chat-notification/useChatNotification';
55
55
  import {ChatUIControlsProvider} from '../components/chat-ui/useChatUIControls';
@@ -70,13 +70,13 @@ import {CaptionProvider} from '../subComponents/caption/useCaption';
70
70
  import SdkMuteToggleListener from '../components/SdkMuteToggleListener';
71
71
  import StorageContext from '../components/StorageContext';
72
72
  import {useSetRoomInfo} from '../components/room-info/useSetRoomInfo';
73
- import WhiteboardConfigure from '../components/whiteboard/WhiteboardConfigure';
74
73
  import {NoiseSupressionProvider} from '../app-state/useNoiseSupression';
75
74
  import {VideoQualityContextProvider} from '../app-state/useVideoQuality';
76
75
  import {VBProvider} from '../components/virtual-background/useVB';
77
76
  import {DisableChatProvider} from '../components/disable-chat/useDisableChat';
78
77
  import {WaitingRoomProvider} from '../components/contexts/WaitingRoomContext';
79
- import {isWeb} from '../utils/common';
78
+ import VideoCallScreenWrapper from './video-call/VideoCallScreenWrapper';
79
+ import {useIsRecordingBot} from '../subComponents/recording/useIsRecordingBot';
80
80
  import {videoRoomStartingCallText} from '../language/default-labels/videoCallScreenLabels';
81
81
  import {useString} from '../utils/useString';
82
82
  import {useCustomization} from 'customization-implementation';
@@ -130,9 +130,26 @@ const VideoCall: React.FC = () => {
130
130
  const hasBrandLogo = useHasBrandLogo();
131
131
  const joiningLoaderLabel = useString(videoRoomStartingCallText)();
132
132
 
133
+ const client = useApolloClient();
134
+
133
135
  const {setGlobalErrorMessage} = useContext(ErrorContext);
134
136
  const {awake, release} = useWakeLock();
135
- const [callActive, setCallActive] = useState($config.PRECALL ? false : true);
137
+ const {isRecordingBot} = useIsRecordingBot();
138
+ /**
139
+ * Should we set the callscreen to active ??
140
+ * a) If Recording bot( i.e prop: recordingBot) is TRUE then it means,
141
+ * the recording bot is accessing the screen - so YES we should set
142
+ * the callActive as true and we need not check for whether
143
+ * $config.PRECALL is enabled or not.
144
+ * b) If Recording bot( i.e prop: recordingBot) is FALSE then we should set
145
+ * the callActive depending upon the value of magic variable - $config.PRECALL
146
+ */
147
+ const shouldCallBeSetToActive = isRecordingBot
148
+ ? true
149
+ : $config.PRECALL
150
+ ? false
151
+ : true;
152
+ const [callActive, setCallActive] = useState(shouldCallBeSetToActive);
136
153
 
137
154
  //layouts
138
155
  const layouts = useLayoutsData();
@@ -177,7 +194,7 @@ const VideoCall: React.FC = () => {
177
194
  encryption: $config.ENCRYPTION_ENABLED
178
195
  ? {key: null, mode: RnEncryptionEnum.AES128GCM2, screenKey: null}
179
196
  : false,
180
- role: ClientRole.Broadcaster,
197
+ role: ClientRoleType.ClientRoleBroadcaster,
181
198
  geoFencing: $config.GEO_FENCING,
182
199
  audioRoom: $config.AUDIO_ROOM,
183
200
  activeSpeaker: $config.ACTIVE_SPEAKER,
@@ -185,6 +202,7 @@ const VideoCall: React.FC = () => {
185
202
  sdkCameraDevice.deviceId || store?.activeDeviceId?.videoinput || null,
186
203
  preferredMicrophoneId:
187
204
  sdkMicrophoneDevice.deviceId || store?.activeDeviceId?.audioinput || null,
205
+ recordingBot: isRecordingBot ? true : false,
188
206
  });
189
207
 
190
208
  const history = useHistory();
@@ -290,7 +308,9 @@ const VideoCall: React.FC = () => {
290
308
  : false,
291
309
  screenShareUid: data.screenShareUid,
292
310
  screenShareToken: data.screenShareToken,
293
- role: data.isHost ? ClientRole.Broadcaster : ClientRole.Audience,
311
+ role: data.isHost
312
+ ? ClientRoleType.ClientRoleBroadcaster
313
+ : ClientRoleType.ClientRoleAudience,
294
314
  preventJoin:
295
315
  !$config.ENABLE_WAITING_ROOM ||
296
316
  ($config.ENABLE_WAITING_ROOM && data.isHost) ||
@@ -323,25 +343,14 @@ const VideoCall: React.FC = () => {
323
343
  // SdkJoinState.promise?.res();
324
344
  // }
325
345
  // },
326
- EndCall: (isHost, isTriggeredByHost) => {
327
- if (afterEndCall) {
328
- clearState('join');
329
- setTimeout(() => {
330
- // TODO: These callbacks are being called twice
331
- SDKEvents.emit('leave');
332
- try {
333
- afterEndCall(isHost, history, isTriggeredByHost);
334
- } catch (error) {
335
- console.error('ERROR on useAfterEndCall hook', error);
336
- }
337
- }, 0);
338
- } else {
339
- setTimeout(() => {
340
- // TODO: These callbacks are being called twice
341
- SDKEvents.emit('leave');
342
- history.push('/');
343
- }, 0);
344
- }
346
+ EndCall: () => {
347
+ clearState('join');
348
+ setTimeout(() => {
349
+ // TODO: These callbacks are being called twice
350
+ SDKEvents.emit('leave');
351
+ history.push('/');
352
+ client.resetStore();
353
+ }, 0);
345
354
  },
346
355
  UserJoined: (uid: UidType) => {
347
356
  console.log('UIKIT Callback: UserJoined', uid);
@@ -388,8 +397,8 @@ const VideoCall: React.FC = () => {
388
397
  callbacks,
389
398
  styleProps,
390
399
  mode: $config.EVENT_MODE
391
- ? ChannelProfile.LiveBroadcasting
392
- : ChannelProfile.Communication,
400
+ ? ChannelProfileType.ChannelProfileLiveBroadcasting
401
+ : ChannelProfileType.ChannelProfileCommunication,
393
402
  }}>
394
403
  <RtcConfigure>
395
404
  <DeviceConfigure>
@@ -445,14 +454,7 @@ const VideoCall: React.FC = () => {
445
454
  <VideoMeetingDataProvider>
446
455
  <VideoCallProvider>
447
456
  <DisableChatProvider>
448
- {$config.ENABLE_WHITEBOARD &&
449
- isWebInternal() ? (
450
- <WhiteboardConfigure>
451
- <VideoCallScreen />
452
- </WhiteboardConfigure>
453
- ) : (
454
- <VideoCallScreen />
455
- )}
457
+ <VideoCallScreenWrapper />
456
458
  </DisableChatProvider>
457
459
  </VideoCallProvider>
458
460
  </VideoMeetingDataProvider>
@@ -10,7 +10,7 @@ import LocalSwitchCamera from '../../subComponents/LocalSwitchCamera';
10
10
  import Recording from '../../subComponents/Recording';
11
11
  import ChatContext from '../../components/ChatContext';
12
12
  import {PropsContext, ToggleState} from '../../../agora-rn-uikit';
13
- import {ClientRole} from '../../../agora-rn-uikit';
13
+ import {ClientRoleType} from '../../../agora-rn-uikit';
14
14
  import {
15
15
  RoomInfoContextInterface,
16
16
  useRoomInfo,
@@ -355,8 +355,9 @@ const ActionSheetContent = props => {
355
355
  }, [sttLanguage]);
356
356
 
357
357
  const isLiveStream = $config.EVENT_MODE && !$config.AUDIO_ROOM;
358
- const isAudience = rtcProps?.role === ClientRole.Audience;
359
- const isBroadCasting = rtcProps?.role === ClientRole.Broadcaster;
358
+ const isAudience = rtcProps?.role === ClientRoleType.ClientRoleAudience;
359
+ const isBroadCasting =
360
+ rtcProps?.role === ClientRoleType.ClientRoleBroadcaster;
360
361
  const isHandRaised = raiseHandList[localUid]?.raised === RaiseHandValue.TRUE;
361
362
 
362
363
  const isAudioRoom = $config.AUDIO_ROOM;
@@ -105,7 +105,8 @@ const style = StyleSheet.create({
105
105
  bottom: 8,
106
106
  borderRadius: 4,
107
107
  flexDirection: 'row',
108
- zIndex: 5,
108
+ zIndex: 999,
109
+ elevation: 5,
109
110
  },
110
111
  name: {
111
112
  color: $config.VIDEO_AUDIO_TILE_TEXT_COLOR,