agora-appbuilder-core 4.0.0-beta.28 → 4.0.0-beta.29

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.28",
3
+ "version": "4.0.0-beta.29",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -210,30 +210,32 @@ const MoreButton = () => {
210
210
  whiteboardActive: boolean,
211
211
  triggerEvent: boolean,
212
212
  ) => {
213
- if (whiteboardActive) {
214
- leaveWhiteboardRoom();
215
- setCustomContent(whiteboardUid, false);
216
- setLayout('grid');
217
- triggerEvent &&
218
- events.send(
219
- 'WhiteBoardStopped',
220
- JSON.stringify({}),
221
- PersistanceLevel.Session,
222
- );
223
- } else {
224
- joinWhiteboardRoom();
225
- setCustomContent(whiteboardUid, WhiteboardWrapper, {}, true);
226
- dispatch({
227
- type: 'UserPin',
228
- value: [whiteboardUid],
229
- });
230
- setLayout('pinned');
231
- triggerEvent &&
232
- events.send(
233
- 'WhiteBoardStarted',
234
- JSON.stringify({}),
235
- PersistanceLevel.Session,
236
- );
213
+ if ($config.ENABLE_WHITEBOARD) {
214
+ if (whiteboardActive) {
215
+ leaveWhiteboardRoom();
216
+ setCustomContent(whiteboardUid, false);
217
+ setLayout('grid');
218
+ triggerEvent &&
219
+ events.send(
220
+ 'WhiteBoardStopped',
221
+ JSON.stringify({}),
222
+ PersistanceLevel.Session,
223
+ );
224
+ } else {
225
+ joinWhiteboardRoom();
226
+ setCustomContent(whiteboardUid, WhiteboardWrapper, {}, true);
227
+ dispatch({
228
+ type: 'UserPin',
229
+ value: [whiteboardUid],
230
+ });
231
+ setLayout('pinned');
232
+ triggerEvent &&
233
+ events.send(
234
+ 'WhiteBoardStarted',
235
+ JSON.stringify({}),
236
+ PersistanceLevel.Session,
237
+ );
238
+ }
237
239
  }
238
240
  };
239
241
  const WhiteboardDisabled =
@@ -261,44 +263,46 @@ const MoreButton = () => {
261
263
 
262
264
  // host can see stt options and attendee can view only when stt is enabled by a host in the channel
263
265
 
264
- actionMenuitems.push({
265
- icon: `${isCaptionON ? 'captions-off' : 'captions'}`,
266
- iconColor: $config.SECONDARY_ACTION_COLOR,
267
- textColor: $config.FONT_COLOR,
268
- disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
269
- title: `${isCaptionON ? 'Hide Caption' : 'Show Caption'}`,
270
- callback: () => {
271
- setActionMenuVisible(false);
272
- STT_clicked.current = !isCaptionON ? 'caption' : null;
273
- if (isSTTActive) {
274
- setIsCaptionON(prev => !prev);
275
- // is lang popup has been shown once for any user in meeting
276
- } else {
277
- isFirstTimePopupOpen.current = true;
278
- setLanguagePopup(true);
279
- }
280
- },
281
- });
282
-
283
- actionMenuitems.push({
284
- icon: 'transcript',
285
- iconColor: $config.SECONDARY_ACTION_COLOR,
286
- textColor: $config.FONT_COLOR,
287
- disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
288
- title: `${isTranscriptON ? 'Hide Transcript' : 'Show Transcript'}`,
289
- callback: () => {
290
- setActionMenuVisible(false);
291
- STT_clicked.current = !isTranscriptON ? 'transcript' : null;
292
- if (isSTTActive) {
293
- !isTranscriptON
294
- ? setSidePanel(SidePanelType.Transcript)
295
- : setSidePanel(SidePanelType.None);
296
- } else {
297
- isFirstTimePopupOpen.current = true;
298
- setLanguagePopup(true);
299
- }
300
- },
301
- });
266
+ if ($config.ENABLE_STT) {
267
+ actionMenuitems.push({
268
+ icon: `${isCaptionON ? 'captions-off' : 'captions'}`,
269
+ iconColor: $config.SECONDARY_ACTION_COLOR,
270
+ textColor: $config.FONT_COLOR,
271
+ disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
272
+ title: `${isCaptionON ? 'Hide Caption' : 'Show Caption'}`,
273
+ callback: () => {
274
+ setActionMenuVisible(false);
275
+ STT_clicked.current = !isCaptionON ? 'caption' : null;
276
+ if (isSTTActive) {
277
+ setIsCaptionON(prev => !prev);
278
+ // is lang popup has been shown once for any user in meeting
279
+ } else {
280
+ isFirstTimePopupOpen.current = true;
281
+ setLanguagePopup(true);
282
+ }
283
+ },
284
+ });
285
+
286
+ actionMenuitems.push({
287
+ icon: 'transcript',
288
+ iconColor: $config.SECONDARY_ACTION_COLOR,
289
+ textColor: $config.FONT_COLOR,
290
+ disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
291
+ title: `${isTranscriptON ? 'Hide Transcript' : 'Show Transcript'}`,
292
+ callback: () => {
293
+ setActionMenuVisible(false);
294
+ STT_clicked.current = !isTranscriptON ? 'transcript' : null;
295
+ if (isSTTActive) {
296
+ !isTranscriptON
297
+ ? setSidePanel(SidePanelType.Transcript)
298
+ : setSidePanel(SidePanelType.None);
299
+ } else {
300
+ isFirstTimePopupOpen.current = true;
301
+ setLanguagePopup(true);
302
+ }
303
+ },
304
+ });
305
+ }
302
306
 
303
307
  if (globalWidth <= BREAKPOINTS.sm) {
304
308
  actionMenuitems.push({
@@ -653,7 +657,11 @@ export const RecordingToolbarItem = () => {
653
657
  export const MoreButtonToolbarItem = () => {
654
658
  const {width} = useWindowDimensions();
655
659
  return (
656
- (width < BREAKPOINTS.md || $config.ENABLE_STT) && (
660
+ (width < BREAKPOINTS.md ||
661
+ $config.ENABLE_STT ||
662
+ $config.ENABLE_AINS ||
663
+ $config.ENABLE_VIRTUAL_BACKGROUND ||
664
+ $config.ENABLE_WHITEBOARD) && (
657
665
  <ToolbarItem testID="more-btn">
658
666
  <MoreButton />
659
667
  </ToolbarItem>