agora-appbuilder-core 4.0.25-beta-7 → 4.0.25-beta-8

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 (54) hide show
  1. package/package.json +2 -2
  2. package/template/_package-lock.json +29 -0
  3. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +1 -0
  4. package/template/agora-rn-uikit/src/Rtc/Create.tsx +5 -0
  5. package/template/bridge/rtc/webNg/RtcEngine.ts +76 -8
  6. package/template/customization-api/app-state.ts +1 -0
  7. package/template/customization-api/types.ts +6 -0
  8. package/template/defaultConfig.js +2 -1
  9. package/template/global.d.ts +47 -2
  10. package/template/package-lock.json +29 -0
  11. package/template/package.json +2 -0
  12. package/template/src/AppRoutes.tsx +2 -2
  13. package/template/src/AppWrapper.tsx +2 -0
  14. package/template/src/SDKAppWrapper.tsx +12 -4
  15. package/template/src/app-state/useBeautyEffects.ts +38 -0
  16. package/template/src/app-state/useVideoQuality.tsx +154 -11
  17. package/template/src/atoms/CustomSlider.tsx +117 -0
  18. package/template/src/atoms/Dropdown.tsx +2 -1
  19. package/template/src/atoms/RangeSlider.tsx +48 -0
  20. package/template/src/auth/AuthProvider.tsx +2 -2
  21. package/template/src/auth/openIDPURL.native.tsx +1 -1
  22. package/template/src/auth/useIDPAuth.electron.tsx +1 -1
  23. package/template/src/auth/useIDPAuth.native.tsx +1 -1
  24. package/template/src/auth/useIDPAuth.tsx +1 -1
  25. package/template/src/auth/useTokenAuth.tsx +2 -2
  26. package/template/src/components/DeviceConfigure.tsx +4 -4
  27. package/template/src/components/Precall.tsx +50 -27
  28. package/template/src/components/SdkApiContext.tsx +5 -1
  29. package/template/src/components/SettingsView.tsx +21 -0
  30. package/template/src/components/beauty-effect/BeautyEffectsControls.tsx +158 -0
  31. package/template/src/components/beauty-effect/useBeautyEffects.native.tsx +119 -0
  32. package/template/src/components/beauty-effect/useBeautyEffects.tsx +141 -0
  33. package/template/src/components/chat/chatConfigure.tsx +7 -1
  34. package/template/src/components/quality-profiles/QualityControls.tsx +76 -0
  35. package/template/src/components/room-info/useRoomInfo.tsx +2 -0
  36. package/template/src/components/useUserPreference.tsx +2 -2
  37. package/template/src/components/virtual-background/useVB.tsx +8 -3
  38. package/template/src/components/whiteboard/WhiteboardToolBox.tsx +8 -5
  39. package/template/src/components/whiteboard/WhiteboardWidget.tsx +1 -1
  40. package/template/src/logger/AppBuilderLogger.tsx +2 -6
  41. package/template/src/logger/transports/agora-transport.ts +7 -3
  42. package/template/src/pages/VideoCall.tsx +28 -24
  43. package/template/src/pages/video-call/VideoComponent.tsx +3 -3
  44. package/template/src/subComponents/BlockUI.tsx +49 -0
  45. package/template/src/subComponents/SelectDevice.tsx +3 -3
  46. package/template/src/subComponents/caption/useSTTAPI.tsx +2 -2
  47. package/template/src/subComponents/recording/useIsRecordingBot.tsx +41 -4
  48. package/template/src/subComponents/recording/useRecording.tsx +85 -83
  49. package/template/src/utils/SdkMethodEvents.ts +5 -1
  50. package/template/src/utils/useCreateRoom.ts +2 -1
  51. package/template/src/utils/useGetMeetingPhrase.ts +1 -1
  52. package/template/src/utils/useJoinRoom.ts +8 -2
  53. package/template/src/utils/useMutePSTN.ts +1 -0
  54. package/template/src/utils/useOrientation.tsx +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.0.25-beta-7",
