agora-appbuilder-core 4.0.0-api.7 → 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.
- package/package.json +3 -3
- package/template/_package-lock.json +5911 -4861
- package/template/agora-rn-uikit/.eslintrc.js +5 -0
- package/template/agora-rn-uikit/package.json +14 -14
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +41 -22
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +2 -2
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +90 -57
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +20 -16
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +10 -10
- package/template/agora-rn-uikit/src/Utils/isBotUser.ts +15 -0
- package/template/agora-rn-uikit/src/Utils/quality.tsx +8 -0
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +32 -16
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +25 -14
- package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +15 -9
- package/template/agora-rn-uikit/src/index.ts +1 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +73 -58
- package/template/bridge/rtc/webNg/{SurfaceView.tsx → RtcSurfaceView.tsx} +20 -26
- package/template/bridge/rtc/webNg/Types.ts +20 -5
- package/template/bridge/rtc/webNg/index.ts +9 -13
- package/template/customization-api/temp.ts +2 -2
- package/template/customization-api/typeDefinition.ts +1 -2
- package/template/customization-api/utils.ts +1 -2
- package/template/index.js +1 -0
- package/template/ios/HelloWorld/HelloWorldDebug.entitlements +10 -0
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +4 -0
- package/template/ios/Podfile +1 -1
- package/template/ios/Podfile.lock +72 -140
- package/template/package.json +5 -4
- package/template/src/App.tsx +58 -1
- package/template/src/AppRoutes.tsx +16 -3
- package/template/src/AppWrapper.tsx +21 -19
- package/template/src/components/Chat.tsx +17 -8
- package/template/src/components/ChatContext.ts +0 -2
- package/template/src/components/Controls.tsx +5 -5
- package/template/src/components/Controls1.native.tsx +7 -3
- package/template/src/components/DeviceConfigure.native.tsx +2 -2
- package/template/src/components/DeviceConfigure.tsx +2 -2
- package/template/src/components/EventsConfigure.tsx +13 -22
- package/template/src/components/GraphQLProvider.tsx +47 -30
- package/template/src/components/GridVideo.tsx +6 -2
- package/template/src/components/NetworkQualityContext.tsx +11 -5
- package/template/src/components/ParticipantsView.tsx +3 -3
- package/template/src/components/PinnedVideo.tsx +2 -2
- package/template/src/components/Precall.native.tsx +9 -6
- package/template/src/components/Precall.tsx +9 -6
- package/template/src/components/StorageContext.tsx +5 -2
- package/template/src/components/ToastComponent.tsx +7 -1
- package/template/src/components/contexts/LiveStreamDataContext.tsx +3 -3
- package/template/src/components/livestream/LiveStreamContext.tsx +42 -33
- package/template/src/components/livestream/Types.ts +2 -2
- package/template/src/components/participants/Participant.tsx +1 -1
- package/template/src/components/participants/UserActionMenuOptions.tsx +7 -2
- package/template/src/components/recording-bot/RecordingBotRoute.tsx +42 -0
- package/template/src/components/virtual-background/useVB.native.tsx +16 -19
- package/template/src/components/virtual-background/useVB.tsx +1 -1
- package/template/src/components/whiteboard/WhiteboardConfigure.native.tsx +11 -0
- package/template/src/components/whiteboard/WhiteboardConfigure.tsx +5 -0
- package/template/src/components/whiteboard/WhiteboardView.native.tsx +91 -12
- package/template/src/components/whiteboard/WhiteboardWidget.tsx +15 -4
- package/template/src/language/default-labels/precallScreenLabels.ts +5 -3
- package/template/src/language/default-labels/videoCallScreenLabels.ts +93 -41
- package/template/src/pages/VideoCall.tsx +39 -37
- package/template/src/pages/video-call/ActionSheetContent.tsx +4 -3
- package/template/src/pages/video-call/NameWithMicIcon.tsx +2 -1
- package/template/src/pages/video-call/VideoCallMobileView.tsx +26 -2
- package/template/src/pages/video-call/VideoCallScreen.tsx +32 -12
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +41 -0
- package/template/src/pages/video-call/VideoComponent.tsx +5 -2
- package/template/src/pages/video-call/VideoRenderer.tsx +55 -34
- package/template/src/rtm-events/constants.ts +0 -2
- package/template/src/subComponents/ChatBubble.tsx +2 -0
- package/template/src/subComponents/LocalAudioMute.tsx +8 -47
- package/template/src/subComponents/LocalEndCall.tsx +5 -52
- package/template/src/subComponents/LocalSwitchCamera.tsx +3 -3
- package/template/src/subComponents/LocalVideoMute.tsx +8 -50
- package/template/src/subComponents/SelectDevice.tsx +5 -2
- package/template/src/subComponents/SelectDeviceSettings.backup.tsx +9 -6
- package/template/src/subComponents/caption/Caption.tsx +12 -10
- package/template/src/subComponents/caption/Transcript.tsx +13 -10
- package/template/src/subComponents/caption/useTranscriptDownload.native.ts +11 -16
- package/template/src/subComponents/caption/utils.ts +1 -0
- package/template/src/subComponents/livestream/ApprovedLiveStreamControlsView.tsx +2 -2
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +3 -2
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +1 -1
- package/template/src/subComponents/recording/useIsRecordingBot.tsx +38 -0
- package/template/src/subComponents/recording/useRecording.tsx +176 -135
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +3 -3
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +1 -22
- package/template/src/utils/index.tsx +16 -5
- package/template/src/utils/useEndCall.ts +65 -0
- package/template/src/utils/useIsLocalUserSpeaking.ts +6 -1
- package/template/{bridge/rtc/webNg/LocalView.tsx → src/utils/useLocalAudio.ts} +24 -6
- package/template/src/utils/useMuteToggleLocal.ts +10 -5
- package/template/src/utils/useSearchParams.tsx +18 -0
- package/template/src/wasms/agora-virtual-background.wasm +0 -0
- package/template/src/utils/endCallEveryOne.ts +0 -7
- package/template/src/utils/useDisableButton.tsx +0 -37
|
@@ -13,7 +13,7 @@ import {useLocalUserInfo, useRtc} from 'customization-api';
|
|
|
13
13
|
import {useContext} from 'react';
|
|
14
14
|
import {
|
|
15
15
|
PropsContext,
|
|
16
|
-
|
|
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 ==
|
|
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
|
-
|
|
81
|
-
|
|
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
|
+
}
|
|
Binary file
|
|
@@ -1,37 +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 {useRoomInfo} from '../components/room-info/useRoomInfo';
|
|
13
|
-
import {controlMessageEnum} from '../components/ChatContext';
|
|
14
|
-
import events, {PersistanceLevel} from '../rtm-events-api';
|
|
15
|
-
import {MUTE_REMOTE_TYPE} from './useRemoteMute';
|
|
16
|
-
|
|
17
|
-
function useDisableButton() {
|
|
18
|
-
const {
|
|
19
|
-
data: {isHost},
|
|
20
|
-
} = useRoomInfo();
|
|
21
|
-
|
|
22
|
-
return async (type: MUTE_REMOTE_TYPE, action: boolean = true) => {
|
|
23
|
-
if (isHost) {
|
|
24
|
-
events.send(
|
|
25
|
-
controlMessageEnum.disableButton,
|
|
26
|
-
JSON.stringify({button: type, action}),
|
|
27
|
-
PersistanceLevel.None,
|
|
28
|
-
);
|
|
29
|
-
} else {
|
|
30
|
-
console.error(
|
|
31
|
-
'A host can only enable/disable participants video/audio button.',
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default useDisableButton;
|