agora-appbuilder-core 4.1.10-beta.1 → 4.1.11-beta.2

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 (132) hide show
  1. package/package.json +2 -2
  2. package/template/agora-rn-uikit/src/Utils/isBotUser.ts +1 -1
  3. package/template/android/app/build.gradle +0 -7
  4. package/template/bridge/rtc/webNg/RtcEngine.ts +2 -2
  5. package/template/bridge/rtm/web/Types.ts +0 -183
  6. package/template/bridge/rtm/web/index.ts +488 -450
  7. package/template/customization-api/typeDefinition.ts +0 -1
  8. package/template/defaultConfig.js +3 -4
  9. package/template/global.d.ts +0 -1
  10. package/template/ios/Podfile +0 -41
  11. package/template/package.json +5 -5
  12. package/template/src/AppRoutes.tsx +3 -3
  13. package/template/src/ai-agent/components/ControlButtons.tsx +1 -1
  14. package/template/src/assets/font-styles.css +1 -33
  15. package/template/src/assets/fonts/icomoon.ttf +0 -0
  16. package/template/src/assets/selection.json +1 -1
  17. package/template/src/atoms/ActionMenu.tsx +93 -13
  18. package/template/src/atoms/CustomIcon.tsx +1 -8
  19. package/template/src/atoms/DropDownMulti.tsx +80 -29
  20. package/template/src/atoms/Dropdown.tsx +0 -5
  21. package/template/src/atoms/Input.tsx +2 -1
  22. package/template/src/atoms/TertiaryButton.tsx +1 -1
  23. package/template/src/atoms/UserAvatar.tsx +1 -1
  24. package/template/src/components/ChatContext.ts +3 -5
  25. package/template/src/components/Controls.tsx +167 -208
  26. package/template/src/components/DeviceConfigure.tsx +1 -1
  27. package/template/src/components/EventsConfigure.tsx +168 -118
  28. package/template/src/components/Navbar.tsx +11 -14
  29. package/template/src/components/RTMConfigure.tsx +819 -32
  30. package/template/src/components/beauty-effect/useBeautyEffects.tsx +13 -50
  31. package/template/src/components/chat/chatConfigure.tsx +1 -7
  32. package/template/src/components/chat-messages/useChatMessages.tsx +11 -43
  33. package/template/src/components/controls/useControlPermissionMatrix.tsx +4 -32
  34. package/template/src/components/participants/AllHostParticipants.tsx +2 -10
  35. package/template/src/components/participants/Participant.tsx +1 -7
  36. package/template/src/components/participants/UserActionMenuOptions.tsx +2 -12
  37. package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
  38. package/template/src/components/precall/joinCallBtn.tsx +7 -2
  39. package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +16 -15
  40. package/template/src/components/precall/joinWaitingRoomBtn.tsx +31 -17
  41. package/template/src/components/precall/textInput.tsx +45 -22
  42. package/template/src/components/precall/usePreCall.tsx +7 -0
  43. package/template/src/components/recordings/RecordingsDateTable.tsx +2 -3
  44. package/template/src/components/room-info/useRoomInfo.tsx +5 -0
  45. package/template/src/components/useUserPreference.tsx +12 -39
  46. package/template/src/components/virtual-background/useVB.tsx +0 -18
  47. package/template/src/components/whiteboard/WhiteboardConfigure.tsx +0 -27
  48. package/template/src/language/default-labels/videoCallScreenLabels.ts +27 -11
  49. package/template/src/logger/AppBuilderLogger.tsx +3 -11
  50. package/template/src/pages/VideoCall.tsx +518 -171
  51. package/template/src/pages/video-call/ActionSheetContent.tsx +77 -77
  52. package/template/src/pages/video-call/SidePanelHeader.tsx +81 -53
  53. package/template/src/pages/video-call/VideoCallScreen.tsx +0 -18
  54. package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +1 -0
  55. package/template/src/rtm/RTMEngine.ts +37 -262
  56. package/template/src/rtm/utils.ts +1 -68
  57. package/template/src/rtm-events/constants.ts +7 -40
  58. package/template/src/rtm-events-api/Events.ts +39 -158
  59. package/template/src/subComponents/ChatBubble.tsx +3 -3
  60. package/template/src/subComponents/ChatContainer.tsx +9 -19
  61. package/template/src/subComponents/LocalAudioMute.tsx +2 -2
  62. package/template/src/subComponents/LocalVideoMute.tsx +2 -2
  63. package/template/src/subComponents/SidePanelEnum.tsx +0 -1
  64. package/template/src/subComponents/caption/Caption.tsx +48 -7
  65. package/template/src/subComponents/caption/CaptionContainer.tsx +324 -51
  66. package/template/src/subComponents/caption/CaptionIcon.tsx +35 -34
  67. package/template/src/subComponents/caption/CaptionText.tsx +103 -2
  68. package/template/src/subComponents/caption/LanguageSelectorPopup.tsx +179 -69
  69. package/template/src/subComponents/caption/Transcript.tsx +46 -11
  70. package/template/src/subComponents/caption/TranscriptIcon.tsx +27 -35
  71. package/template/src/subComponents/caption/TranscriptText.tsx +78 -3
  72. package/template/src/subComponents/caption/proto/ptoto.js +38 -4
  73. package/template/src/subComponents/caption/proto/test.proto +34 -19
  74. package/template/src/subComponents/caption/useCaption.tsx +754 -11
  75. package/template/src/subComponents/caption/useSTTAPI.tsx +118 -205
  76. package/template/src/subComponents/caption/useStreamMessageUtils.native.ts +152 -33
  77. package/template/src/subComponents/caption/useStreamMessageUtils.ts +165 -34
  78. package/template/src/subComponents/caption/utils.ts +171 -3
  79. package/template/src/subComponents/chat/ChatSendButton.tsx +0 -1
  80. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +0 -16
  81. package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +1 -1
  82. package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +4 -7
  83. package/template/src/utils/SdkEvents.ts +3 -0
  84. package/template/src/utils/useEndCall.ts +4 -4
  85. package/template/src/utils/useMuteToggleLocal.ts +10 -14
  86. package/template/src/utils/useSpeechToText.ts +31 -20
  87. package/template/bridge/rtm/web/index-legacy.ts +0 -540
  88. package/template/src/components/RTMConfigure-legacy.tsx +0 -848
  89. package/template/src/components/UserGlobalPreferenceProvider.tsx +0 -227
  90. package/template/src/components/breakout-room/BreakoutRoomPanel.tsx +0 -58
  91. package/template/src/components/breakout-room/context/BreakoutRoomContext.tsx +0 -2508
  92. package/template/src/components/breakout-room/events/BreakoutRoomEventsConfigure.tsx +0 -272
  93. package/template/src/components/breakout-room/events/constants.ts +0 -17
  94. package/template/src/components/breakout-room/hoc/BreakoutRoomNameRenderer.tsx +0 -68
  95. package/template/src/components/breakout-room/hooks/useBreakoutRoomExit.ts +0 -49
  96. package/template/src/components/breakout-room/state/reducer.ts +0 -522
  97. package/template/src/components/breakout-room/state/types.ts +0 -54
  98. package/template/src/components/breakout-room/ui/BreakoutMeetingTitle.tsx +0 -60
  99. package/template/src/components/breakout-room/ui/BreakoutRoomActionMenu.tsx +0 -136
  100. package/template/src/components/breakout-room/ui/BreakoutRoomAnnouncementModal.tsx +0 -135
  101. package/template/src/components/breakout-room/ui/BreakoutRoomGroupSettings.tsx +0 -588
  102. package/template/src/components/breakout-room/ui/BreakoutRoomMainRoomUsers.tsx +0 -142
  103. package/template/src/components/breakout-room/ui/BreakoutRoomMemberActionMenu.tsx +0 -122
  104. package/template/src/components/breakout-room/ui/BreakoutRoomParticipants.tsx +0 -124
  105. package/template/src/components/breakout-room/ui/BreakoutRoomRaiseHand.tsx +0 -65
  106. package/template/src/components/breakout-room/ui/BreakoutRoomRenameModal.tsx +0 -227
  107. package/template/src/components/breakout-room/ui/BreakoutRoomSettings.tsx +0 -140
  108. package/template/src/components/breakout-room/ui/BreakoutRoomTransition.tsx +0 -52
  109. package/template/src/components/breakout-room/ui/BreakoutRoomView.tsx +0 -193
  110. package/template/src/components/breakout-room/ui/ExitBreakoutRoomIconButton.tsx +0 -79
  111. package/template/src/components/breakout-room/ui/ParticipantManualAssignmentModal.tsx +0 -638
  112. package/template/src/components/breakout-room/ui/SelectParticipantAssignmentStrategy.tsx +0 -57
  113. package/template/src/components/common/Dividers.tsx +0 -53
  114. package/template/src/components/controls/toolbar-items/ExitBreakoutRoomToolbarItem.tsx +0 -13
  115. package/template/src/components/raise-hand/RaiseHandButton.tsx +0 -50
  116. package/template/src/components/raise-hand/RaiseHandProvider.tsx +0 -308
  117. package/template/src/components/raise-hand/index.ts +0 -14
  118. package/template/src/components/room-info/useCurrentRoomInfo.tsx +0 -42
  119. package/template/src/components/room-info/useSetBreakoutRoomInfo.tsx +0 -64
  120. package/template/src/pages/video-call/BreakoutVideoCall.tsx +0 -213
  121. package/template/src/pages/video-call/VideoCallContent.tsx +0 -211
  122. package/template/src/pages/video-call/VideoCallStateWrapper.tsx +0 -495
  123. package/template/src/rtm/RTMConfigureBreakoutRoomProvider.tsx +0 -882
  124. package/template/src/rtm/RTMConfigureMainRoomProvider.tsx +0 -757
  125. package/template/src/rtm/RTMCoreProvider.tsx +0 -419
  126. package/template/src/rtm/RTMGlobalStateProvider.tsx +0 -706
  127. package/template/src/rtm/RTMStatusBanner.tsx +0 -99
  128. package/template/src/rtm/constants.ts +0 -12
  129. package/template/src/rtm/hooks/useMainRoomUserDisplayName.ts +0 -45
  130. package/template/src/rtm/rtm-presence-utils.ts +0 -344
  131. package/template/src/subComponents/chat/ChatAnnouncementView.tsx +0 -65
  132. package/template/src/utils/useDebouncedCallback.tsx +0 -20