3
+ "version": "4.0.25-beta-8",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "scripts": {
11
11
  "vercel-build": "npm run dev-setup && cd template && npm run web:build && cd .. && npm run copy-vercel",
12
- "uikit": "rm -rf template/agora-rn-uikit && git clone https://github.com/AgoraIO-Community/ReactNative-UIKit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout uikit-sdk-update-with-api-changes",
12
+ "uikit": "rm -rf template/agora-rn-uikit && git clone https://github.com/AgoraIO-Community/ReactNative-UIKit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout uikit-sdk-update-with-api-changes-profiles",
13
13
  "deps": "cd template && npm i --force",
14
14
  "dev-setup": "npm run uikit && npm run deps && node devSetup.js",
15
15
  "web-build": "cd template && npm run web:build && cd .. && npm run copy-vercel",
@@ -14,6 +14,7 @@
14
14
  "@gorhom/bottom-sheet": "4.4.7",
15
15
  "@netless/react-native-whiteboard": "^0.0.14",
16
16
  "@openspacelabs/react-native-zoomable-view": "^2.1.1",
17
+ "@react-native-assets/slider": "^7.2.1",
17
18
  "@react-native-async-storage/async-storage": "1.19.2",
18
19
  "@react-native-community/checkbox": "0.5.16",
19
20
  "@react-native-community/clipboard": "1.5.1",
@@ -21,6 +22,7 @@
21
22
  "add": "^2.0.6",
22
23
  "agora-chat": "^1.2.1",
23
24
  "agora-extension-ai-denoiser": "1.1.0",
25
+ "agora-extension-beauty-effect": "^1.0.2-beta",
24
26
  "agora-extension-virtual-background": "^1.1.3",
25
27
  "agora-react-native-rtm": "1.5.1",
26
28
  "agora-rtc-sdk-ng": "4.20.1-1",
@@ -3964,6 +3966,17 @@
3964
3966
  "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
3965
3967
  "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
3966
3968
  },
3969
+ "node_modules/@react-native-assets/slider": {
3970
+ "version": "7.2.1",
3971
+ "resolved": "https://registry.npmjs.org/@react-native-assets/slider/-/slider-7.2.1.tgz",
3972
+ "integrity": "sha512-8n1IBQ6QSBMwL+GasCEgHctsjcJwpZ3eioTgL7nyOSteOnmDTsyNVjUU5zQ80YeZOvSWQTeIQ7g30ikfbK4t1A==",
3973
+ "peerDependencies": {
3974
+ "react": ">=16.13.1",
3975
+ "react-dom": ">=16.13.1",
3976
+ "react-native": ">=0.61.4",
3977
+ "react-native-web": ">=0.13.4"
3978
+ }
3979
+ },
3967
3980
  "node_modules/@react-native-async-storage/async-storage": {
3968
3981
  "version": "1.19.2",
3969
3982
  "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz",
@@ -7761,6 +7774,11 @@
7761
7774
  "agora-rtc-sdk-ng": ">=4.15.0"
7762
7775
  }
7763
7776
  },
7777
+ "node_modules/agora-extension-beauty-effect": {
7778
+ "version": "1.0.2-beta",
7779
+ "resolved": "https://registry.npmjs.org/agora-extension-beauty-effect/-/agora-extension-beauty-effect-1.0.2-beta.tgz",
7780
+ "integrity": "sha512-nCEznllqgZiLmyzvUF4RxWdHXuFrVUWYlKhyl3ianvfF/9DY2551QQBuiRv6uPVsy4TEEWMwBX91EwxPX7v4Ig=="
7781
+ },
7764
7782
  "node_modules/agora-extension-virtual-background": {
7765
7783
  "version": "1.2.0",
7766
7784
  "resolved": "https://registry.npmjs.org/agora-extension-virtual-background/-/agora-extension-virtual-background-1.2.0.tgz",
@@ -35753,6 +35771,12 @@
35753
35771
  "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
35754
35772
  "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
35755
35773
  },
