agora-appbuilder-core 4.0.29-beta-11 → 4.0.29-beta-15

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.29-beta-11",
3
+ "version": "4.0.29-beta-15",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -0,0 +1,7 @@
1
+ module.exports = {
2
+ project: {
3
+ ios: {},
4
+ android: {},
5
+ },
6
+ assets: ["./src/assets/fonts"]
7
+ }
@@ -61,4 +61,3 @@ export type {ChatUIControlsInterface} from '../src/components/chat-ui/useChatUIC
61
61
  export {useVirtualBackground} from '../src/app-state/useVirtualBackground';
62
62
  export {useBeautyEffects} from '../src/app-state/useBeautyEffects';
63
63
  export {useLiveStreamDataContext} from '../src/components/contexts/LiveStreamDataContext';
64
- export {useRtmContext} from '../src/components/ChatContext';
@@ -35,7 +35,6 @@ export interface PreCallInterface extends BeforeAndAfterInterface {
35
35
  joinButton?: React.ComponentType;
36
36
  textBox?: React.ComponentType;
37
37
  virtualBackgroundPanel?: React.ComponentType<VBPanelProps>;
38
- wrapper?: React.ComponentType;
39
38
  }
40
39
  export interface ChatCmpInterface {
41
40
  //commented for v1 release
@@ -47,4 +47,3 @@ export {getSessionId} from '../src/utils/common';
47
47
  export {default as ThemeConfig} from '../src/theme';
48
48
  export {default as hexadecimalTransparency} from '../src/utils/hexadecimalTransparency';
49
49
  export {useFullScreen} from '../src/utils/useFullScreen';
50
- export {useHideShareTitle} from '../src/utils/useHideShareTile';
@@ -510,15 +510,8 @@ const AuthProvider = (props: AuthProviderProps) => {
510
510
  'API unauth_login Trying to authenticate user',
511
511
  {requestId: requestId, startReqTs},
512
512
  );
513
- let user_id_unauth = null;
514
- try {
515
- if (isWeb()) {
516
- const urlParams = new URLSearchParams(window?.location?.search);
517
- user_id_unauth = urlParams.get('user_id');
518
- }
519
- } catch (error) {}
520
513
 
521
- fetch(GET_UNAUTH_FLOW_API_ENDPOINT(user_id_unauth), {
514
+ fetch(GET_UNAUTH_FLOW_API_ENDPOINT(), {
522
515
  credentials: 'include',
523
516
  headers: {
524
517
  'X-Request-Id': requestId,
@@ -46,12 +46,7 @@ export const getOriginURL = () => {
46
46
  return isWeb() ? `${window.location.origin}` : `${$config.FRONTEND_ENDPOINT}`;
47
47
  };
48
48
 
49
- export const GET_UNAUTH_FLOW_API_ENDPOINT = (user_id?: string) => {
50
- if (user_id) {
51
- return `${$config.BACKEND_ENDPOINT}/v1/login?project_id=${
52
- $config.PROJECT_ID
53
- }&platform_id=${getPlatformId()}&user_id=${user_id}`;
54
- }
49
+ export const GET_UNAUTH_FLOW_API_ENDPOINT = () => {
55
50
  return `${$config.BACKEND_ENDPOINT}/v1/login?project_id=${
56
51
  $config.PROJECT_ID
57
52
  }&platform_id=${getPlatformId()}`;
@@ -13,7 +13,6 @@ import RtmEngine from 'agora-react-native-rtm';
13
13
  import {UidType} from '../../agora-rn-uikit';
14
14
  import {createContext, SetStateAction} from 'react';
15
15
  import {ChatMessageType} from './chat-messages/useChatMessages';
16
- import {createHook} from 'customization-implementation';
17
16
 
18
17
  export interface ChatBubbleProps {
19
18
  isLocal: boolean;
@@ -83,7 +82,4 @@ export enum controlMessageEnum {
83
82
 
84
83
  const ChatContext = createContext(null as unknown as chatContext);
85
84
 
86
- const useRtmContext = createHook(ChatContext);
87
-
88
- export {useRtmContext};
89
85
  export default ChatContext;
@@ -227,7 +227,6 @@ const Precall = (props: any) => {
227
227
  VirtualBackgroundComponent,
228
228
  PrecallAfterView,
229
229
  PrecallBeforeView,
230
- wrapper: PrecallWrapper,
231
230
  } = useCustomization(data => {
232
231
  const components: {
233
232
  PrecallAfterView: React.ComponentType;
@@ -236,7 +235,6 @@ const Precall = (props: any) => {
236
235
  VideoPreview: React.ComponentType;
237
236
  VirtualBackgroundComponent: React.ComponentType<VBPanelProps>;
238
237
  MeetingName: React.ComponentType<MeetingTitleProps>;
239
- wrapper: React.ComponentType;
240
238
  } = {
241
239
  PrecallAfterView: React.Fragment,
242
240
  PrecallBeforeView: React.Fragment,
@@ -244,7 +242,6 @@ const Precall = (props: any) => {
244
242
  VideoPreview: PreCallVideoPreview,
245
243
  DeviceSelect: PreCallSelectDevice,
246
244
  VirtualBackgroundComponent: VBPanel,
247
- wrapper: React.Fragment,
248
245
  };
249
246
  // commented for v1 release
250
247
  // if (
@@ -291,14 +288,6 @@ const Precall = (props: any) => {
291
288
  // }
292
289
  // }
293
290
  // }
294
- if (
295
- data?.components?.precall?.wrapper &&
296
- typeof data?.components?.precall?.wrapper !== 'object'
297
- ) {
298
- if (isValidReactComponent(data?.components?.precall?.wrapper)) {
299
- components.wrapper = data?.components?.precall?.wrapper;
300
- }
301
- }
302
291
  if (
303
292
  data?.components?.precall?.virtualBackgroundPanel &&
304
293
  typeof data?.components?.precall.virtualBackgroundPanel !== 'object' &&
@@ -368,7 +357,7 @@ const Precall = (props: any) => {
368
357
  return FpePrecallComponent ? (
369
358
  <FpePrecallComponent />
370
359
  ) : (
371
- <PrecallWrapper>
360
+ <>
372
361
  <PrecallBeforeView />
373
362
  <View style={{flex: 1}}>
374
363
  <ScrollView
@@ -465,7 +454,7 @@ const Precall = (props: any) => {
465
454
  </ScrollView>
466
455
  </View>
467
456
  <PrecallAfterView />
468
- </PrecallWrapper>
457
+ </>
469
458
  );
470
459
  };
471
460
 
@@ -248,7 +248,6 @@ const Precall = () => {
248
248
  VirtualBackgroundComponent,
249
249
  PrecallAfterView,
250
250
  PrecallBeforeView,
251
- wrapper: PrecallWrapper,
252
251
  } = useCustomization(data => {
253
252
  const components: {
254
253
  PrecallAfterView: React.ComponentType;
@@ -257,7 +256,6 @@ const Precall = () => {
257
256
  VirtualBackgroundComponent: React.ComponentType<VBPanelProps>;
258
257
  VideoPreview: React.ComponentType;
259
258
  MeetingName: React.ComponentType<MeetingTitleProps>;
260
- wrapper: React.ComponentType;
261
259
  } = {
262
260
  PrecallAfterView: React.Fragment,
263
261
  PrecallBeforeView: React.Fragment,
@@ -265,7 +263,6 @@ const Precall = () => {
265
263
  VideoPreview: PreCallVideoPreview,
266
264
  DeviceSelect: PreCallSelectDevice,
267
265
  VirtualBackgroundComponent: VBPanel,
268
- wrapper: React.Fragment,
269
266
  };
270
267
  // commented for v1 release
271
268
  // if (
@@ -313,15 +310,6 @@ const Precall = () => {
313
310
  // }
314
311
  // }
315
312
 
316
- if (
317
- data?.components?.precall?.wrapper &&
318
- typeof data?.components?.precall?.wrapper !== 'object'
319
- ) {
320
- if (isValidReactComponent(data?.components?.precall?.wrapper)) {
321
- components.wrapper = data?.components?.precall?.wrapper;
322
- }
323
- }
324
-
325
313
  if (
326
314
  data?.components?.precall?.virtualBackgroundPanel &&
327
315
  typeof data?.components?.precall.virtualBackgroundPanel !== 'object' &&
@@ -400,7 +388,7 @@ const Precall = () => {
400
388
  return FpePrecallComponent ? (
401
389
  <FpePrecallComponent />
402
390
  ) : (
403
- <PrecallWrapper>
391
+ <>
404
392
  <PrecallBeforeView />
405
393
  {$config.EVENT_MODE &&
406
394
  rtcProps.role == ClientRoleType.ClientRoleAudience ? (
@@ -541,7 +529,7 @@ const Precall = () => {
541
529
  </View>
542
530
  )}
543
531
  <PrecallAfterView />
544
- </PrecallWrapper>
532
+ </>
545
533
  );
546
534
  };
547
535
 
@@ -10,8 +10,6 @@ import {DispatchContext} from '../../../agora-rn-uikit';
10
10
  import MeetingInfoGridTile from '../../components/meeting-info-invite/MeetingInfoGridTile';
11
11
  import Spacer from '../../atoms/Spacer';
12
12
  import {useLiveStreamDataContext} from '../../components/contexts/LiveStreamDataContext';
13
- import {useCustomization} from 'customization-implementation';
14
- import useMount from '../../components/useMount';
15
13
 
16
14
  const VideoComponent = () => {
17
15
  const {dispatch} = useContext(DispatchContext);
@@ -23,42 +21,23 @@ const VideoComponent = () => {
23
21
  const isDesktop = useIsDesktop();
24
22
  const {audienceUids, hostUids} = useLiveStreamDataContext();
25
23
  const [showNoUserInfo, setShowNoUserInfo] = useState(false);
26
- const isCustomLayoutUsed = useCustomization(config => {
27
- if (
28
- typeof config?.components?.videoCall === 'object' &&
29
- config?.components?.videoCall?.customLayout
30
- ) {
31
- return true;
32
- }
33
- return false;
34
- });
35
24
 
36
25
  const {roomPreference} = useRoomInfo();
37
26
 
38
27
  const disableShareTile = roomPreference?.disableShareTile;
39
- const disableShareTileRef = useRef(disableShareTile);
40
-
41
- useMount(() => {
42
- //show share tile after 2.5 seconds because RTC user join take few seconds.
43
- //meanwhile we don't want to show the share tile
44
- setTimeout(() => {
45
- if (!disableShareTileRef.current) {
46
- setShowNoUserInfo(true);
47
- }
48
- }, 2500);
49
- });
50
28
 
51
29
  useEffect(() => {
52
- disableShareTileRef.current = disableShareTile;
53
- if (disableShareTile) {
54
- setShowNoUserInfo(false);
30
+ if (!disableShareTile) {
31
+ setTimeout(() => {
32
+ setShowNoUserInfo(true);
33
+ }, 2500);
55
34
  }
56
35
  }, [disableShareTile]);
57
36
 
58
37
  const currentLayoutRef = useRef(currentLayout);
59
38
  const gridLayoutName = getGridLayoutName();
60
39
  useEffect(() => {
61
- if (activeUids && activeUids.length === 1 && !isCustomLayoutUsed) {
40
+ if (activeUids && activeUids.length === 1) {
62
41
  if (pinnedUid) {
63
42
  dispatch({type: 'UserPin', value: [0]});
64
43
  dispatch({type: 'UserSecondaryPin', value: [0]});
@@ -67,7 +46,7 @@ const VideoComponent = () => {
67
46
  setLayout(gridLayoutName);
68
47
  }
69
48
  }
70
- }, [activeUids, isCustomLayoutUsed]);
49
+ }, [activeUids]);
71
50
 
72
51
  useEffect(() => {
73
52
  currentLayoutRef.current = currentLayout;
@@ -1,16 +0,0 @@
1
- import {useSetRoomInfo} from '../components/room-info/useSetRoomInfo';
2
-
3
- export const useHideShareTitle = () => {
4
- const {setRoomInfo} = useSetRoomInfo();
5
- return (disableShareTile: boolean) => {
6
- setRoomInfo(prevState => {
7
- return {
8
- ...prevState,
9
- roomPreference: {
10
- ...prevState?.roomPreference,
11
- disableShareTile: disableShareTile,
12
- },
13
- };
14
- });
15
- };
16
- };