agora-appbuilder-core 4.0.6-beta-01 → 4.0.8-beta-01
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/agora-rn-uikit/src/Contexts/PropsContext.tsx +2 -1
- package/template/agora-rn-uikit/src/index.ts +1 -0
- package/template/src/components/virtual-background/VideoPreview.tsx +1 -0
- package/template/src/logger/constants.ts +2 -2
- package/template/src/logger/transports/customer-transport.ts +9 -1
package/package.json
CHANGED
|
@@ -88,7 +88,8 @@ export interface DefaultContentInterface {
|
|
|
88
88
|
export interface CustomContentInterface<T> {
|
|
89
89
|
type: T extends DefaultContentInterface['type'] ? never : T;
|
|
90
90
|
}
|
|
91
|
-
interface ExtenedContentInterface
|
|
91
|
+
export interface ExtenedContentInterface
|
|
92
|
+
extends CustomContentInterface<string> {
|
|
92
93
|
[key: string]: any;
|
|
93
94
|
}
|
|
94
95
|
export type ContentInterface =
|
|
@@ -56,6 +56,7 @@ export type {
|
|
|
56
56
|
ActionInterface,
|
|
57
57
|
ActionType,
|
|
58
58
|
} from './Contexts/RtcContext';
|
|
59
|
+
export type {ExtenedContentInterface} from './Contexts/PropsContext';
|
|
59
60
|
export type {DispatchType} from './Contexts/DispatchContext';
|
|
60
61
|
|
|
61
62
|
export {default as BtnTemplate} from './Controls/BtnTemplate';
|
|
@@ -43,6 +43,7 @@ const VideoPreview = ({isLocalVideoON}: VideoPreviewProps) => {
|
|
|
43
43
|
if (isMobileWeb) return;
|
|
44
44
|
let localVideo = null;
|
|
45
45
|
const initialize = async () => {
|
|
46
|
+
localVideo = await createCameraTrack();
|
|
46
47
|
logger.log(
|
|
47
48
|
LogSource.Internals,
|
|
48
49
|
isLocalVideoON ? 'VIRTUAL_BACKGROUND' : 'PRECALL_SCREEN',
|
|
@@ -10,8 +10,8 @@ export const ENABLE_AGORA_LOGGER_TRANSPORT =
|
|
|
10
10
|
// $config.LOG_ENABLED && $config.APP_ID === CONFERENCING_APP_ID && true;
|
|
11
11
|
|
|
12
12
|
// Send logs to configured transport-> axiom (used for customer deployed apps)
|
|
13
|
-
export const ENABLE_CUSTOMER_LOGGER_TRANSPORT =
|
|
14
|
-
|
|
13
|
+
export const ENABLE_CUSTOMER_LOGGER_TRANSPORT = false;
|
|
14
|
+
// $config.LOG_ENABLED && !isInternalApp;
|
|
15
15
|
|
|
16
16
|
// Print logs to browser console window - true in dev mode
|
|
17
17
|
export const ENABLE_BROWSER_CONSOLE_LOGS = $config.LOG_ENABLED;
|
|
@@ -20,6 +20,14 @@ export function getCircularReplacer() {
|
|
|
20
20
|
return value;
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
+
const getSafeBody = (p: any[]) => {
|
|
24
|
+
try {
|
|
25
|
+
return JSON.stringify(p, getCircularReplacer());
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error('there was an error converting this object');
|
|
28
|
+
return '';
|
|
29
|
+
}
|
|
30
|
+
};
|
|
23
31
|
|
|
24
32
|
const fetchRetry = createRetryFetch(fetch, {
|
|
25
33
|
retries: 23,
|
|
@@ -43,7 +51,7 @@ const sendLogs = (p: any[]) => {
|
|
|
43
51
|
headers: new Headers({
|
|
44
52
|
'Content-Type': 'application/json',
|
|
45
53
|
}),
|
|
46
|
-
body:
|
|
54
|
+
body: getSafeBody(p),
|
|
47
55
|
},
|
|
48
56
|
).catch(err => {
|
|
49
57
|
console.log('error ocuured while replacing circular reference', p, err);
|