35774
+ "@react-native-assets/slider": {
35775
+ "version": "7.2.1",
35776
+ "resolved": "https://registry.npmjs.org/@react-native-assets/slider/-/slider-7.2.1.tgz",
35777
+ "integrity": "sha512-8n1IBQ6QSBMwL+GasCEgHctsjcJwpZ3eioTgL7nyOSteOnmDTsyNVjUU5zQ80YeZOvSWQTeIQ7g30ikfbK4t1A==",
35778
+ "requires": {}
35779
+ },
35756
35780
  "@react-native-async-storage/async-storage": {
35757
35781
  "version": "1.19.2",
35758
35782
  "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz",
@@ -38688,6 +38712,11 @@
38688
38712
  "integrity": "sha512-g4klzzz7IQblNt0c+gJ/DM7sa5oMZ/7GWE4c9aqs3snHRAo+CjDieT84iAc1KUhAiY84RrfhyFdtpvbbEoYBcA==",
38689
38713
  "requires": {}
38690
38714
  },
38715
+ "agora-extension-beauty-effect": {
38716
+ "version": "1.0.2-beta",
38717
+ "resolved": "https://registry.npmjs.org/agora-extension-beauty-effect/-/agora-extension-beauty-effect-1.0.2-beta.tgz",
38718
+ "integrity": "sha512-nCEznllqgZiLmyzvUF4RxWdHXuFrVUWYlKhyl3ianvfF/9DY2551QQBuiRv6uPVsy4TEEWMwBX91EwxPX7v4Ig=="
38719
+ },
38691
38720
  "agora-extension-virtual-background": {
38692
38721
  "version": "1.2.0",
38693
38722
  "resolved": "https://registry.npmjs.org/agora-extension-virtual-background/-/agora-extension-virtual-background-1.2.0.tgz",
@@ -136,6 +136,7 @@ export interface RtcPropsInterface {
136
136
  token?: string | null;
137
137
  dual?: boolean | null;
138
138
  profile?: VideoProfile;
139
+ screenShareProfile?: string;
139
140
  initialDualStreamMode?: DualStreamMode;
140
141
  role?: ClientRoleType /* Set local user's role between audience and host. Use with mode set to livestreaming. (default: host) */;
141
142
  callActive?: boolean;
@@ -257,6 +257,10 @@ const Create = ({
257
257
  // move this to bridge?
258
258
  // @ts-ignore
259
259
  await engine.current.setVideoProfile(rtcProps.profile);
260
+ // @ts-ignore
261
+ await engine.current.setScreenShareProfile(
262
+ rtcProps.screenShareProfile,
263
+ );
260
264
  } else {
261
265
  if (rtcProps && rtcProps?.profile) {
262
266
  const config: VideoEncoderConfiguration =
@@ -266,6 +270,7 @@ const Create = ({
266
270
  ...config,
267
271
  bitrate: 0,
268
272
  });
273
+ //TODO set for native
269
274
  }
270
275
  }
271
276
  }
@@ -40,6 +40,11 @@ import {LOG_ENABLED, GEO_FENCING} from '../../../config.json';
40
40
  import {Platform} from 'react-native';
41
41
  import isMobileOrTablet from '../../../src/utils/isMobileOrTablet';
42
42
  import {LogSource, logger} from '../../../src/logger/AppBuilderLogger';
43
+ import {
44
+ type VideoEncoderConfigurationPreset,
45
+ type ScreenEncoderConfigurationPreset,
46
+ type VideoEncoderConfiguration,
47
+ } from '../../../src/app-state/useVideoQuality';
43
48
 
44
49
  interface MediaDeviceInfo {
45
50
  readonly deviceId: string;
@@ -232,7 +237,12 @@ export default class RtcEngine {
232
237
  public screenStream: ScreenStream = {};
233
238
  public remoteStreams = new Map<UID, RemoteStream>();
234
239
  private inScreenshare: Boolean = false;
235
- private videoProfile: VideoProfile = '480p_9';
240
+ private videoProfile:
241
+ | VideoEncoderConfigurationPreset
242
+ | VideoEncoderConfiguration;
243
+ private screenShareProfile:
244
+ | ScreenEncoderConfigurationPreset
245
+ | VideoEncoderConfiguration;
236
246
  private isPublished = false;
237
247
  private isAudioEnabled = false;
238
248
  private isVideoEnabled = false;
@@ -252,6 +262,25 @@ export default class RtcEngine {
252
262
  logger.log(LogSource.AgoraSDK, 'Log', 'RTC engine initialized');
253
263
  this.appId = appId;
254
264
  }
265
+ getLocalVideoStats() {
266
+ try {
267
+ logger.log(
268
+ LogSource.AgoraSDK,
269
+ 'API',
270
+ 'RTC [getLocalVideoStats] getting local video stats',
271
+ );
272
+ const data = this.client?.getLocalVideoStats();
273
+ logger.log(
274
+ LogSource.AgoraSDK,
275
+ 'API',
276
+ 'RTC [getLocalVideoStats] got local video stats successfully',
277
+ data,
278
+ );
279
+ return data;
280
+ } catch (error) {
281
+ return error;
282
+ }
283
+ }
255
284
 
256
285
  getRemoteVideoStats(id: string) {
257
286
  try {
@@ -261,7 +290,7 @@ export default class RtcEngine {
261
290
  'RTC [getRemoteVideoStats] getting remote video stats',
262
291
  );
263
292
  const data = this.client.getRemoteVideoStats();
264
- logger.debug(
293
+ logger.log(
265
294
  LogSource.AgoraSDK,
266
295
  'API',
267
296
  'RTC [getRemoteVideoStats] got remote video stats successfully',
@@ -279,25 +308,57 @@ export default class RtcEngine {
279
308
  }
280
309
  }
281
310
 
282
- async setVideoProfile(profile: VideoProfile): Promise<void> {
311
+ async setVideoProfile(
312
+ profile: VideoEncoderConfigurationPreset | VideoEncoderConfiguration,
313
+ ): Promise<void> {
283
314
  try {
284
315
  this.videoProfile = profile;
285
316
  logger.log(
286
317
  LogSource.AgoraSDK,
287
318
  'API',
288
- `RTC [setEncoderConfiguration] setting video profile to - ${profile}`,
319
+ `RTC [setEncoderConfiguration] setting video profile.`,
320
+ profile,
321
+ );
322
+ await this.localStream?.video?.setEncoderConfiguration(profile);
323
+ logger.log(
324
+ LogSource.AgoraSDK,
325
+ 'API',
326
+ `RTC [setEncoderConfiguration] video profile is set successfully`,
327
+ profile,
328
+ );
329
+ } catch (error) {
330
+ logger.error(
331
+ LogSource.AgoraSDK,
332
+ 'API',
333
+ `RTC [setEncoderConfiguration] Error while setting video profile.`,
334
+ error,
289
335
  );
290
- this.localStream?.video?.setEncoderConfiguration(profile);
336
+ }
337
+ }
338
+
339
+ async setScreenShareProfile(
340
+ profile: ScreenEncoderConfigurationPreset | VideoEncoderConfiguration,
341
+ ): Promise<void> {
342
+ try {
343
+ this.screenShareProfile = profile;
291
344
  logger.log(
292
345
  LogSource.AgoraSDK,
293
346
  'API',
294
- `RTC [setEncoderConfiguration] set video profile to - ${profile} successfully`,
347
+ `RTC [setEncoderConfiguration] set screen share profile.`,
348
+ profile,
349
+ );
350
+ await this.screenStream?.video?.setEncoderConfiguration(profile);
351
+ logger.log(
352
+ LogSource.AgoraSDK,
353
+ 'API',
354
+ `RTC [setEncoderConfiguration] screen share profile is set successfully.`,
355
+ profile,
295
356
  );
296
357
  } catch (error) {
297
358
  logger.error(
298
359
  LogSource.AgoraSDK,
299
360
  'API',
300
- 'RTC [setEncoderConfiguration] Error while setting video profile',
361
+ `RTC [setEncoderConfiguration] Error while setting screen share profile.`,
301
362
  error,
302
363
  );
303
364
  }
@@ -357,6 +418,7 @@ export default class RtcEngine {
357
418
  bypassWebAudio: Platform.OS == 'web' && isMobileOrTablet(),
358
419
  microphoneId: preferredMicrophoneId,
359
420
  };
421
+
360
422
  const videoConfig: CameraVideoTrackInitConfig = {
361
423
  encoderConfig: this.videoProfile,
362
424
  cameraId: preferredCameraId,
@@ -1512,9 +1574,15 @@ export default class RtcEngine {
1512
1574
  mode: RnEncryptionEnum;
1513
1575
  salt: string;
1514
1576
  },
1515
- config: ScreenVideoTrackInitConfig = {},
1577
+ screenShareConfig: ScreenVideoTrackInitConfig = {
1578
+ encoderConfig: this.screenShareProfile,
1579
+ },
1516
1580
  audio: 'enable' | 'disable' | 'auto' = 'auto',
1517
1581
  ): Promise<void> {
1582
+ const config: ScreenVideoTrackInitConfig = {
1583
+ ...screenShareConfig,
1584
+ encoderConfig: this.screenShareProfile,
1585
+ };
1518
1586
  if (!this.inScreenshare) {
1519
1587
  try {
1520
1588
  logger.debug(
@@ -59,3 +59,4 @@ export {
59
59
  } from '../src/components/chat-ui/useChatUIControls';
60
60
  export type {ChatUIControlsInterface} from '../src/components/chat-ui/useChatUIControls';
61
61
  export {useVirtualBackground} from '../src/app-state/useVirtualBackground';
62
+ export {useBeautyEffects} from '../src/app-state/useBeautyEffects';
@@ -37,3 +37,9 @@ export {
37
37
  type Option as VBOption,
38
38
  } from '../src/components/virtual-background/useVB';
39
39
  export {type VBCardProps} from '../src/components/virtual-background/VBCard';
40
+ export {type BeautyEffects} from '../src/components/beauty-effect/useBeautyEffects';
41
+ export {
42
+ type VideoEncoderConfigurationPreset,
43
+ type ScreenEncoderConfigurationPreset,
44
+ type VideoEncoderConfiguration,
45
+ } from '../src/app-state/useVideoQuality';
@@ -33,7 +33,8 @@ const DefaultConfig = {
33
33
  BG: '',
34
34
  PRIMARY_FONT_COLOR: '#363636',
35
35
  SECONDARY_FONT_COLOR: '#FFFFFF',
36
- PROFILE: '720p_7',
36
+ PROFILE: "720p_3",
37
+ SCREEN_SHARE_PROFILE: "1080p_2",
37
38
  ICON_TEXT: true,
38
39
  PRIMARY_ACTION_BRAND_COLOR: '#099DFD',
39
40
  PRIMARY_ACTION_TEXT_COLOR: '#FFFFFF',
@@ -10,7 +10,7 @@
10
10
  *********************************************
11
11
  */
12
12
  // import statements are not allowed in global configs
13
- type VideoProfile =
13
+ type VideoProfilePreset =
14
14
  | '120p_1'
15
15
  | '120p_3'
16
16
  | '180p_1'
@@ -42,6 +42,50 @@ type VideoProfile =
42
42
  | '720p_5'
43
43
  | '720p_6';
44
44
 
45
+ type ScreenShareProfilePreset =
46
+ | '480p_1'
47
+ | '480p_2'
48
+ | '480p_3'
49
+ | '720p'
50
+ | '720p_1'
51
+ | '720p_2'
52
+ | '720p_3'
53
+ | '1080p'
54
+ | '1080p_1'
55
+ | '1080p_2'
56
+ | '1080p_3';
57
+
58
+ interface AudioEncoderConfiguration {
59
+ /**
60
+ * Sample rate of the audio (Hz).
61
+ */
62
+ sampleRate?: number;
63
+ /**
64
+ * Sample size of the audio.
65
+ */
66
+ sampleSize?: number;
67
+ /**
68
+ * Whether to enable stereo.
69
+ */
70
+ stereo?: boolean;
71
+ /**
72
+ * Bitrate of the audio (Kbps).
73
+ */
74
+ bitrate?: number;
75
+ }
76
+
77
+ declare const AUDIO_ENCODER_CONFIG_SETTINGS: {
78
+ speech_low_quality: AudioEncoderConfiguration;
79
+ speech_standard: AudioEncoderConfiguration;
80
+ music_standard: AudioEncoderConfiguration;
81
+ standard_stereo: AudioEncoderConfiguration;
82
+ high_quality: AudioEncoderConfiguration;
83
+ high_quality_stereo: AudioEncoderConfiguration;
84
+ };
85
+
86
+ type AudioEncoderConfigurationPreset =
87
+ keyof typeof AUDIO_ENCODER_CONFIG_SETTINGS;
88
+
45
89
  interface ConfigInterface {
46
90
  PRODUCT_ID: string;
47
91
  APP_NAME: string;
@@ -58,7 +102,8 @@ interface ConfigInterface {
58
102
  CLIENT_ID: string;
59
103
  LANDING_SUB_HEADING: string;
60
104
  ENCRYPTION_ENABLED: boolean;
61
- PROFILE: VideoProfile;
105
+ PROFILE: VideoProfilePreset;
106
+ SCREEN_SHARE_PROFILE: ScreenShareProfilePreset;
62
107
  ENABLE_GOOGLE_OAUTH: boolean;
63
108
  ENABLE_SLACK_OAUTH: boolean;
64
109
  ENABLE_MICROSOFT_OAUTH: boolean;
@@ -14,6 +14,7 @@
14
14
  "@gorhom/bottom-sheet": "4.4.7",
15
15
  "@netless/react-native-whiteboard": "^0.0.14",
16
16
  "@openspacelabs/react-native-zoomable-view": "^2.1.1",
17
+ "@react-native-assets/slider": "^7.2.1",
17
18
  "@react-native-async-storage/async-storage": "1.19.2",
18
19
  "@react-native-community/checkbox": "0.5.16",
19
20
  "@react-native-community/clipboard": "1.5.1",
@@ -21,6 +22,7 @@
21
22
  "add": "^2.0.6",
22
23
  "agora-chat": "^1.2.1",
23
24
  "agora-extension-ai-denoiser": "1.1.0",
25
+ "agora-extension-beauty-effect": "^1.0.2-beta",
24
26
  "agora-extension-virtual-background": "^1.1.3",
25
27
  "agora-react-native-rtm": "1.5.1",
26
28
  "agora-rtc-sdk-ng": "4.20.1-1",
@@ -3964,6 +3966,17 @@
3964
3966
  "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
3965
3967
  "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
3966
3968
  },
3969
+ "node_modules/@react-native-assets/slider": {
3970
+ "version": "7.2.1",
3971
+ "resolved": "https://registry.npmjs.org/@react-native-assets/slider/-/slider-7.2.1.tgz",
3972
+ "integrity": "sha512-8n1IBQ6QSBMwL+GasCEgHctsjcJwpZ3eioTgL7nyOSteOnmDTsyNVjUU5zQ80YeZOvSWQTeIQ7g30ikfbK4t1A==",
3973
+ "peerDependencies": {
3974
+ "react": ">=16.13.1",
3975
+ "react-dom": ">=16.13.1",
3976
+ "react-native": ">=0.61.4",
3977
+ "react-native-web": ">=0.13.4"
3978
+ }
3979
+ },
3967
3980
  "node_modules/@react-native-async-storage/async-storage": {
3968
3981
  "version": "1.19.2",
3969
3982
  "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz",
@@ -7761,6 +7774,11 @@
7761
7774
  "agora-rtc-sdk-ng": ">=4.15.0"
7762
7775
  }
7763
7776
  },
7777
+ "node_modules/agora-extension-beauty-effect": {
7778
+ "version": "1.0.2-beta",
7779
+ "resolved": "https://registry.npmjs.org/agora-extension-beauty-effect/-/agora-extension-beauty-effect-1.0.2-beta.tgz",
7780
+ "integrity": "sha512-nCEznllqgZiLmyzvUF4RxWdHXuFrVUWYlKhyl3ianvfF/9DY2551QQBuiRv6uPVsy4TEEWMwBX91EwxPX7v4Ig=="
7781
+ },
7764
7782
  "node_modules/agora-extension-virtual-background": {
7765
7783
  "version": "1.2.0",
7766
7784
  "resolved": "https://registry.npmjs.org/agora-extension-virtual-background/-/agora-extension-virtual-background-1.2.0.tgz",
@@ -35753,6 +35771,12 @@
35753
35771
  "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
35754
35772
  "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
35755
35773
  },
35774
+ "@react-native-assets/slider": {
35775
+ "version": "7.2.1",
35776
+ "resolved": "https://registry.npmjs.org/@react-native-assets/slider/-/slider-7.2.1.tgz",
35777
+ "integrity": "sha512-8n1IBQ6QSBMwL+GasCEgHctsjcJwpZ3eioTgL7nyOSteOnmDTsyNVjUU5zQ80YeZOvSWQTeIQ7g30ikfbK4t1A==",
35778
+ "requires": {}
35779
+ },
35756
35780
  "@react-native-async-storage/async-storage": {
35757
35781
  "version": "1.19.2",
35758
35782
  "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz",
@@ -38688,6 +38712,11 @@
38688
38712
  "integrity": "sha512-g4klzzz7IQblNt0c+gJ/DM7sa5oMZ/7GWE4c9aqs3snHRAo+CjDieT84iAc1KUhAiY84RrfhyFdtpvbbEoYBcA==",
38689
38713
  "requires": {}
38690
38714
  },
38715
+ "agora-extension-beauty-effect": {
38716
+ "version": "1.0.2-beta",
38717
+ "resolved": "https://registry.npmjs.org/agora-extension-beauty-effect/-/agora-extension-beauty-effect-1.0.2-beta.tgz",
38718
+ "integrity": "sha512-nCEznllqgZiLmyzvUF4RxWdHXuFrVUWYlKhyl3ianvfF/9DY2551QQBuiRv6uPVsy4TEEWMwBX91EwxPX7v4Ig=="
38719
+ },
38691
38720
  "agora-extension-virtual-background": {
38692
38721
  "version": "1.2.0",
38693
38722
  "resolved": "https://registry.npmjs.org/agora-extension-virtual-background/-/agora-extension-virtual-background-1.2.0.tgz",
@@ -54,6 +54,7 @@
54
54
  "@gorhom/bottom-sheet": "4.4.7",
55
55
  "@netless/react-native-whiteboard": "^0.0.14",
56
56
  "@openspacelabs/react-native-zoomable-view": "^2.1.1",
57
+ "@react-native-assets/slider": "^7.2.1",
57
58
  "@react-native-async-storage/async-storage": "1.19.2",
58
59
  "@react-native-community/checkbox": "0.5.16",
59
60
  "@react-native-community/clipboard": "1.5.1",
@@ -61,6 +62,7 @@
61
62
  "add": "^2.0.6",
62
63
  "agora-chat": "^1.2.1",
63
64
  "agora-extension-ai-denoiser": "1.1.0",
65
+ "agora-extension-beauty-effect": "^1.0.2-beta",
64
66
  "agora-extension-virtual-background": "^1.1.3",
65
67
  "agora-react-native-rtm": "1.5.1",
66
68
  "agora-rtc-sdk-ng": "4.20.1-1",
@@ -26,8 +26,8 @@ import {LogSource, logger} from './logger/AppBuilderLogger';
26
26
  import {isValidReactComponent} from './utils/common';
27
27
 
28
28
  function VideoCallWrapper(props) {
29
- const {isRecordingBotRoute} = useIsRecordingBot();
30
- return isRecordingBotRoute ? (
29
+ const {isRecordingBot} = useIsRecordingBot();
30
+ return isRecordingBot ? (
31
31
  <RecordingBotRoute history={props.history}>
32
32
  <VideoCall />
33
33
  </RecordingBotRoute>
@@ -35,6 +35,7 @@ import ToastComponent from './components/ToastComponent';
35
35
  import {ToastContext, ToastProvider} from './components/useToast';
36
36
  import {SdkApiContext} from './components/SdkApiContext';
37
37
  import isSDK from './utils/isSDK';
38
+ import BlockUI from './subComponents/BlockUI';
38
39
 
39
40
  interface AppWrapperProps {
40
41
  children: React.ReactNode;
@@ -85,6 +86,7 @@ const AppWrapper = (props: AppWrapperProps) => {
85
86
  // @ts-ignore textAlign not supported by TS definitions but is applied to web regardless
86
87
  style={[{flex: 1}, Platform.select({web: {textAlign: 'left'}})]}>
87
88
  <StatusBar hidden={true} />
89
+ <BlockUI />
88
90
  <StorageProvider>
89
91
  <LanguageProvider>
90
92
  <GraphQLProvider>
@@ -21,13 +21,21 @@ export interface AppBuilderSdkApiInterface {
21
21
  joinRoom: (
22
22
  roomDetails: string | meetingData,
23
23
  userName?: string,
24
- preference?: {disableShareTile: boolean},
24
+ preference?: {
25
+ disableShareTile: boolean;
26
+ showBeautyControls: boolean;
27
+ showQualityControls: boolean;
28
+ },
25
29
  ) => Promise<meetingData>;
26
30
  joinPrecall: (
27
31
  roomDetails: string | meetingData,
28
32
  userName?: string,
29
33
  skipPrecall?: boolean,
30
- preference?: {disableShareTile: boolean},
34
+ preference?: {
35
+ disableShareTile: boolean;
36
+ showBeautyControls: boolean;
37
+ showQualityControls: boolean;
38
+ },
31
39
  ) => Promise<
32
40
  [
33
41
  meetingData,
@@ -73,7 +81,7 @@ export const AppBuilderSdkApi: AppBuilderSdkApiInterface = {
73
81
  logger.log(LogSource.SDK, 'Event', 'emiting event for joinRoom - join', {
74
82
  room: roomDetails,
75
83
  userName: userName,
76
- preference: preference
84
+ preference: preference,
77
85
  });
78
86
  return await SDKMethodEventsManager.emit(
79
87
  'join',
@@ -87,7 +95,7 @@ export const AppBuilderSdkApi: AppBuilderSdkApiInterface = {
87
95
  logger.log(LogSource.SDK, 'Event', 'emiting event for joinPrecall - join', {
88
96
  room: roomDetails,
89
97
  userName: userName,
90
- preference: preference
98
+ preference: preference,
91
99
  });
92
100
  if (!$config.PRECALL) {
93
101
  logger.error(
@@ -0,0 +1,38 @@
1
+ import {type BeautyEffects} from 'customization-api';
2
+ import {useBeautyEffect} from '../components/beauty-effect/useBeautyEffects';
3
+ import {isWeb} from '../utils/common';
4
+
5
+ export interface BeautyEffectInterface {
6
+ isBeautyEffectsON: boolean;
7
+ beautyEffects: BeautyEffects;
8
+ applyBeautyEffect: (config: BeautyEffects) => void;
9
+ removeBeautyEffect: () => void;
10
+ }
11
+
12
+ export const useBeautyEffects: () => BeautyEffectInterface = () => {
13
+ const {
14
+ rednessLevel,
15
+ lighteningContrastLevel,
16
+ lighteningLevel,
17
+ smoothnessLevel,
18
+ sharpnessLevel,
19
+ applyBeautyEffect,
20
+ removeBeautyEffect,
21
+ beautyEffectsOn,
22
+ } = useBeautyEffect();
23
+
24
+ const beautyEffects = {
25
+ lighteningContrastLevel,
26
+ lighteningLevel,
27
+ smoothnessLevel,
28
+ sharpnessLevel,
29
+ rednessLevel,
30
+ };
31
+
32
+ return {
33
+ isBeautyEffectsON: beautyEffectsOn,
34
+ beautyEffects,
35
+ applyBeautyEffect,
36
+ removeBeautyEffect,
37
+ };
38
+ };