agora-appbuilder-core 4.0.0-api.8 → 4.0.0-api.9

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 (89) hide show
  1. package/package.json +3 -3
  2. package/template/_package-lock.json +5911 -4861
  3. package/template/agora-rn-uikit/.eslintrc.js +5 -0
  4. package/template/agora-rn-uikit/package.json +14 -14
  5. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +41 -22
  6. package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +2 -2
  7. package/template/agora-rn-uikit/src/Rtc/Create.tsx +90 -57
  8. package/template/agora-rn-uikit/src/Rtc/Join.tsx +20 -16
  9. package/template/agora-rn-uikit/src/RtcConfigure.tsx +10 -10
  10. package/template/agora-rn-uikit/src/Utils/isBotUser.ts +15 -0
  11. package/template/agora-rn-uikit/src/Utils/quality.tsx +8 -0
  12. package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +32 -16
  13. package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +25 -14
  14. package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +15 -9
  15. package/template/agora-rn-uikit/src/index.ts +1 -1
  16. package/template/bridge/rtc/webNg/RtcEngine.ts +73 -58
  17. package/template/bridge/rtc/webNg/{SurfaceView.tsx → RtcSurfaceView.tsx} +20 -26
  18. package/template/bridge/rtc/webNg/Types.ts +20 -5
  19. package/template/bridge/rtc/webNg/index.ts +9 -13
  20. package/template/index.js +1 -0
  21. package/template/ios/HelloWorld/HelloWorldDebug.entitlements +10 -0
  22. package/template/ios/HelloWorld.xcodeproj/project.pbxproj +4 -0
  23. package/template/ios/Podfile +1 -1
  24. package/template/ios/Podfile.lock +72 -140
  25. package/template/package.json +5 -4
  26. package/template/src/App.tsx +58 -1
  27. package/template/src/AppRoutes.tsx +16 -3
  28. package/template/src/AppWrapper.tsx +21 -19
  29. package/template/src/components/Chat.tsx +17 -8
  30. package/template/src/components/Controls.tsx +5 -5
  31. package/template/src/components/Controls1.native.tsx +7 -3
  32. package/template/src/components/DeviceConfigure.native.tsx +2 -2
  33. package/template/src/components/DeviceConfigure.tsx +2 -2
  34. package/template/src/components/EventsConfigure.tsx +10 -4
  35. package/template/src/components/GraphQLProvider.tsx +47 -30
  36. package/template/src/components/GridVideo.tsx +6 -2
  37. package/template/src/components/NetworkQualityContext.tsx +11 -5
  38. package/template/src/components/ParticipantsView.tsx +3 -3
  39. package/template/src/components/PinnedVideo.tsx +2 -2
  40. package/template/src/components/Precall.native.tsx +9 -6
  41. package/template/src/components/Precall.tsx +9 -6
  42. package/template/src/components/StorageContext.tsx +5 -2
  43. package/template/src/components/ToastComponent.tsx +7 -1
  44. package/template/src/components/contexts/LiveStreamDataContext.tsx +3 -3
  45. package/template/src/components/livestream/LiveStreamContext.tsx +42 -33
  46. package/template/src/components/livestream/Types.ts +2 -2
  47. package/template/src/components/participants/Participant.tsx +1 -1
  48. package/template/src/components/participants/UserActionMenuOptions.tsx +7 -2
  49. package/template/src/components/recording-bot/RecordingBotRoute.tsx +42 -0
  50. package/template/src/components/virtual-background/useVB.native.tsx +16 -19
  51. package/template/src/components/virtual-background/useVB.tsx +1 -1
  52. package/template/src/components/whiteboard/WhiteboardConfigure.native.tsx +11 -0
  53. package/template/src/components/whiteboard/WhiteboardConfigure.tsx +5 -0
  54. package/template/src/components/whiteboard/WhiteboardView.native.tsx +91 -12
  55. package/template/src/components/whiteboard/WhiteboardWidget.tsx +15 -4
  56. package/template/src/language/default-labels/precallScreenLabels.ts +5 -3
  57. package/template/src/language/default-labels/videoCallScreenLabels.ts +93 -41
  58. package/template/src/pages/VideoCall.tsx +32 -18
  59. package/template/src/pages/video-call/ActionSheetContent.tsx +4 -3
  60. package/template/src/pages/video-call/NameWithMicIcon.tsx +2 -1
  61. package/template/src/pages/video-call/VideoCallMobileView.tsx +26 -2
  62. package/template/src/pages/video-call/VideoCallScreen.tsx +32 -12
  63. package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +41 -0
  64. package/template/src/pages/video-call/VideoComponent.tsx +5 -2
  65. package/template/src/pages/video-call/VideoRenderer.tsx +55 -34
  66. package/template/src/rtm-events/constants.ts +0 -2
  67. package/template/src/subComponents/ChatBubble.tsx +2 -0
  68. package/template/src/subComponents/LocalAudioMute.tsx +6 -5
  69. package/template/src/subComponents/LocalSwitchCamera.tsx +3 -3
  70. package/template/src/subComponents/LocalVideoMute.tsx +6 -5
  71. package/template/src/subComponents/SelectDevice.tsx +5 -2
  72. package/template/src/subComponents/SelectDeviceSettings.backup.tsx +9 -6
  73. package/template/src/subComponents/caption/Caption.tsx +12 -10
  74. package/template/src/subComponents/caption/Transcript.tsx +13 -10
  75. package/template/src/subComponents/caption/useTranscriptDownload.native.ts +11 -16
  76. package/template/src/subComponents/caption/utils.ts +1 -0
  77. package/template/src/subComponents/livestream/ApprovedLiveStreamControlsView.tsx +2 -2
  78. package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +3 -2
  79. package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +1 -1
  80. package/template/src/subComponents/recording/useIsRecordingBot.tsx +38 -0
  81. package/template/src/subComponents/recording/useRecording.tsx +176 -135
  82. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +3 -3
  83. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +1 -22
  84. package/template/src/utils/index.tsx +16 -5
  85. package/template/src/utils/useIsLocalUserSpeaking.ts +6 -1
  86. package/template/src/utils/useMuteToggleLocal.ts +10 -5
  87. package/template/src/utils/useSearchParams.tsx +18 -0
  88. package/template/src/wasms/agora-virtual-background.wasm +0 -0
  89. package/template/bridge/rtc/webNg/LocalView.tsx +0 -20
