agora-appbuilder-core 4.1.10-beta.1 → 4.1.11
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 +2 -2
- package/template/agora-rn-uikit/src/Utils/isBotUser.ts +1 -1
- package/template/android/app/build.gradle +0 -7
- package/template/bridge/rtc/webNg/RtcEngine.ts +2 -2
- package/template/bridge/rtm/web/Types.ts +0 -183
- package/template/bridge/rtm/web/index.ts +488 -450
- package/template/customization-api/typeDefinition.ts +0 -1
- package/template/defaultConfig.js +3 -4
- package/template/global.d.ts +0 -1
- package/template/ios/Podfile +0 -41
- package/template/package.json +5 -5
- package/template/src/AppRoutes.tsx +3 -3
- package/template/src/ai-agent/components/ControlButtons.tsx +1 -1
- package/template/src/assets/font-styles.css +1 -33
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/ActionMenu.tsx +93 -13
- package/template/src/atoms/CustomIcon.tsx +1 -8
- package/template/src/atoms/DropDownMulti.tsx +80 -29
- package/template/src/atoms/Dropdown.tsx +0 -5
- package/template/src/atoms/Input.tsx +2 -1
- package/template/src/atoms/TertiaryButton.tsx +1 -1
- package/template/src/atoms/UserAvatar.tsx +1 -1
- package/template/src/components/ChatContext.ts +3 -5
- package/template/src/components/Controls.tsx +167 -208
- package/template/src/components/DeviceConfigure.tsx +1 -1
- package/template/src/components/EventsConfigure.tsx +168 -118
- package/template/src/components/Navbar.tsx +11 -14
- package/template/src/components/RTMConfigure.tsx +819 -32
- package/template/src/components/beauty-effect/useBeautyEffects.tsx +13 -50
- package/template/src/components/chat/chatConfigure.tsx +1 -7
- package/template/src/components/chat-messages/useChatMessages.tsx +11 -43
- package/template/src/components/controls/useControlPermissionMatrix.tsx +4 -32
- package/template/src/components/participants/AllHostParticipants.tsx +2 -10
- package/template/src/components/participants/Participant.tsx +1 -7
- package/template/src/components/participants/UserActionMenuOptions.tsx +2 -12
- package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
- package/template/src/components/precall/joinCallBtn.tsx +7 -2
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +16 -15
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +31 -17
- package/template/src/components/precall/textInput.tsx +45 -22
- package/template/src/components/precall/usePreCall.tsx +7 -0
- package/template/src/components/recordings/RecordingsDateTable.tsx +2 -3
- package/template/src/components/room-info/useRoomInfo.tsx +5 -0
- package/template/src/components/useUserPreference.tsx +12 -39
- package/template/src/components/virtual-background/useVB.tsx +0 -18
- package/template/src/components/whiteboard/WhiteboardConfigure.tsx +0 -27
- package/template/src/language/default-labels/videoCallScreenLabels.ts +27 -11
- package/template/src/logger/AppBuilderLogger.tsx +3 -11
- package/template/src/pages/VideoCall.tsx +518 -171
- package/template/src/pages/video-call/ActionSheetContent.tsx +77 -77
- package/template/src/pages/video-call/SidePanelHeader.tsx +81 -53
- package/template/src/pages/video-call/VideoCallScreen.tsx +0 -18
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +1 -0
- package/template/src/rtm/RTMEngine.ts +37 -262
- package/template/src/rtm/utils.ts +1 -68
- package/template/src/rtm-events/constants.ts +7 -40
- package/template/src/rtm-events-api/Events.ts +39 -158
- package/template/src/subComponents/ChatBubble.tsx +3 -3
- package/template/src/subComponents/ChatContainer.tsx +9 -19
- package/template/src/subComponents/LocalAudioMute.tsx +2 -2
- package/template/src/subComponents/LocalVideoMute.tsx +2 -2
- package/template/src/subComponents/SidePanelEnum.tsx +0 -1
- package/template/src/subComponents/caption/Caption.tsx +48 -7
- package/template/src/subComponents/caption/CaptionContainer.tsx +324 -51
- package/template/src/subComponents/caption/CaptionIcon.tsx +35 -34
- package/template/src/subComponents/caption/CaptionText.tsx +103 -2
- package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +179 -69
- package/template/src/subComponents/caption/Transcript.tsx +46 -11
- package/template/src/subComponents/caption/TranscriptIcon.tsx +27 -35
- package/template/src/subComponents/caption/TranscriptText.tsx +78 -3
- package/template/src/subComponents/caption/proto/ptoto.js +38 -4
- package/template/src/subComponents/caption/proto/test.proto +34 -19
- package/template/src/subComponents/caption/useCaption.tsx +754 -11
- package/template/src/subComponents/caption/useSTTAPI.tsx +118 -205
- package/template/src/subComponents/caption/useStreamMessageUtils.native.ts +152 -33
- package/template/src/subComponents/caption/useStreamMessageUtils.ts +165 -34
- package/template/src/subComponents/caption/utils.ts +171 -3
- package/template/src/subComponents/chat/ChatSendButton.tsx +0 -1
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +0 -16
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +1 -1
- package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +4 -7
- package/template/src/utils/SdkEvents.ts +3 -0
- package/template/src/utils/useEndCall.ts +4 -4
- package/template/src/utils/useMuteToggleLocal.ts +10 -14
- package/template/src/utils/useSpeechToText.ts +31 -20
- package/template/bridge/rtm/web/index-legacy.ts +0 -540
- package/template/src/components/RTMConfigure-legacy.tsx +0 -848
- package/template/src/components/UserGlobalPreferenceProvider.tsx +0 -227
- package/template/src/components/breakout-room/BreakoutRoomPanel.tsx +0 -58
- package/template/src/components/breakout-room/context/BreakoutRoomContext.tsx +0 -2508
- package/template/src/components/breakout-room/events/BreakoutRoomEventsConfigure.tsx +0 -272
- package/template/src/components/breakout-room/events/constants.ts +0 -17
- package/template/src/components/breakout-room/hoc/BreakoutRoomNameRenderer.tsx +0 -68
- package/template/src/components/breakout-room/hooks/useBreakoutRoomExit.ts +0 -49
- package/template/src/components/breakout-room/state/reducer.ts +0 -522
- package/template/src/components/breakout-room/state/types.ts +0 -54
- package/template/src/components/breakout-room/ui/BreakoutMeetingTitle.tsx +0 -60
- package/template/src/components/breakout-room/ui/BreakoutRoomActionMenu.tsx +0 -136
- package/template/src/components/breakout-room/ui/BreakoutRoomAnnouncementModal.tsx +0 -135
- package/template/src/components/breakout-room/ui/BreakoutRoomGroupSettings.tsx +0 -588
- package/template/src/components/breakout-room/ui/BreakoutRoomMainRoomUsers.tsx +0 -142
- package/template/src/components/breakout-room/ui/BreakoutRoomMemberActionMenu.tsx +0 -122
- package/template/src/components/breakout-room/ui/BreakoutRoomParticipants.tsx +0 -124
- package/template/src/components/breakout-room/ui/BreakoutRoomRaiseHand.tsx +0 -65
- package/template/src/components/breakout-room/ui/BreakoutRoomRenameModal.tsx +0 -227
- package/template/src/components/breakout-room/ui/BreakoutRoomSettings.tsx +0 -140
- package/template/src/components/breakout-room/ui/BreakoutRoomTransition.tsx +0 -52
- package/template/src/components/breakout-room/ui/BreakoutRoomView.tsx +0 -193
- package/template/src/components/breakout-room/ui/ExitBreakoutRoomIconButton.tsx +0 -79
- package/template/src/components/breakout-room/ui/ParticipantManualAssignmentModal.tsx +0 -638
- package/template/src/components/breakout-room/ui/SelectParticipantAssignmentStrategy.tsx +0 -57
- package/template/src/components/common/Dividers.tsx +0 -53
- package/template/src/components/controls/toolbar-items/ExitBreakoutRoomToolbarItem.tsx +0 -13
- package/template/src/components/raise-hand/RaiseHandButton.tsx +0 -50
- package/template/src/components/raise-hand/RaiseHandProvider.tsx +0 -308
- package/template/src/components/raise-hand/index.ts +0 -14
- package/template/src/components/room-info/useCurrentRoomInfo.tsx +0 -42
- package/template/src/components/room-info/useSetBreakoutRoomInfo.tsx +0 -64
- package/template/src/pages/video-call/BreakoutVideoCall.tsx +0 -213
- package/template/src/pages/video-call/VideoCallContent.tsx +0 -211
- package/template/src/pages/video-call/VideoCallStateWrapper.tsx +0 -495
- package/template/src/rtm/RTMConfigureBreakoutRoomProvider.tsx +0 -882
- package/template/src/rtm/RTMConfigureMainRoomProvider.tsx +0 -757
- package/template/src/rtm/RTMCoreProvider.tsx +0 -419
- package/template/src/rtm/RTMGlobalStateProvider.tsx +0 -706
- package/template/src/rtm/RTMStatusBanner.tsx +0 -99
- package/template/src/rtm/constants.ts +0 -12
- package/template/src/rtm/hooks/useMainRoomUserDisplayName.ts +0 -45
- package/template/src/rtm/rtm-presence-utils.ts +0 -344
- package/template/src/subComponents/chat/ChatAnnouncementView.tsx +0 -65
- package/template/src/utils/useDebouncedCallback.tsx +0 -20
|
@@ -58,13 +58,19 @@ import {
|
|
|
58
58
|
import {useVideoCall} from './useVideoCall';
|
|
59
59
|
import {useScreenshare} from '../subComponents/screenshare/useScreenshare';
|
|
60
60
|
import LayoutIconDropdown from '../subComponents/LayoutIconDropdown';
|
|
61
|
-
import {
|
|
61
|
+
import {
|
|
62
|
+
LanguageTranslationConfig,
|
|
63
|
+
useCaption,
|
|
64
|
+
} from '../../src/subComponents/caption/useCaption';
|
|
62
65
|
import LanguageSelectorPopup from '../../src/subComponents/caption/LanguageSelectorPopup';
|
|
63
|
-
import useSTTAPI from '../../src/subComponents/caption/useSTTAPI';
|
|
64
66
|
import {EventNames} from '../rtm-events';
|
|
65
67
|
import events, {PersistanceLevel} from '../rtm-events-api';
|
|
66
68
|
import Toast from '../../react-native-toast-message';
|
|
67
|
-
import {
|
|
69
|
+
import {
|
|
70
|
+
getLanguageLabel,
|
|
71
|
+
LanguageType,
|
|
72
|
+
TranslateConfig,
|
|
73
|
+
} from '../../src/subComponents/caption/utils';
|
|
68
74
|
import Toolbar from '../atoms/Toolbar';
|
|
69
75
|
import ToolbarItem, {useToolbarProps} from '../atoms/ToolbarItem';
|
|
70
76
|
import {
|
|
@@ -104,7 +110,6 @@ import {
|
|
|
104
110
|
toolbarItemVirtualBackgroundText,
|
|
105
111
|
toolbarItemWhiteboardText,
|
|
106
112
|
toolbarItemManageTextTracksText,
|
|
107
|
-
toolbarItemBreakoutRoomText,
|
|
108
113
|
} from '../language/default-labels/videoCallScreenLabels';
|
|
109
114
|
import {LogSource, logger} from '../logger/AppBuilderLogger';
|
|
110
115
|
import {useModal} from '../utils/useModal';
|
|
@@ -118,8 +123,6 @@ import {
|
|
|
118
123
|
ScreenshareToolbarItem,
|
|
119
124
|
} from './controls/toolbar-items';
|
|
120
125
|
import ViewTextTracksModal from './text-tracks/ViewTextTracksModal';
|
|
121
|
-
import {useBreakoutRoom} from './breakout-room/context/BreakoutRoomContext';
|
|
122
|
-
import {ExitBreakoutRoomToolbarItem} from './controls/toolbar-items/ExitBreakoutRoomToolbarItem';
|
|
123
126
|
|
|
124
127
|
export const useToggleWhiteboard = () => {
|
|
125
128
|
const {
|
|
@@ -288,7 +291,6 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
288
291
|
const virtualBackgroundLabel = useString(toolbarItemVirtualBackgroundText)();
|
|
289
292
|
const chatLabel = useString(toolbarItemChatText)();
|
|
290
293
|
const inviteLabel = useString(toolbarItemInviteText)();
|
|
291
|
-
const breakoutRoomLabel = useString(toolbarItemBreakoutRoomText)();
|
|
292
294
|
const peopleLabel = useString(toolbarItemPeopleText)();
|
|
293
295
|
const layoutLabel = useString(toolbarItemLayoutText)();
|
|
294
296
|
const {dispatch} = useContext(DispatchContext);
|
|
@@ -316,20 +318,21 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
316
318
|
const {
|
|
317
319
|
isCaptionON,
|
|
318
320
|
setIsCaptionON,
|
|
319
|
-
language: prevLang,
|
|
321
|
+
// language: prevLang,
|
|
320
322
|
isSTTActive,
|
|
321
|
-
setIsSTTActive,
|
|
323
|
+
// setIsSTTActive,
|
|
322
324
|
isSTTError,
|
|
325
|
+
handleTranslateConfigChange,
|
|
323
326
|
} = useCaption();
|
|
324
327
|
|
|
325
328
|
const isTranscriptON = sidePanel === SidePanelType.Transcript;
|
|
326
329
|
|
|
327
330
|
const [isLanguagePopupOpen, setLanguagePopup] =
|
|
328
331
|
React.useState<boolean>(false);
|
|
329
|
-
const isFirstTimePopupOpen = React.useRef(false);
|
|
332
|
+
// const isFirstTimePopupOpen = React.useRef(false);
|
|
330
333
|
const STT_clicked = React.useRef(null);
|
|
331
334
|
|
|
332
|
-
const {start, restart} = useSTTAPI();
|
|
335
|
+
// const {start, restart} = useSTTAPI();
|
|
333
336
|
const {
|
|
334
337
|
data: {isHost},
|
|
335
338
|
} = useRoomInfo();
|
|
@@ -486,8 +489,7 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
486
489
|
: false;
|
|
487
490
|
|
|
488
491
|
// 2. whiteboard ends
|
|
489
|
-
|
|
490
|
-
if (canAccessWhiteboard) {
|
|
492
|
+
if (isHost && $config.ENABLE_WHITEBOARD && isWebInternal()) {
|
|
491
493
|
actionMenuitems.push({
|
|
492
494
|
componentName: 'whiteboard',
|
|
493
495
|
order: 2,
|
|
@@ -529,40 +531,29 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
529
531
|
}
|
|
530
532
|
|
|
531
533
|
// 3. host can see stt options and attendee can view only when stt is enabled by a host in the channel
|
|
532
|
-
|
|
533
|
-
const canAccessTranscripts = useControlPermissionMatrix('transcriptsControl');
|
|
534
|
-
if (canAccessCaption) {
|
|
534
|
+
if ($config.ENABLE_STT && $config.ENABLE_CAPTION) {
|
|
535
535
|
actionMenuitems.push({
|
|
536
536
|
componentName: 'caption',
|
|
537
537
|
order: 3,
|
|
538
538
|
icon: `${isCaptionON ? 'captions-off' : 'captions'}`,
|
|
539
539
|
iconColor: $config.SECONDARY_ACTION_COLOR,
|
|
540
540
|
textColor: $config.FONT_COLOR,
|
|
541
|
-
disabled: !(
|
|
542
|
-
$config.ENABLE_STT &&
|
|
543
|
-
$config.ENABLE_CAPTION &&
|
|
544
|
-
(isHost || (!isHost && isSTTActive))
|
|
545
|
-
),
|
|
541
|
+
disabled: !($config.ENABLE_STT && $config.ENABLE_CAPTION),
|
|
546
542
|
title: captionLabel(isCaptionON),
|
|
547
543
|
onPress: () => {
|
|
548
544
|
setActionMenuVisible(false);
|
|
549
545
|
STT_clicked.current = !isCaptionON ? 'caption' : null;
|
|
550
|
-
if (isSTTError) {
|
|
551
|
-
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
if (isSTTActive) {
|
|
555
|
-
setIsCaptionON(prev => !prev);
|
|
556
|
-
// is lang popup has been shown once for any user in meeting
|
|
557
|
-
} else {
|
|
558
|
-
isFirstTimePopupOpen.current = true;
|
|
546
|
+
if (isSTTError || !isSTTActive) {
|
|
547
|
+
// Show popup when error or STT not active
|
|
559
548
|
setLanguagePopup(true);
|
|
549
|
+
} else {
|
|
550
|
+
// STT is active and no error
|
|
551
|
+
setIsCaptionON(prev => !prev);
|
|
560
552
|
}
|
|
561
553
|
},
|
|
562
554
|
});
|
|
563
555
|
// 4. Meeting transcript
|
|
564
|
-
|
|
565
|
-
if (canAccessTranscripts) {
|
|
556
|
+
if ($config.ENABLE_MEETING_TRANSCRIPT) {
|
|
566
557
|
actionMenuitems.push({
|
|
567
558
|
componentName: 'transcript',
|
|
568
559
|
order: 4,
|
|
@@ -572,26 +563,19 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
572
563
|
disabled: !(
|
|
573
564
|
$config.ENABLE_STT &&
|
|
574
565
|
$config.ENABLE_CAPTION &&
|
|
575
|
-
$config.ENABLE_MEETING_TRANSCRIPT
|
|
576
|
-
(isHost || (!isHost && isSTTActive))
|
|
566
|
+
$config.ENABLE_MEETING_TRANSCRIPT
|
|
577
567
|
),
|
|
578
568
|
title: transcriptLabel(isTranscriptON),
|
|
579
569
|
onPress: () => {
|
|
580
570
|
setActionMenuVisible(false);
|
|
581
571
|
STT_clicked.current = !isTranscriptON ? 'transcript' : null;
|
|
582
|
-
if (isSTTError) {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
: setSidePanel(SidePanelType.None);
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
if (isSTTActive) {
|
|
572
|
+
if (isSTTError || !isSTTActive) {
|
|
573
|
+
setLanguagePopup(true);
|
|
574
|
+
} else {
|
|
589
575
|
!isTranscriptON
|
|
590
576
|
? setSidePanel(SidePanelType.Transcript)
|
|
591
577
|
: setSidePanel(SidePanelType.None);
|
|
592
|
-
|
|
593
|
-
isFirstTimePopupOpen.current = true;
|
|
594
|
-
setLanguagePopup(true);
|
|
578
|
+
// isFirstTimePopupOpen.current = true;
|
|
595
579
|
}
|
|
596
580
|
},
|
|
597
581
|
});
|
|
@@ -599,8 +583,7 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
599
583
|
}
|
|
600
584
|
|
|
601
585
|
// 5. view recordings
|
|
602
|
-
|
|
603
|
-
if (canAccessViewRecording && isWeb()) {
|
|
586
|
+
if (isHost && $config.CLOUD_RECORDING && isWeb()) {
|
|
604
587
|
actionMenuitems.push({
|
|
605
588
|
componentName: 'view-recordings',
|
|
606
589
|
order: 5,
|
|
@@ -686,12 +669,6 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
686
669
|
}
|
|
687
670
|
|
|
688
671
|
// 8. Screenshare
|
|
689
|
-
const {permissions} = useBreakoutRoom();
|
|
690
|
-
const canAccessBreakoutRoom = useControlPermissionMatrix(
|
|
691
|
-
'breakoutRoomControl',
|
|
692
|
-
);
|
|
693
|
-
const canScreenshareInBreakoutRoom = permissions?.canScreenshare;
|
|
694
|
-
|
|
695
672
|
const canAccessScreenshare = useControlPermissionMatrix('screenshareControl');
|
|
696
673
|
if (canAccessScreenshare) {
|
|
697
674
|
if (
|
|
@@ -708,16 +685,13 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
708
685
|
componentName: 'screenshare',
|
|
709
686
|
order: 8,
|
|
710
687
|
disabled:
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
!canScreenshareInBreakoutRoom,
|
|
688
|
+
rtcProps.role == ClientRoleType.ClientRoleAudience &&
|
|
689
|
+
$config.EVENT_MODE &&
|
|
690
|
+
$config.RAISE_HAND &&
|
|
691
|
+
!isHost,
|
|
716
692
|
icon: isScreenshareActive ? 'stop-screen-share' : 'screen-share',
|
|
717
693
|
iconColor: isScreenshareActive
|
|
718
694
|
? $config.SEMANTIC_ERROR
|
|
719
|
-
: !canScreenshareInBreakoutRoom
|
|
720
|
-
? $config.SEMANTIC_NEUTRAL
|
|
721
695
|
: $config.SECONDARY_ACTION_COLOR,
|
|
722
696
|
textColor: isScreenshareActive
|
|
723
697
|
? $config.SEMANTIC_ERROR
|
|
@@ -732,8 +706,7 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
732
706
|
}
|
|
733
707
|
|
|
734
708
|
// 9. Recording
|
|
735
|
-
|
|
736
|
-
if (canAccessRecording) {
|
|
709
|
+
if (isHost && $config.CLOUD_RECORDING) {
|
|
737
710
|
actionMenuitems.push({
|
|
738
711
|
hide: w => {
|
|
739
712
|
return w >= BREAKPOINTS.sm ? true : false;
|
|
@@ -836,9 +809,9 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
836
809
|
}
|
|
837
810
|
|
|
838
811
|
// 13. Text-tracks to download
|
|
839
|
-
const canAccessAllTextTracks =
|
|
840
|
-
'
|
|
841
|
-
|
|
812
|
+
const canAccessAllTextTracks =
|
|
813
|
+
useControlPermissionMatrix('viewAllTextTracks');
|
|
814
|
+
|
|
842
815
|
if (canAccessAllTextTracks) {
|
|
843
816
|
actionMenuitems.push({
|
|
844
817
|
componentName: 'view-all-text-tracks',
|
|
@@ -853,22 +826,6 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
853
826
|
});
|
|
854
827
|
}
|
|
855
828
|
|
|
856
|
-
// 14. Breakout Room
|
|
857
|
-
if (canAccessBreakoutRoom) {
|
|
858
|
-
actionMenuitems.push({
|
|
859
|
-
componentName: 'breakoutRoom',
|
|
860
|
-
order: 14,
|
|
861
|
-
icon: 'breakout-room',
|
|
862
|
-
iconColor: $config.SECONDARY_ACTION_COLOR,
|
|
863
|
-
textColor: $config.FONT_COLOR,
|
|
864
|
-
title: isHost ? breakoutRoomLabel : 'View Breakout Rooms',
|
|
865
|
-
onPress: () => {
|
|
866
|
-
setActionMenuVisible(false);
|
|
867
|
-
setSidePanel(SidePanelType.BreakoutRoom);
|
|
868
|
-
},
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
|
|
872
829
|
useEffect(() => {
|
|
873
830
|
if (isHovered) {
|
|
874
831
|
setActionMenuVisible(true);
|
|
@@ -880,39 +837,51 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
880
837
|
setActionMenuVisible(false);
|
|
881
838
|
}, [currentLayout]);
|
|
882
839
|
|
|
883
|
-
const onConfirm = async (
|
|
840
|
+
const onConfirm = async (inputTranslateConfig: LanguageTranslationConfig) => {
|
|
841
|
+
console.log(
|
|
842
|
+
'[STT_PER_USER_BOT] Controls onConfirm called',
|
|
843
|
+
inputTranslateConfig,
|
|
844
|
+
);
|
|
884
845
|
const isCaptionClicked = STT_clicked.current === 'caption';
|
|
885
846
|
const isTranscriptClicked = STT_clicked.current === 'transcript';
|
|
886
847
|
setLanguagePopup(false);
|
|
887
|
-
isFirstTimePopupOpen.current = false;
|
|
888
|
-
const method = isCaptionClicked
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
if (isTranscriptClicked) {
|
|
894
|
-
if (!isTranscriptON) {
|
|
895
|
-
setSidePanel(SidePanelType.Transcript);
|
|
896
|
-
} else {
|
|
897
|
-
setSidePanel(SidePanelType.None);
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
if (method === 'stop') return; // not closing the stt service as it will stop for whole channel
|
|
901
|
-
if (method === 'start' && isSTTActive === true) return; // not triggering the start service if STT Service already started by anyone else in the channel
|
|
848
|
+
// isFirstTimePopupOpen.current = false;
|
|
849
|
+
// const method = isCaptionClicked
|
|
850
|
+
// ? isCaptionON
|
|
851
|
+
// : isTranscriptON
|
|
852
|
+
// ? 'stop'
|
|
853
|
+
// : 'start';
|
|
902
854
|
|
|
903
|
-
if (
|
|
904
|
-
|
|
905
|
-
} else {
|
|
906
|
-
}
|
|
855
|
+
// if (method === 'stop') return; // not closing the stt service as it will stop for whole channel
|
|
856
|
+
// if (method === 'start' && isSTTActive === true) return; // not triggering the start service if STT Service already started by anyone else in the channel
|
|
907
857
|
|
|
908
858
|
try {
|
|
909
|
-
const res = await start(language);
|
|
910
|
-
if (res?.message.includes('STARTED')) {
|
|
911
|
-
|
|
912
|
-
|
|
859
|
+
// const res = await start(language, language);
|
|
860
|
+
// if (res?.message.includes('STARTED')) {
|
|
861
|
+
// // channel is already started now restart
|
|
862
|
+
// await restart(language, language);
|
|
863
|
+
// }
|
|
864
|
+
if (isTranscriptClicked) {
|
|
865
|
+
if (!isTranscriptON) {
|
|
866
|
+
setSidePanel(SidePanelType.Transcript);
|
|
867
|
+
} else {
|
|
868
|
+
setSidePanel(SidePanelType.None);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
if (isCaptionClicked) {
|
|
872
|
+
setIsCaptionON(prev => !prev);
|
|
873
|
+
} else {
|
|
913
874
|
}
|
|
875
|
+
await handleTranslateConfigChange(inputTranslateConfig);
|
|
914
876
|
} catch (error) {
|
|
915
|
-
|
|
877
|
+
setIsCaptionON(false);
|
|
878
|
+
setSidePanel(SidePanelType.None);
|
|
879
|
+
logger.error(
|
|
880
|
+
LogSource.Internals,
|
|
881
|
+
'STT',
|
|
882
|
+
'error in starting caption',
|
|
883
|
+
error,
|
|
884
|
+
);
|
|
916
885
|
}
|
|
917
886
|
};
|
|
918
887
|
|
|
@@ -987,12 +956,14 @@ const MoreButton = (props: {fields: ToolbarMoreButtonDefaultFields}) => {
|
|
|
987
956
|
|
|
988
957
|
return (
|
|
989
958
|
<>
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
959
|
+
{isLanguagePopupOpen && (
|
|
960
|
+
<LanguageSelectorPopup
|
|
961
|
+
modalVisible={isLanguagePopupOpen}
|
|
962
|
+
setModalVisible={setLanguagePopup}
|
|
963
|
+
onConfirm={onConfirm}
|
|
964
|
+
// isFirstTimePopupOpen={isFirstTimePopupOpen.current}
|
|
965
|
+
/>
|
|
966
|
+
)}
|
|
996
967
|
{$config.CLOUD_RECORDING && isHost && isWeb() && (
|
|
997
968
|
<>
|
|
998
969
|
<RecordingDeletePopup
|
|
@@ -1168,18 +1139,16 @@ export const MoreButtonToolbarItem = (props?: {
|
|
|
1168
1139
|
forceUpdate();
|
|
1169
1140
|
}, [isHost]);
|
|
1170
1141
|
|
|
1171
|
-
const canAccessRecording = useControlPermissionMatrix('recordingControl');
|
|
1172
|
-
const canAccessWhiteboard = useControlPermissionMatrix('whiteboardControl');
|
|
1173
|
-
const canAccessCaptions = useControlPermissionMatrix('captionsControl');
|
|
1174
1142
|
return width < BREAKPOINTS.lg ||
|
|
1175
|
-
(
|
|
1143
|
+
($config.ENABLE_STT && $config.ENABLE_CAPTION) ||
|
|
1176
1144
|
$config.ENABLE_NOISE_CANCELLATION ||
|
|
1177
|
-
(
|
|
1145
|
+
(isHost && $config.CLOUD_RECORDING && isWeb()) ||
|
|
1178
1146
|
($config.ENABLE_VIRTUAL_BACKGROUND && !$config.AUDIO_ROOM) ||
|
|
1179
|
-
|
|
1147
|
+
(isHost && $config.ENABLE_WHITEBOARD && isWebInternal()) ? (
|
|
1180
1148
|
<ToolbarItem testID="more-btn" toolbarProps={props}>
|
|
1181
1149
|
{((!$config.AUTO_CONNECT_RTM && !isHost) || $config.AUTO_CONNECT_RTM) &&
|
|
1182
|
-
|
|
1150
|
+
$config.ENABLE_WHITEBOARD &&
|
|
1151
|
+
isWebInternal() ? (
|
|
1183
1152
|
<WhiteboardListener />
|
|
1184
1153
|
) : (
|
|
1185
1154
|
<></>
|
|
@@ -1214,7 +1183,7 @@ const Controls = (props: ControlsProps) => {
|
|
|
1214
1183
|
const {items = {}, includeDefaultItems = true} = props;
|
|
1215
1184
|
const {width, height} = useWindowDimensions();
|
|
1216
1185
|
const {defaultContent} = useContent();
|
|
1217
|
-
const {
|
|
1186
|
+
const {setMeetingTranscript} = useCaption();
|
|
1218
1187
|
const defaultContentRef = React.useRef(defaultContent);
|
|
1219
1188
|
const {setRoomInfo} = useSetRoomInfo();
|
|
1220
1189
|
const heading = useString<'Set' | 'Changed'>(sttSpokenLanguageToastHeading);
|
|
@@ -1225,87 +1194,87 @@ const Controls = (props: ControlsProps) => {
|
|
|
1225
1194
|
username: string;
|
|
1226
1195
|
}>(sttSpokenLanguageToastSubHeading);
|
|
1227
1196
|
|
|
1228
|
-
const {sttLanguage
|
|
1229
|
-
const {addStreamMessageListener} = useSpeechToText();
|
|
1230
|
-
const {permissions} = useBreakoutRoom();
|
|
1197
|
+
// const {sttLanguage} = useRoomInfo();
|
|
1198
|
+
// const {addStreamMessageListener} = useSpeechToText();
|
|
1231
1199
|
|
|
1232
1200
|
React.useEffect(() => {
|
|
1233
1201
|
defaultContentRef.current = defaultContent;
|
|
1234
1202
|
}, [defaultContent]);
|
|
1235
1203
|
|
|
1236
|
-
React.useEffect(() => {
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
}, [sttLanguage]);
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1204
|
+
// React.useEffect(() => {
|
|
1205
|
+
// // for mobile events are set in ActionSheetContent
|
|
1206
|
+
// if (!sttLanguage) return;
|
|
1207
|
+
// const {
|
|
1208
|
+
// username,
|
|
1209
|
+
// prevLang,
|
|
1210
|
+
// newLang,
|
|
1211
|
+
// uid,
|
|
1212
|
+
// langChanged,
|
|
1213
|
+
// }: RoomInfoContextInterface['sttLanguage'] = sttLanguage;
|
|
1214
|
+
// if (!langChanged) return;
|
|
1215
|
+
// const actionText =
|
|
1216
|
+
// prevLang.indexOf('') !== -1
|
|
1217
|
+
// ? `has set the spoken language to "${getLanguageLabel(newLang)}" `
|
|
1218
|
+
// : `changed the spoken language from "${getLanguageLabel(
|
|
1219
|
+
// prevLang,
|
|
1220
|
+
// )}" to "${getLanguageLabel(newLang)}" `;
|
|
1221
|
+
// // const msg = `${
|
|
1222
|
+
// // //@ts-ignore
|
|
1223
|
+
// // defaultContentRef.current[uid]?.name || username
|
|
1224
|
+
// // } ${actionText} `;
|
|
1225
|
+
// let subheadingObj: any = {};
|
|
1226
|
+
// if (prevLang.indexOf('') !== -1) {
|
|
1227
|
+
// subheadingObj = {
|
|
1228
|
+
// username: defaultContentRef.current[uid]?.name || username,
|
|
1229
|
+
// action: prevLang.indexOf('') !== -1 ? 'Set' : 'Changed',
|
|
1230
|
+
// newLanguage: getLanguageLabel(newLang),
|
|
1231
|
+
// };
|
|
1232
|
+
// } else {
|
|
1233
|
+
// subheadingObj = {
|
|
1234
|
+
// username: defaultContentRef.current[uid]?.name || username,
|
|
1235
|
+
// action: prevLang.indexOf('') !== -1 ? 'Set' : 'Changed',
|
|
1236
|
+
// newLanguage: getLanguageLabel(newLang),
|
|
1237
|
+
// oldLanguage: getLanguageLabel(prevLang),
|
|
1238
|
+
// };
|
|
1239
|
+
// }
|
|
1240
|
+
|
|
1241
|
+
// // Toast.show({
|
|
1242
|
+
// // leadingIconName: 'lang-select',
|
|
1243
|
+
// // type: 'info',
|
|
1244
|
+
// // text1: heading(prevLang.indexOf('') !== -1 ? 'Set' : 'Changed'),
|
|
1245
|
+
// // visibilityTime: 3000,
|
|
1246
|
+
// // primaryBtn: null,
|
|
1247
|
+
// // secondaryBtn: null,
|
|
1248
|
+
// // text2: subheading(subheadingObj),
|
|
1249
|
+
// // });
|
|
1250
|
+
// setRoomInfo(prev => {
|
|
1251
|
+
// return {
|
|
1252
|
+
// ...prev,
|
|
1253
|
+
// sttLanguage: {...sttLanguage, langChanged: false},
|
|
1254
|
+
// };
|
|
1255
|
+
// });
|
|
1256
|
+
// // syncing local set language
|
|
1257
|
+
// // newLang && setLanguage(newLang);
|
|
1258
|
+
// // add spoken lang msg to transcript
|
|
1259
|
+
// setMeetingTranscript(prev => {
|
|
1260
|
+
// return [
|
|
1261
|
+
// ...prev,
|
|
1262
|
+
// {
|
|
1263
|
+
// name: 'langUpdate',
|
|
1264
|
+
// time: new Date().getTime(),
|
|
1265
|
+
// uid: `langUpdate-${uid}`,
|
|
1266
|
+
// text: actionText,
|
|
1267
|
+
// },
|
|
1268
|
+
// ];
|
|
1269
|
+
// });
|
|
1270
|
+
// // start listening to stream Message callback
|
|
1271
|
+
// addStreamMessageListener();
|
|
1272
|
+
// }, [sttLanguage]);
|
|
1273
|
+
|
|
1274
|
+
// Ask bhupendra
|
|
1275
|
+
// React.useEffect(() => {
|
|
1276
|
+
// setIsSTTActive(isSTTActive);
|
|
1277
|
+
// }, [isSTTActive]);
|
|
1309
1278
|
|
|
1310
1279
|
const isHidden = (hide: ToolbarItemHide = false) => {
|
|
1311
1280
|
try {
|
|
@@ -1322,9 +1291,6 @@ const Controls = (props: ControlsProps) => {
|
|
|
1322
1291
|
|
|
1323
1292
|
const canAccessInvite = useControlPermissionMatrix('inviteControl');
|
|
1324
1293
|
const canAccessScreenshare = useControlPermissionMatrix('screenshareControl');
|
|
1325
|
-
const canAccessRecordings = useControlPermissionMatrix('recordingControl');
|
|
1326
|
-
|
|
1327
|
-
const canAccessExitBreakoutRoomBtn = permissions?.canExitRoom;
|
|
1328
1294
|
|
|
1329
1295
|
const defaultItems: ToolbarPresetProps['items'] = React.useMemo(() => {
|
|
1330
1296
|
return {
|
|
@@ -1374,7 +1340,7 @@ const Controls = (props: ControlsProps) => {
|
|
|
1374
1340
|
},
|
|
1375
1341
|
recording: {
|
|
1376
1342
|
align: 'center',
|
|
1377
|
-
component:
|
|
1343
|
+
component: RecordingToolbarItem,
|
|
1378
1344
|
order: 5,
|
|
1379
1345
|
hide: w => {
|
|
1380
1346
|
return w < BREAKPOINTS.sm ? true : false;
|
|
@@ -1385,20 +1351,13 @@ const Controls = (props: ControlsProps) => {
|
|
|
1385
1351
|
component: MoreButtonToolbarItem,
|
|
1386
1352
|
order: 6,
|
|
1387
1353
|
},
|
|
1388
|
-
'exit-breakout-room': {
|
|
1389
|
-
align: 'center',
|
|
1390
|
-
component: canAccessExitBreakoutRoomBtn
|
|
1391
|
-
? ExitBreakoutRoomToolbarItem
|
|
1392
|
-
: null,
|
|
1393
|
-
order: 7,
|
|
1394
|
-
},
|
|
1395
1354
|
'end-call': {
|
|
1396
1355
|
align: 'center',
|
|
1397
1356
|
component: LocalEndcallToolbarItem,
|
|
1398
|
-
order:
|
|
1357
|
+
order: 7,
|
|
1399
1358
|
},
|
|
1400
1359
|
};
|
|
1401
|
-
}, [canAccessInvite, canAccessScreenshare
|
|
1360
|
+
}, [canAccessInvite, canAccessScreenshare]);
|
|
1402
1361
|
|
|
1403
1362
|
const mergedItems = CustomToolbarMerge(
|
|
1404
1363
|
includeDefaultItems ? defaultItems : {},
|
|
@@ -50,7 +50,7 @@ const log = (...args: any[]) => {
|
|
|
50
50
|
type WebRtcEngineInstance = InstanceType<typeof RtcEngine>;
|
|
51
51
|
|
|
52
52
|
interface Props {
|
|
53
|
-
userRole
|
|
53
|
+
userRole: ClientRoleType;
|
|
54
54
|
}
|
|
55
55
|
export type deviceInfo = MediaDeviceInfo;
|
|
56
56
|
export type deviceId = deviceInfo['deviceId'];
|