agora-appbuilder-core 4.1.0-beta-12 → 4.1.0-beta-16
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 +1 -1
- package/template/customization-api/app-state.ts +3 -0
- package/template/defaultConfig.js +2 -2
- package/template/src/ai-agent/components/AgentControls/AgentContext.tsx +16 -7
- package/template/src/ai-agent/components/AgentControls/message.ts +0 -4
- package/template/src/ai-agent/components/CustomSettingsPanel.tsx +2 -2
- package/template/src/ai-agent/components/SelectAiAgent.tsx +14 -2
- package/template/src/ai-agent/components/mobile/MobileLayoutComponent.tsx +1 -0
- package/template/src/ai-agent/index.tsx +1 -0
- package/template/src/ai-agent/layout/ConversationalAI.tsx +3 -3
- package/template/src/auth/AuthProvider.tsx +1 -6
- package/template/src/components/SettingsView.tsx +1 -2
- package/template/src/components/popups/InvitePopup.tsx +1 -10
- package/template/src/components/precall/joinCallBtn.native.tsx +0 -2
- package/template/src/components/precall/joinCallBtn.tsx +0 -3
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +0 -3
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +0 -3
- package/template/src/components/useUserPreference.tsx +1 -89
- package/template/src/pages/Create.tsx +1 -10
- package/template/src/pages/Join.tsx +1 -10
- package/template/src/pages/VideoCall.tsx +28 -32
- package/template/src/pages/video-call/VideoRenderer.tsx +7 -7
- package/template/src/subComponents/recording/useRecording.tsx +1 -8
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +2 -16
- package/template/src/utils/useCreateRoom.ts +1 -8
- package/template/src/utils/useGetMeetingPhrase.ts +1 -8
- package/template/src/utils/useJoinRoom.ts +1 -8
- package/template/src/utils/useMutePSTN.ts +1 -8
package/package.json
CHANGED
|
@@ -67,3 +67,6 @@ export {useBeautyEffects} from '../src/app-state/useBeautyEffects';
|
|
|
67
67
|
export {useLiveStreamDataContext} from '../src/components/contexts/LiveStreamDataContext';
|
|
68
68
|
export {useRtm} from '../src/components/ChatContext';
|
|
69
69
|
export {useGetHostIds} from '../src/utils/useGetHostUids';
|
|
70
|
+
export {useAIAgent} from '../src/ai-agent/components/AgentControls/AgentContext';
|
|
71
|
+
export type {AIAgentContextInterface} from '../src/ai-agent/components/AgentControls/AgentContext';
|
|
72
|
+
export type {AIAgentState} from '../src/ai-agent/components/AgentControls/const';
|
|
@@ -76,8 +76,8 @@ const DefaultConfig = {
|
|
|
76
76
|
CHAT_ORG_NAME: '',
|
|
77
77
|
CHAT_APP_NAME: '',
|
|
78
78
|
CHAT_URL: '',
|
|
79
|
-
CLI_VERSION: '3.1.0-beta-
|
|
80
|
-
CORE_VERSION: '4.1.0-beta-
|
|
79
|
+
CLI_VERSION: '3.1.0-beta-16',
|
|
80
|
+
CORE_VERSION: '4.1.0-beta-16',
|
|
81
81
|
DISABLE_LANDSCAPE_MODE: false,
|
|
82
82
|
STT_AUTO_START: false,
|
|
83
83
|
CLOUD_RECORDING_AUTO_START: false,
|
|
@@ -30,7 +30,7 @@ export interface ChatItem {
|
|
|
30
30
|
isSelf: boolean;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export interface
|
|
33
|
+
export interface AIAgentContextInterface {
|
|
34
34
|
toggleAgentConnection: (forceStop?: boolean) => Promise<boolean>;
|
|
35
35
|
agentConnectionState: AIAgentState;
|
|
36
36
|
setAgentConnectionState: (agentState: AIAgentState) => void;
|
|
@@ -55,7 +55,7 @@ export interface AgentContextInterface {
|
|
|
55
55
|
clearChatHistory: () => void;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export const AgentContext = createContext<
|
|
58
|
+
export const AgentContext = createContext<AIAgentContextInterface>({
|
|
59
59
|
toggleAgentConnection: () => {
|
|
60
60
|
return Promise.resolve(false);
|
|
61
61
|
},
|
|
@@ -93,7 +93,7 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
|
|
|
93
93
|
const [chatHistory, setChatHistory] = useState<IMessageListItem[]>([]);
|
|
94
94
|
const [agentId, setAgentId] = useState('');
|
|
95
95
|
const [agentVoice, setAgentVoice] =
|
|
96
|
-
useState<
|
|
96
|
+
useState<AIAgentContextInterface['agentVoice']>('');
|
|
97
97
|
const [prompt, setPrompt] = useState('');
|
|
98
98
|
const {activeUids: users} = useContent();
|
|
99
99
|
const [isStartAPICalled, setStartAPICalled] = useState(false);
|
|
@@ -101,7 +101,7 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
|
|
|
101
101
|
const [isInterruptionHandlingEnabled, setIsInterruptionHandlingEnabled] =
|
|
102
102
|
useState(false);
|
|
103
103
|
const [language, setLanguage] =
|
|
104
|
-
useState<
|
|
104
|
+
useState<AIAgentContextInterface['language']>('');
|
|
105
105
|
|
|
106
106
|
const {
|
|
107
107
|
data: {channel: channel_name, uid: localUid, agents},
|
|
@@ -113,7 +113,7 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
|
|
|
113
113
|
const messageCache = {};
|
|
114
114
|
const TIMEOUT_MS = 5000; // Timeout for incomplete messages
|
|
115
115
|
|
|
116
|
-
//set agent
|
|
116
|
+
//set agent uid when user refresh the page - to maintain the app state
|
|
117
117
|
useEffect(() => {
|
|
118
118
|
//@ts-ignore
|
|
119
119
|
if (store?.agentUID && store?.agentUID !== agentUID) {
|
|
@@ -122,6 +122,15 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
|
|
|
122
122
|
}
|
|
123
123
|
}, [store, agentUID]);
|
|
124
124
|
|
|
125
|
+
//set agent id when user refresh the page - to maintain the app state
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
//@ts-ignore
|
|
128
|
+
if (store?.agentId && store?.agentId !== agentId) {
|
|
129
|
+
//@ts-ignore
|
|
130
|
+
setAgentId(store.agentId);
|
|
131
|
+
}
|
|
132
|
+
}, [store, agentId]);
|
|
133
|
+
|
|
125
134
|
React.useEffect(() => {
|
|
126
135
|
if (!isSubscribedForStreams) {
|
|
127
136
|
RtcEngineUnsafe.addListener('onStreamMessage', (...args: any[]) => {
|
|
@@ -203,7 +212,7 @@ export const AgentProvider: React.FC<{children: React.ReactNode}> = ({
|
|
|
203
212
|
closeMessageEngine(); // release message engine
|
|
204
213
|
setAgentConnectionState(AgentState.NOT_CONNECTED);
|
|
205
214
|
if (isStopAPICalled) {
|
|
206
|
-
|
|
215
|
+
setStopAPICalled(false);
|
|
207
216
|
}
|
|
208
217
|
}
|
|
209
218
|
}, [
|
|
@@ -452,4 +461,4 @@ export const connectToAIAgent = async (
|
|
|
452
461
|
}
|
|
453
462
|
};
|
|
454
463
|
|
|
455
|
-
export const
|
|
464
|
+
export const useAIAgent = createHook(AgentContext);
|
|
@@ -986,10 +986,7 @@ export let messageService: MessageEngine | null = null;
|
|
|
986
986
|
* @returns {MessageEngine} Singleton instance of MessageEngine
|
|
987
987
|
*/
|
|
988
988
|
export function initializeMessageEngine(): MessageEngine {
|
|
989
|
-
console.log('debguggingnew initializeMessageEngine getting here');
|
|
990
989
|
if (!messageService) {
|
|
991
|
-
console.log('debuggingnew getting here');
|
|
992
|
-
|
|
993
990
|
messageService = new MessageEngine(EMessageEngineMode.AUTO, chatHistory => {
|
|
994
991
|
LocalEventEmitter.emit(LocalEventsEnum.AGENT_TRANSCRIPT_CHANGE, {
|
|
995
992
|
data: {
|
|
@@ -999,7 +996,6 @@ export function initializeMessageEngine(): MessageEngine {
|
|
|
999
996
|
});
|
|
1000
997
|
});
|
|
1001
998
|
}
|
|
1002
|
-
console.log('debguggingnew messageService', messageService);
|
|
1003
999
|
return messageService;
|
|
1004
1000
|
}
|
|
1005
1001
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import SelectAiAgent from './SelectAiAgent';
|
|
13
13
|
import ThemeConfig from '../../theme';
|
|
14
14
|
import hexadecimalTransparency from '../../utils/hexadecimalTransparency';
|
|
15
|
-
import {AgentContext,
|
|
15
|
+
import {AgentContext, useAIAgent} from './AgentControls/AgentContext';
|
|
16
16
|
import UserPrompt from './UserPrompt';
|
|
17
17
|
import {useIsAgentAvailable} from './utils';
|
|
18
18
|
import Toggle from '../../atoms/Toggle';
|
|
@@ -116,7 +116,7 @@ const AdvancedSettings = () => {
|
|
|
116
116
|
setIsInterruptionHandlingEnabled,
|
|
117
117
|
agentId,
|
|
118
118
|
agentConnectionState,
|
|
119
|
-
} =
|
|
119
|
+
} = useAIAgent();
|
|
120
120
|
const {
|
|
121
121
|
data: {agents},
|
|
122
122
|
} = useRoomInfo();
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React, {useContext, useEffect, useMemo} from 'react';
|
|
2
2
|
import {View, Text, StyleSheet} from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Dropdown,
|
|
5
|
+
useRoomInfo,
|
|
6
|
+
Spacer,
|
|
7
|
+
useStorageContext,
|
|
8
|
+
} from 'customization-api';
|
|
4
9
|
import ThemeConfig from '../../theme';
|
|
5
10
|
import {AgentContext} from './AgentControls/AgentContext';
|
|
6
11
|
|
|
@@ -8,7 +13,7 @@ const SelectAiAgent = () => {
|
|
|
8
13
|
const {
|
|
9
14
|
data: {agents},
|
|
10
15
|
} = useRoomInfo();
|
|
11
|
-
|
|
16
|
+
const {setStore} = useStorageContext();
|
|
12
17
|
const {agentId, setAgentId, agentConnectionState} = useContext(AgentContext);
|
|
13
18
|
|
|
14
19
|
const data = useMemo(() => {
|
|
@@ -55,6 +60,13 @@ const SelectAiAgent = () => {
|
|
|
55
60
|
onSelect={async ({label, value}) => {
|
|
56
61
|
if (agentId !== value) {
|
|
57
62
|
setAgentId(value);
|
|
63
|
+
//setting agent uid in the store so we can retrive it if user refresh the page
|
|
64
|
+
setStore(prevState => {
|
|
65
|
+
return {
|
|
66
|
+
...prevState,
|
|
67
|
+
agentId: value,
|
|
68
|
+
};
|
|
69
|
+
});
|
|
58
70
|
}
|
|
59
71
|
}}
|
|
60
72
|
/>
|
|
@@ -100,6 +100,7 @@ const DesktopLayoutComponent: LayoutComponent = () => {
|
|
|
100
100
|
...defaultContent[agentUID],
|
|
101
101
|
name: 'AI Agent',
|
|
102
102
|
video: false,
|
|
103
|
+
type: 'ai-agent',
|
|
103
104
|
}}
|
|
104
105
|
CustomChild={() =>
|
|
105
106
|
// show agent voice waves, when agent is connected to the channel, but also not on a state-of-wait,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
SidePanelType,
|
|
18
18
|
} from 'customization-api';
|
|
19
19
|
import ThemeConfig from '../../theme';
|
|
20
|
-
import {
|
|
20
|
+
import {useAIAgent} from '../components/AgentControls/AgentContext';
|
|
21
21
|
import {AgentState} from '../components/AgentControls/const';
|
|
22
22
|
import {useIsAgentAvailable} from '../components/utils';
|
|
23
23
|
|
|
@@ -98,7 +98,7 @@ const SettingButton = () => {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
const DisconnectButton = () => {
|
|
101
|
-
const {toggleAgentConnection} =
|
|
101
|
+
const {toggleAgentConnection} = useAIAgent();
|
|
102
102
|
return (
|
|
103
103
|
<TouchableOpacity
|
|
104
104
|
style={{backgroundColor: $config.SEMANTIC_ERROR, borderRadius: 50}}
|
|
@@ -111,7 +111,7 @@ const DisconnectButton = () => {
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
export const ConversationalAI: LayoutComponent = () => {
|
|
114
|
-
const {agentConnectionState, toggleAgentConnection} =
|
|
114
|
+
const {agentConnectionState, toggleAgentConnection} = useAIAgent();
|
|
115
115
|
// const spline = useRef();
|
|
116
116
|
// const sphere = useRef();
|
|
117
117
|
|
|
@@ -365,12 +365,7 @@ const AuthProvider = (props: AuthProviderProps) => {
|
|
|
365
365
|
'user_details',
|
|
366
366
|
'API user details query failed. User is un-authenticated. Will Login in the user',
|
|
367
367
|
{
|
|
368
|
-
|
|
369
|
-
name: error?.networkError?.name,
|
|
370
|
-
code: error?.networkError?.result?.error?.code,
|
|
371
|
-
message: error?.networkError?.result?.error?.message,
|
|
372
|
-
},
|
|
373
|
-
error,
|
|
368
|
+
errorAsJSONString: JSON.stringify(error || {}),
|
|
374
369
|
startReqTs,
|
|
375
370
|
endRequestTs,
|
|
376
371
|
latency: endRequestTs - startReqTs,
|
|
@@ -64,7 +64,7 @@ export const EditName: React.FC<EditNameProps> = (props?: EditNameProps) => {
|
|
|
64
64
|
const {
|
|
65
65
|
data: {isHost},
|
|
66
66
|
} = useRoomInfo();
|
|
67
|
-
|
|
67
|
+
|
|
68
68
|
const {whiteboardActive} = useContext(whiteboardContext);
|
|
69
69
|
const [saved, setSaved] = useState(false);
|
|
70
70
|
const username = useGetName();
|
|
@@ -104,7 +104,6 @@ export const EditName: React.FC<EditNameProps> = (props?: EditNameProps) => {
|
|
|
104
104
|
}, 2000);
|
|
105
105
|
setEditable(false);
|
|
106
106
|
logger.log(LogSource.Internals, 'NAME', `Name changed ${newName}`);
|
|
107
|
-
saveName(trimmedText ? trimmedText : username);
|
|
108
107
|
} else {
|
|
109
108
|
setEditable(true);
|
|
110
109
|
inputRef.current.focus();
|
|
@@ -52,16 +52,7 @@ const InvitePopup = () => {
|
|
|
52
52
|
LogSource.Internals,
|
|
53
53
|
'GET_MEETING_PHRASE',
|
|
54
54
|
'unable to fetch meeting details',
|
|
55
|
-
error,
|
|
56
|
-
{
|
|
57
|
-
networkError: {
|
|
58
|
-
name: error?.networkError?.name,
|
|
59
|
-
//@ts-ignore
|
|
60
|
-
code: error?.networkError?.result?.error?.code,
|
|
61
|
-
//@ts-ignore
|
|
62
|
-
message: error?.networkError?.result?.error?.message,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
55
|
+
JSON.stringify(error || {}),
|
|
65
56
|
);
|
|
66
57
|
setGlobalErrorMessage(error);
|
|
67
58
|
});
|
|
@@ -38,7 +38,6 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
38
38
|
const {isJoinDataFetched} = useRoomInfo();
|
|
39
39
|
const joinRoomButton =
|
|
40
40
|
useString<PrecallJoinBtnTextInterface>(precallJoinBtnText);
|
|
41
|
-
const {saveName} = useUserPreference();
|
|
42
41
|
const [buttonText, setButtonText] = React.useState(
|
|
43
42
|
joinRoomButton({
|
|
44
43
|
waitingRoom: false,
|
|
@@ -59,7 +58,6 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
59
58
|
}, [rtcProps?.role]);
|
|
60
59
|
|
|
61
60
|
const onSubmit = () => {
|
|
62
|
-
saveName(username?.trim());
|
|
63
61
|
setCallActive(true);
|
|
64
62
|
};
|
|
65
63
|
|
|
@@ -47,7 +47,6 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
47
47
|
const setUsername = useSetName();
|
|
48
48
|
const {isJoinDataFetched} = useRoomInfo();
|
|
49
49
|
const {awake, request} = useWakeLock();
|
|
50
|
-
const {saveName} = useUserPreference();
|
|
51
50
|
const joinRoomButton =
|
|
52
51
|
useString<PrecallJoinBtnTextInterface>(precallJoinBtnText);
|
|
53
52
|
|
|
@@ -67,8 +66,6 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
67
66
|
);
|
|
68
67
|
setUsername(username.trim());
|
|
69
68
|
setCallActive(true);
|
|
70
|
-
//updating name in the backend
|
|
71
|
-
saveName(username.trim());
|
|
72
69
|
// Play a sound to avoid autoblocking in safari
|
|
73
70
|
if (isWebInternal() || isMobileOrTablet()) {
|
|
74
71
|
audio.volume = 0;
|
|
@@ -62,7 +62,6 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
62
62
|
|
|
63
63
|
const waitingRoomButton =
|
|
64
64
|
useString<PrecallJoinBtnTextInterface>(precallJoinBtnText);
|
|
65
|
-
const {saveName} = useUserPreference();
|
|
66
65
|
const [buttonText, setButtonText] = React.useState(
|
|
67
66
|
waitingRoomButton({
|
|
68
67
|
waitingRoom: true,
|
|
@@ -184,8 +183,6 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
184
183
|
|
|
185
184
|
const onSubmit = () => {
|
|
186
185
|
shouldWaitingRoomPoll = true;
|
|
187
|
-
saveName(username?.trim());
|
|
188
|
-
|
|
189
186
|
// Enter waiting rooom;
|
|
190
187
|
setRoomInfo(prev => {
|
|
191
188
|
return {...prev, isInWaitingRoom: true};
|
|
@@ -70,7 +70,6 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
70
70
|
const setUsername = useSetName();
|
|
71
71
|
const {isJoinDataFetched, isInWaitingRoom} = useRoomInfo();
|
|
72
72
|
const {awake, request} = useWakeLock();
|
|
73
|
-
const {saveName} = useUserPreference();
|
|
74
73
|
const waitingRoomButton =
|
|
75
74
|
useString<PrecallJoinBtnTextInterface>(precallJoinBtnText);
|
|
76
75
|
const {setRoomInfo} = useSetRoomInfo();
|
|
@@ -210,8 +209,6 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
210
209
|
const onSubmit = () => {
|
|
211
210
|
shouldWaitingRoomPoll = true;
|
|
212
211
|
setUsername(username.trim());
|
|
213
|
-
//updating name in the backend
|
|
214
|
-
saveName(username.trim());
|
|
215
212
|
//setCallActive(true);
|
|
216
213
|
|
|
217
214
|
// add the waitingRoomStatus to the uid
|
|
@@ -44,7 +44,6 @@ export interface UserUids {
|
|
|
44
44
|
interface UserPreferenceContextInterface {
|
|
45
45
|
displayName: string;
|
|
46
46
|
setDisplayName: React.Dispatch<React.SetStateAction<string>>;
|
|
47
|
-
saveName: (name: string) => void;
|
|
48
47
|
uids: UserUids;
|
|
49
48
|
}
|
|
50
49
|
|
|
@@ -52,7 +51,7 @@ const UserPreferenceContext =
|
|
|
52
51
|
React.createContext<UserPreferenceContextInterface>({
|
|
53
52
|
displayName: '',
|
|
54
53
|
setDisplayName: () => {},
|
|
55
|
-
|
|
54
|
+
|
|
56
55
|
uids: {},
|
|
57
56
|
});
|
|
58
57
|
|
|
@@ -114,92 +113,6 @@ const UserPreferenceProvider = (props: {
|
|
|
114
113
|
} catch (error) {}
|
|
115
114
|
}, [languageCode, screenShareData]);
|
|
116
115
|
|
|
117
|
-
const saveName = (name: string) => {
|
|
118
|
-
if (name && name?.trim() !== '') {
|
|
119
|
-
const requestId = getUniqueID();
|
|
120
|
-
const startReqTs = Date.now();
|
|
121
|
-
try {
|
|
122
|
-
logger.log(
|
|
123
|
-
LogSource.Internals,
|
|
124
|
-
'NAME',
|
|
125
|
-
'Trying to save the display name',
|
|
126
|
-
{
|
|
127
|
-
requestId,
|
|
128
|
-
startReqTs,
|
|
129
|
-
},
|
|
130
|
-
);
|
|
131
|
-
updateUserName({
|
|
132
|
-
context: {
|
|
133
|
-
headers: {
|
|
134
|
-
'X-Request-Id': requestId,
|
|
135
|
-
'X-Session-Id': logger.getSessionId(),
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
variables: {
|
|
139
|
-
name,
|
|
140
|
-
},
|
|
141
|
-
})
|
|
142
|
-
.then(res => {
|
|
143
|
-
const endReqTs = Date.now();
|
|
144
|
-
logger.log(
|
|
145
|
-
LogSource.Internals,
|
|
146
|
-
'NAME',
|
|
147
|
-
'name updated successfully',
|
|
148
|
-
{
|
|
149
|
-
responseData: res,
|
|
150
|
-
startReqTs,
|
|
151
|
-
endReqTs,
|
|
152
|
-
latency: endReqTs - startReqTs,
|
|
153
|
-
requestId,
|
|
154
|
-
},
|
|
155
|
-
);
|
|
156
|
-
})
|
|
157
|
-
.catch(error => {
|
|
158
|
-
const endReqTs = Date.now();
|
|
159
|
-
logger.error(
|
|
160
|
-
LogSource.Internals,
|
|
161
|
-
'NAME',
|
|
162
|
-
'ERROR, could not save the name',
|
|
163
|
-
error,
|
|
164
|
-
{
|
|
165
|
-
networkError: {
|
|
166
|
-
name: error?.networkError?.name,
|
|
167
|
-
//@ts-ignore
|
|
168
|
-
code: error?.networkError?.result?.error?.code,
|
|
169
|
-
//@ts-ignore
|
|
170
|
-
message: error?.networkError?.result?.error?.message,
|
|
171
|
-
},
|
|
172
|
-
startReqTs,
|
|
173
|
-
endReqTs,
|
|
174
|
-
latency: endReqTs - startReqTs,
|
|
175
|
-
requestId,
|
|
176
|
-
},
|
|
177
|
-
);
|
|
178
|
-
});
|
|
179
|
-
} catch (error) {
|
|
180
|
-
const endReqTs = Date.now();
|
|
181
|
-
logger.error(
|
|
182
|
-
LogSource.Internals,
|
|
183
|
-
'NAME',
|
|
184
|
-
'ERROR, could not save the name',
|
|
185
|
-
error,
|
|
186
|
-
{
|
|
187
|
-
networkError: {
|
|
188
|
-
name: error?.networkError?.name,
|
|
189
|
-
//@ts-ignore
|
|
190
|
-
code: error?.networkError?.result?.error?.code,
|
|
191
|
-
//@ts-ignore
|
|
192
|
-
message: error?.networkError?.result?.error?.message,
|
|
193
|
-
},
|
|
194
|
-
startReqTs,
|
|
195
|
-
endReqTs,
|
|
196
|
-
latency: endReqTs - startReqTs,
|
|
197
|
-
requestId,
|
|
198
|
-
},
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
116
|
const userText = useString(videoRoomUserFallbackText)();
|
|
204
117
|
const pstnUserLabel = useString(PSTNUserLabel)();
|
|
205
118
|
const getScreenShareName = useString(videoRoomScreenshareText);
|
|
@@ -309,7 +222,6 @@ const UserPreferenceProvider = (props: {
|
|
|
309
222
|
value={{
|
|
310
223
|
setDisplayName,
|
|
311
224
|
displayName,
|
|
312
|
-
saveName,
|
|
313
225
|
uids,
|
|
314
226
|
}}>
|
|
315
227
|
{props.children}
|
|
@@ -235,16 +235,7 @@ const Create = () => {
|
|
|
235
235
|
LogSource.Internals,
|
|
236
236
|
'CREATE_MEETING',
|
|
237
237
|
'There was error while creating meeting',
|
|
238
|
-
error,
|
|
239
|
-
{
|
|
240
|
-
networkError: {
|
|
241
|
-
name: error?.networkError?.name,
|
|
242
|
-
//@ts-ignore
|
|
243
|
-
code: error?.networkError?.result?.error?.code,
|
|
244
|
-
//@ts-ignore
|
|
245
|
-
message: error?.networkError?.result?.error?.message,
|
|
246
|
-
},
|
|
247
|
-
},
|
|
238
|
+
JSON.stringify(error || {}),
|
|
248
239
|
);
|
|
249
240
|
if (
|
|
250
241
|
createRoomErrorToastHeadingText ||
|
|
@@ -134,16 +134,7 @@ const Join = () => {
|
|
|
134
134
|
LogSource.Internals,
|
|
135
135
|
'JOIN_MEETING',
|
|
136
136
|
'Error on join room page',
|
|
137
|
-
error,
|
|
138
|
-
{
|
|
139
|
-
networkError: {
|
|
140
|
-
name: error?.networkError?.name,
|
|
141
|
-
//@ts-ignore
|
|
142
|
-
code: error?.networkError?.result?.error?.code,
|
|
143
|
-
//@ts-ignore
|
|
144
|
-
message: error?.networkError?.result?.error?.message,
|
|
145
|
-
},
|
|
146
|
-
},
|
|
137
|
+
JSON.stringify(error || {}),
|
|
147
138
|
);
|
|
148
139
|
const isInvalidUrl =
|
|
149
140
|
error?.message.toLowerCase().trim() === 'invalid passphrase' || false;
|
|
@@ -249,22 +249,19 @@ const VideoCall: React.FC = () => {
|
|
|
249
249
|
useEffect(() => {
|
|
250
250
|
if (!SdkJoinState.phrase) {
|
|
251
251
|
useJoin(phrase, RoomInfoDefaultValue.roomPreference)
|
|
252
|
-
.then(() => {
|
|
252
|
+
.then(() => {
|
|
253
|
+
logger.log(
|
|
254
|
+
LogSource.Internals,
|
|
255
|
+
'JOIN_MEETING',
|
|
256
|
+
'Join channel success',
|
|
257
|
+
);
|
|
258
|
+
})
|
|
253
259
|
.catch(error => {
|
|
254
260
|
logger.error(
|
|
255
261
|
LogSource.Internals,
|
|
256
262
|
'JOIN_MEETING',
|
|
257
263
|
'Join channel error',
|
|
258
|
-
error,
|
|
259
|
-
{
|
|
260
|
-
networkError: {
|
|
261
|
-
name: error?.networkError?.name,
|
|
262
|
-
//@ts-ignore
|
|
263
|
-
code: error?.networkError?.result?.error?.code,
|
|
264
|
-
//@ts-ignore
|
|
265
|
-
message: error?.networkError?.result?.error?.message,
|
|
266
|
-
},
|
|
267
|
-
},
|
|
264
|
+
JSON.stringify(error || {}),
|
|
268
265
|
);
|
|
269
266
|
setGlobalErrorMessage(error);
|
|
270
267
|
history.push('/');
|
|
@@ -303,27 +300,26 @@ const VideoCall: React.FC = () => {
|
|
|
303
300
|
} else if (sdkMeetingPhrase) {
|
|
304
301
|
setQueryComplete(false);
|
|
305
302
|
currentMeetingPhrase.current = sdkMeetingPath;
|
|
306
|
-
useJoin(sdkMeetingPhrase, preference)
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
});
|
|
303
|
+
useJoin(sdkMeetingPhrase, preference)
|
|
304
|
+
.then(() => {
|
|
305
|
+
logger.log(
|
|
306
|
+
LogSource.Internals,
|
|
307
|
+
'JOIN_MEETING',
|
|
308
|
+
'Join channel success',
|
|
309
|
+
);
|
|
310
|
+
})
|
|
311
|
+
.catch(error => {
|
|
312
|
+
logger.error(
|
|
313
|
+
LogSource.Internals,
|
|
314
|
+
'JOIN_MEETING',
|
|
315
|
+
'Join channel error',
|
|
316
|
+
JSON.stringify(error || {}),
|
|
317
|
+
);
|
|
318
|
+
setGlobalErrorMessage(error);
|
|
319
|
+
history.push('/');
|
|
320
|
+
currentMeetingPhrase.current = '';
|
|
321
|
+
promise.rej(error);
|
|
322
|
+
});
|
|
327
323
|
}
|
|
328
324
|
}, [SdkJoinState]);
|
|
329
325
|
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
import {LogSource, logger} from '../../logger/AppBuilderLogger';
|
|
52
52
|
import {useFullScreen} from '../../utils/useFullScreen';
|
|
53
53
|
import SpotlightHighligher from './SpotlightHighlighter';
|
|
54
|
-
import {
|
|
54
|
+
import {useAIAgent} from '../../ai-agent/components/AgentControls/AgentContext';
|
|
55
55
|
|
|
56
56
|
export interface VideoRendererProps {
|
|
57
57
|
user: ContentInterface;
|
|
@@ -71,7 +71,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
71
71
|
containerStyle = {},
|
|
72
72
|
innerContainerStyle = {},
|
|
73
73
|
}) => {
|
|
74
|
-
const {agentConnectionState} =
|
|
74
|
+
const {agentConnectionState} = useAIAgent();
|
|
75
75
|
const {CustomAgentView} = useCustomization(data => {
|
|
76
76
|
let components: {
|
|
77
77
|
CustomAgentView: React.ComponentType<CustomAgentInterfaceProps>;
|
|
@@ -348,12 +348,12 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
348
348
|
onChange={isVisible => {
|
|
349
349
|
setVideoTileInViewPortState(user.uid, isVisible);
|
|
350
350
|
}}>
|
|
351
|
-
{
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
user?.type === 'ai-agent' &&
|
|
355
|
-
CustomAgentView ? (
|
|
351
|
+
{$config.ENABLE_CONVERSATIONAL_AI &&
|
|
352
|
+
user?.type === 'ai-agent' &&
|
|
353
|
+
CustomAgentView ? (
|
|
356
354
|
<CustomAgentView connectionState={agentConnectionState} />
|
|
355
|
+
) : CustomChild ? (
|
|
356
|
+
<CustomChild />
|
|
357
357
|
) : (
|
|
358
358
|
<MaxVideoView
|
|
359
359
|
fallback={() => {
|
|
@@ -369,15 +369,8 @@ const RecordingProvider = (props: RecordingProviderProps) => {
|
|
|
369
369
|
LogSource.NetworkRest,
|
|
370
370
|
'recording_start',
|
|
371
371
|
'Error while start recording',
|
|
372
|
-
err,
|
|
372
|
+
JSON.stringify(err || {}),
|
|
373
373
|
{
|
|
374
|
-
networkError: {
|
|
375
|
-
name: err?.networkError?.name,
|
|
376
|
-
//@ts-ignore
|
|
377
|
-
code: err?.networkError?.result?.error?.code,
|
|
378
|
-
//@ts-ignore
|
|
379
|
-
message: err?.networkError?.result?.error?.message,
|
|
380
|
-
},
|
|
381
374
|
startReqTs,
|
|
382
375
|
endRequestTs,
|
|
383
376
|
latency,
|
|
@@ -68,15 +68,8 @@ function useRecordingLayoutQuery() {
|
|
|
68
68
|
LogSource.Internals,
|
|
69
69
|
'RECORDING',
|
|
70
70
|
'setPresenterQuery failure',
|
|
71
|
-
error,
|
|
71
|
+
JSON.stringify(error || {}),
|
|
72
72
|
{
|
|
73
|
-
networkError: {
|
|
74
|
-
name: error?.networkError?.name,
|
|
75
|
-
//@ts-ignore
|
|
76
|
-
code: error?.networkError?.result?.error?.code,
|
|
77
|
-
//@ts-ignore
|
|
78
|
-
message: error?.networkError?.result?.error?.message,
|
|
79
|
-
},
|
|
80
73
|
startReqTs,
|
|
81
74
|
endReqTs,
|
|
82
75
|
latency: endReqTs - startReqTs,
|
|
@@ -126,15 +119,8 @@ function useRecordingLayoutQuery() {
|
|
|
126
119
|
LogSource.Internals,
|
|
127
120
|
'RECORDING',
|
|
128
121
|
'executeNormalQuery failure',
|
|
129
|
-
error,
|
|
122
|
+
JSON.stringify(error || {}),
|
|
130
123
|
{
|
|
131
|
-
networkError: {
|
|
132
|
-
name: error?.networkError?.name,
|
|
133
|
-
//@ts-ignore
|
|
134
|
-
code: error?.networkError?.result?.error?.code,
|
|
135
|
-
//@ts-ignore
|
|
136
|
-
message: error?.networkError?.result?.error?.message,
|
|
137
|
-
},
|
|
138
124
|
startReqTs,
|
|
139
125
|
endReqTs,
|
|
140
126
|
latency: endReqTs - startReqTs,
|
|
@@ -79,15 +79,8 @@ export default function useCreateRoom(): createRoomFun {
|
|
|
79
79
|
LogSource.NetworkRest,
|
|
80
80
|
'createChannel',
|
|
81
81
|
'API createChannel failed. There was an error',
|
|
82
|
-
error,
|
|
82
|
+
JSON.stringify(error || {}),
|
|
83
83
|
{
|
|
84
|
-
networkError: {
|
|
85
|
-
name: error?.networkError?.name,
|
|
86
|
-
//@ts-ignore
|
|
87
|
-
code: error?.networkError?.result?.error?.code,
|
|
88
|
-
//@ts-ignore
|
|
89
|
-
message: error?.networkError?.result?.error?.message,
|
|
90
|
-
},
|
|
91
84
|
startReqTs,
|
|
92
85
|
endReqTs,
|
|
93
86
|
latency: latency,
|
|
@@ -56,15 +56,8 @@ export default function useGetMeetingPhrase() {
|
|
|
56
56
|
LogSource.Internals,
|
|
57
57
|
'GET_MEETING_PHRASE',
|
|
58
58
|
'Query GET_MEETING_PHRASE failed',
|
|
59
|
-
response
|
|
59
|
+
JSON.stringify(response?.error || {}),
|
|
60
60
|
{
|
|
61
|
-
networkError: {
|
|
62
|
-
name: response?.error?.networkError?.name,
|
|
63
|
-
//@ts-ignore
|
|
64
|
-
code: response?.error?.networkError?.result?.error?.code,
|
|
65
|
-
//@ts-ignore
|
|
66
|
-
message: response?.error?.networkError?.result?.error?.message,
|
|
67
|
-
},
|
|
68
61
|
requestId,
|
|
69
62
|
startReqTs,
|
|
70
63
|
endReqTs,
|
|
@@ -217,15 +217,8 @@ export default function useJoinRoom() {
|
|
|
217
217
|
isWaitingRoomEnabled ? 'channel_join_request' : 'joinChannel'
|
|
218
218
|
} failed.`,
|
|
219
219
|
'Join Channel Failed',
|
|
220
|
-
response?.error,
|
|
220
|
+
JSON.stringify(response?.error || {}),
|
|
221
221
|
{
|
|
222
|
-
networkError: {
|
|
223
|
-
name: response?.error?.networkError?.name,
|
|
224
|
-
//@ts-ignore
|
|
225
|
-
code: response?.error?.networkError?.result?.error?.code,
|
|
226
|
-
//@ts-ignore
|
|
227
|
-
message: response?.error?.networkError?.result?.error?.message,
|
|
228
|
-
},
|
|
229
222
|
startReqTs,
|
|
230
223
|
endReqTs,
|
|
231
224
|
latency,
|
|
@@ -53,15 +53,8 @@ const useMutePSTN = () => {
|
|
|
53
53
|
LogSource.Internals,
|
|
54
54
|
'MUTE_PSTN',
|
|
55
55
|
'Mutation MUTE_PSTN success',
|
|
56
|
-
error,
|
|
56
|
+
JSON.stringify(error || {}),
|
|
57
57
|
{
|
|
58
|
-
networkError: {
|
|
59
|
-
name: error?.networkError?.name,
|
|
60
|
-
//@ts-ignore
|
|
61
|
-
code: error?.networkError?.result?.error?.code,
|
|
62
|
-
//@ts-ignore
|
|
63
|
-
message: error?.networkError?.result?.error?.message,
|
|
64
|
-
},
|
|
65
58
|
startReqTs,
|
|
66
59
|
endReqTs,
|
|
67
60
|
latency: endReqTs - startReqTs,
|