@@ -13,7 +13,7 @@ import {useLocalUserInfo, useRtc} from 'customization-api';
13
13
  import {useContext} from 'react';
14
14
  import {
15
15
  PropsContext,
16
- ClientRole,
16
+ ClientRoleType,
17
17
  ToggleState,
18
18
  DispatchContext,
19
19
  } from '../../agora-rn-uikit';
@@ -33,7 +33,7 @@ function useMuteToggleLocal() {
33
33
  const local = useLocalUserInfo();
34
34
  const isLiveStream = $config.EVENT_MODE;
35
35
  const {rtcProps} = useContext(PropsContext);
36
- const isBroadCasting = rtcProps?.role == ClientRole.Broadcaster;
36
+ const isBroadCasting = rtcProps?.role == ClientRoleType.ClientRoleBroadcaster;
37
37
 
38
38
  const {videoMuteQueue, audioMuteQueue} = useContext(SdkMuteQueueContext);
39
39
 
@@ -77,9 +77,14 @@ function useMuteToggleLocal() {
77
77
  });
78
78
 
79
79
  try {
80
- await RtcEngineUnsafe.muteLocalAudioStream(
81
- localAudioState === ToggleState.enabled,
82
- );
80
+ isWebInternal()
81
+ ? await RtcEngineUnsafe.muteLocalAudioStream(
82
+ localAudioState === ToggleState.enabled,
83
+ ) //@ts-ignore
84
+ : await RtcEngineUnsafe.enableLocalAudio(
85
+ localAudioState === ToggleState.enabled ? false : true,
86
+ );
87
+
83
88
  // Enable UI
84
89
  dispatch({
85
90
  type: 'LocalMuteAudio',
@@ -0,0 +1,18 @@
1
+ import {useLocation} from '../components/Router';
2
+ import {useMemo} from 'react';
3
+
4
+ interface ReadOnlyURLSearchParams extends URLSearchParams {
5
+ append: never;
6
+ set: never;
7
+ delete: never;
8
+ sort: never;
9
+ }
10
+
11
+ export function useSearchParams() {
12
+ const {search} = useLocation();
13
+
14
+ return useMemo(
15
+ () => new URLSearchParams(search) as ReadOnlyURLSearchParams,
16
+ [search],
17
+ );
18
+ }
@@ -1,20 +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 SurfaceView, {RtcSurfaceViewProps, StyleProps} from './SurfaceView';
14
-
15
- interface LocalViewInterface extends RtcSurfaceViewProps, StyleProps {}
16
-
17
- export default function LocalView(props: LocalViewInterface) {
18
- // console.log('LocalView props: ', props);
19
- return <SurfaceView uid={0} {...props} />;
20
- }