@@ -1,227 +0,0 @@
1
- /*
2
- ********************************************
3
- Copyright © 2021 Agora Lab, Inc., all rights reserved.
4
- AppBuilder and all associated components, source code, APIs, services, and documentation
5
- (the "Materials") are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
- accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
- Use without a license or in violation of any license terms and conditions (including use for
8
- any purpose competitive to Agora Lab, Inc.'s business) is strictly prohibited. For more
9
- information visit https://appbuilder.agora.io.
10
- *********************************************
11
- */
12
-
13
- import React, {
14
- createContext,
15
- useContext,
16
- useCallback,
17
- useRef,
18
- useState,
19
- } from 'react';
20
- import {
21
- ToggleState,
22
- PermissionState,
23
- DefaultContentInterface,
24
- ContentInterface,
25
- } from '../../agora-rn-uikit';
26
- import {MUTE_LOCAL_TYPE} from '../utils/useMuteToggleLocal';
27
-
28
- // RTM User Preferences interface - session-scoped preferences that survive room transitions
29
- export interface UserGlobalPreferences {
30
- audioMuted: boolean; // false = unmuted (0), true = muted (1)
31
- videoMuted: boolean; // false = unmuted (0), true = muted (1)
32
- virtualBackground?: {
33
- type: 'blur' | 'image' | 'none';
34
- imageUrl?: string;
35
- blurIntensity?: number;
36
- };
37
- }
38
-
39
- // Default user preferences
40
- export const DEFAULT_USER_PREFERENCES: UserGlobalPreferences = {
41
- audioMuted: false, // Default unmuted (0 = unmuted)
42
- videoMuted: false, // Default unmuted (0 = unmuted)
43
- virtualBackground: {
44
- type: 'none',
45
- },
46
- };
47
-
48
- interface UserGlobalPreferenceInterface {
49
- userGlobalPreferences: UserGlobalPreferences;
50
- syncUserPreferences: (prefs: Partial<UserGlobalPreferences>) => void;
51
- applyUserPreferences: (
52
- currentUserData: ContentInterface,
53
- toggleMuteFn: (type: number, action?: number) => Promise<void>,
54
- ) => Promise<void>;
55
- }
56
-
57
- const UserGlobalPreferenceContext =
58
- createContext<UserGlobalPreferenceInterface | null>(null);
59
-
60
- interface UserGlobalPreferenceProviderProps {
61
- children: React.ReactNode;
62
- }
63
-
64
- export const UserGlobalPreferenceProvider: React.FC<
65
- UserGlobalPreferenceProviderProps
66
- > = ({children}) => {
67
- // User preferences (survives room transitions)
68
- const [userGlobalPreferences, setUserGlobalPreferences] =
69
- useState<UserGlobalPreferences>(DEFAULT_USER_PREFERENCES);
70
- console.log('UP: userGlobalPreferences changed: ', userGlobalPreferences);
71
-
72
- const hasAppliedPreferences = useRef(false);
73
-
74
- const syncUserPreferences = useCallback(
75
- (prefs: Partial<UserGlobalPreferences>) => {
76
- console.log('UserGlobalPreference: Syncing preferences', prefs);
77
- setUserGlobalPreferences(prev => ({
78
- ...prev,
79
- ...prefs,
80
- }));
81
- },
82
- [setUserGlobalPreferences],
83
- );
84
-
85
- const applyUserPreferences = useCallback(
86
- async (
87
- currentUserData: DefaultContentInterface,
88
- toggleMuteFn: (
89
- type: MUTE_LOCAL_TYPE,
90
- action?: ToggleState,
91
- ) => Promise<void>,
92
- ) => {
93
- console.log('UP: 1', userGlobalPreferences);
94
- // Only apply preferences once per component lifecycle
95
- if (hasAppliedPreferences.current) {
96
- console.log('UP: 2');
97
- console.log(
98
- 'UserGlobalPreference: Preferences already applied, skipping',
99
- );
100
- return;
101
- }
102
- console.log('UP: 3');
103
- try {
104
- console.log(
105
- 'UserGlobalPreference: Applying preferences',
106
- userGlobalPreferences,
107
- );
108
- console.log('UP: 4');
109
-
110
- const currentAudioState = currentUserData.audio;
111
- const currentVideoState = currentUserData.video;
112
- const permissionStatus = currentUserData.permissionStatus;
113
- const audioForceDisabled = currentUserData.audioForceDisabled;
114
- const videoForceDisabled = currentUserData.videoForceDisabled;
115
-
116
- console.log('UP: 5', {
117
- currentAudioState,
118
- currentVideoState,
119
- permissionStatus,
120
- audioForceDisabled,
121
- videoForceDisabled,
122
- });
123
-
124
- // Check if audio permissions are available and not force disabled
125
- const hasAudioPermission =
126
- (permissionStatus === PermissionState.GRANTED_FOR_CAM_AND_MIC ||
127
- permissionStatus === PermissionState.GRANTED_FOR_MIC_ONLY) &&
128
- !audioForceDisabled;
129
-
130
- // Check if video permissions are available and not force disabled
131
- const hasVideoPermission =
132
- (permissionStatus === PermissionState.GRANTED_FOR_CAM_AND_MIC ||
133
- permissionStatus === PermissionState.GRANTED_FOR_CAM_ONLY) &&
134
- !videoForceDisabled;
135
-
136
- // Apply audio mute preference only if user has audio permission and not force disabled
137
- if (hasAudioPermission) {
138
- const desiredAudioState = userGlobalPreferences.audioMuted
139
- ? ToggleState.disabled
140
- : ToggleState.enabled;
141
- console.log('UP: 6', desiredAudioState);
142
-
143
- if (currentAudioState !== desiredAudioState) {
144
- console.log('UP: 7 changed', currentAudioState, desiredAudioState);
145
-
146
- console.log(
147
- `UP: UserGlobalPreference: Applying audio state: ${
148
- desiredAudioState === ToggleState.disabled ? 'muted' : 'unmuted'
149
- }`,
150
- desiredAudioState,
151
- );
152
- await toggleMuteFn(MUTE_LOCAL_TYPE.audio, desiredAudioState);
153
- }
154
- } else {
155
- console.log(
156
- 'UP: Skipping audio preference - no audio permission or force disabled',
157
- );
158
- }
159
-
160
- // Apply video mute preference only if user has video permission and not force disabled
161
- if (hasVideoPermission) {
162
- const desiredVideoState = userGlobalPreferences.videoMuted
163
- ? ToggleState.disabled
164
- : ToggleState.enabled;
165
- console.log('UP: 8', currentVideoState, desiredVideoState);
166
-
167
- if (currentVideoState !== desiredVideoState) {
168
- console.log('UP: 9 changed');
169
-
170
- console.log(
171
- `UserGlobalPreference: Applying video state: ${
172
- desiredVideoState === ToggleState.disabled ? 'muted' : 'unmuted'
173
- }`,
174
- );
175
- await toggleMuteFn(MUTE_LOCAL_TYPE.video, desiredVideoState);
176
- }
177
- } else {
178
- console.log(
179
- 'UP: Skipping video preference - no video permission or force disabled',
180
- );
181
- }
182
-
183
- // Virtual background preferences will be handled by useVB hook
184
- // since it reads from userGlobalPreferences state on component mount
185
-
186
- hasAppliedPreferences.current = true;
187
- console.log('UserGlobalPreference: Preferences applied successfully');
188
- } catch (error) {
189
- console.warn(
190
- 'UserGlobalPreference: Failed to apply preferences:',
191
- error,
192
- );
193
- }
194
- },
195
- [userGlobalPreferences],
196
- );
197
-
198
- // Reset the application flag when preferences change
199
- // This allows re-application if preferences are updated
200
- React.useEffect(() => {
201
- hasAppliedPreferences.current = false;
202
- }, [userGlobalPreferences]);
203
-
204
- const contextValue: UserGlobalPreferenceInterface = {
205
- userGlobalPreferences,
206
- syncUserPreferences,
207
- applyUserPreferences,
208
- };
209
-
210
- return (
211
- <UserGlobalPreferenceContext.Provider value={contextValue}>
212
- {children}
213
- </UserGlobalPreferenceContext.Provider>
214
- );
215
- };
216
-
217
- export const useUserGlobalPreferences = (): UserGlobalPreferenceInterface => {
218
- const context = useContext(UserGlobalPreferenceContext);
219
- if (!context) {
220
- throw new Error(
221
- 'useUserGlobalPreferences must be used within UserGlobalPreferenceProvider',
222
- );
223
- }
224
- return context;
225
- };
226
-
227
- export default UserGlobalPreferenceProvider;
@@ -1,58 +0,0 @@
1
- /*
2
- ********************************************
3
- Copyright © 2021 Agora Lab, Inc., all rights reserved.
4
- AppBuilder and all associated components, source code, APIs, services, and documentation
5
- (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
- accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
- Use without a license or in violation of any license terms and conditions (including use for
8
- any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9
- information visit https://appbuilder.agora.io.
10
- *********************************************
11
- */
12
- import React from 'react';
13
- import {View} from 'react-native';
14
- import {isMobileUA, isWebInternal, useIsSmall} from '../../utils/common';
15
- import CommonStyles from '../CommonStyles';
16
- import {getGridLayoutName} from '../../pages/video-call/DefaultLayouts';
17
- import useCaptionWidth from '../../subComponents/caption/useCaptionWidth';
18
-
19
- import {useLayout} from '../../utils/useLayout';
20
- import {useSidePanel} from '../../utils/useSidePanel';
21
- import {SidePanelType} from '../../subComponents/SidePanelEnum';
22
-
23
- import BreakoutRoomView from './ui/BreakoutRoomView';
24
-
25
- const BreakoutRoomPanel = () => {
26
- const {setSidePanel} = useSidePanel();
27
- const isSmall = useIsSmall();
28
- const {currentLayout} = useLayout();
29
- const {transcriptHeight} = useCaptionWidth();
30
-
31
- return (
32
- <View
33
- testID="videocall-breakout-room"
34
- style={[
35
- isMobileUA()
36
- ? //mobile and mobile web
37
- CommonStyles.sidePanelContainerNative
38
- : isSmall()
39
- ? // desktop minimized
40
- CommonStyles.sidePanelContainerWebMinimzed
41
- : // desktop maximized
42
- CommonStyles.sidePanelContainerWeb,
43
- isWebInternal() && !isSmall() && currentLayout === getGridLayoutName()
44
- ? {marginTop: 4}
45
- : {},
46
- //@ts-ignore
47
- transcriptHeight && !isMobileUA() && {height: transcriptHeight},
48
- ]}>
49
- <BreakoutRoomView
50
- closeSidePanel={() => {
51
- setSidePanel(SidePanelType.None);
52
- }}
53
- />
54
- </View>
55
- );
56
- };
57
-
58
- export default BreakoutRoomPanel;