agora-appbuilder-core 4.0.35-beta-2 → 4.0.36-1
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 +2 -2
- package/template/agora-rn-uikit/README.md +1 -40
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +1 -0
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +1 -0
- package/template/agora-rn-uikit/src/Reducer/Spotlight.ts +11 -0
- package/template/agora-rn-uikit/src/Reducer/index.ts +1 -0
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +7 -0
- package/template/customization-api/utils.ts +1 -0
- package/template/defaultConfig.js +3 -2
- package/template/global.d.ts +1 -0
- package/template/src/AppRoutes.tsx +9 -2
- package/template/src/assets/font-styles.css +4 -0
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/CustomIcon.tsx +1 -0
- package/template/src/auth/AuthProvider.tsx +20 -6
- package/template/src/components/ErrorBoundary.tsx +37 -0
- package/template/src/components/ErrorBoundaryFallback.tsx +44 -0
- package/template/src/components/SettingsView.tsx +1 -2
- package/template/src/components/participants/Participant.tsx +4 -0
- package/template/src/components/participants/UserActionMenuOptions.tsx +34 -1
- package/template/src/components/popups/InvitePopup.tsx +1 -10
- package/template/src/components/precall/joinCallBtn.native.tsx +0 -2
- package/template/src/components/precall/joinCallBtn.tsx +0 -3
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +0 -3
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +0 -3
- package/template/src/components/useUserPreference.tsx +1 -89
- package/template/src/language/default-labels/videoCallScreenLabels.ts +8 -0
- package/template/src/pages/Create.tsx +1 -10
- package/template/src/pages/Join.tsx +1 -10
- package/template/src/pages/VideoCall.tsx +28 -32
- package/template/src/pages/video-call/SpotlightHighlighter.tsx +91 -0
- package/template/src/pages/video-call/VideoRenderer.tsx +10 -1
- package/template/src/rtm-events/constants.ts +2 -0
- package/template/src/subComponents/recording/useRecording.tsx +1 -8
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +2 -16
- package/template/src/utils/index.tsx +3 -4
- package/template/src/utils/useCreateRoom.ts +1 -8
- package/template/src/utils/useGetMeetingPhrase.ts +1 -8
- package/template/src/utils/useJoinRoom.ts +1 -8
- package/template/src/utils/useMutePSTN.ts +1 -8
- package/template/src/utils/useSpotlight.ts +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agora-appbuilder-core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.36-1",
|
|
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/
|
|
12
|
+
"uikit": "rm -rf template/agora-rn-uikit && git clone https://github.com/AgoraIO-Community/appbuilder-ui-kit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout appbuilder-uikit-3.0.36",
|
|
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",
|
|
@@ -1,42 +1,3 @@
|
|
|
1
1
|
<div style="text-align:center">
|
|
2
|
-
<h1>
|
|
3
|
-
<h6>Rapidly integrate video calling into your React Native applications with built in UI Elements.</h6>
|
|
2
|
+
<h1> AppBuilder UIKit - Internal Usage</h1>
|
|
4
3
|
</div>
|
|
5
|
-
|
|
6
|
-
## Getting started
|
|
7
|
-
|
|
8
|
-
### Installation
|
|
9
|
-
|
|
10
|
-
To a react-native application generated using react-native-cli, add the following:
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
npm i react-native-agora agora-rn-uikit
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
### Usage
|
|
17
|
-
|
|
18
|
-
This UIKit is very simple to use and contains a high level component called `AgoraUIKit`.
|
|
19
|
-
|
|
20
|
-
**A simple sample app integrating Agora UI Kit:**
|
|
21
|
-
```javascript
|
|
22
|
-
import React, { useState } from 'react';
|
|
23
|
-
import AgoraUIKit from 'agora-rn-uikit';
|
|
24
|
-
|
|
25
|
-
const App = () => {
|
|
26
|
-
const [videoCall, setVideoCall] = useState(true);
|
|
27
|
-
const rtcProps = {
|
|
28
|
-
appId: '<-----App ID here----->',
|
|
29
|
-
channel: 'test',
|
|
30
|
-
};
|
|
31
|
-
const callbacks = {
|
|
32
|
-
EndCall: () => setVideoCall(false),
|
|
33
|
-
};
|
|
34
|
-
return videoCall ? (
|
|
35
|
-
<AgoraUIKit rtcProps={rtcProps} callbacks={callbacks} />
|
|
36
|
-
) : (
|
|
37
|
-
<></>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default App;
|
|
42
|
-
```
|
|
@@ -185,6 +185,7 @@ export interface CallbacksInterface {
|
|
|
185
185
|
AddCustomContent(uid: UidType, data: any): void;
|
|
186
186
|
RemoveCustomContent(uid: UidType): void;
|
|
187
187
|
UserPin(Uid: UidType): void;
|
|
188
|
+
Spotlight(Uid: UidType): void;
|
|
188
189
|
UserSecondaryPin(Uid: UidType): void;
|
|
189
190
|
ActiveSpeaker(Uid: UidType): void;
|
|
190
191
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {ActionType, ContentStateInterface} from '../Contexts/RtcContext';
|
|
2
|
+
|
|
3
|
+
export default function Spotlight(
|
|
4
|
+
state: ContentStateInterface,
|
|
5
|
+
action: ActionType<'Spotlight'>,
|
|
6
|
+
) {
|
|
7
|
+
return {
|
|
8
|
+
...state,
|
|
9
|
+
spotlightUid: action?.value && action.value?.length ? action.value[0] : 0,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -11,3 +11,4 @@ export {default as RemoteVideoStateChanged} from './RemoteVideoStateChanged';
|
|
|
11
11
|
export {default as UserPin} from './UserPin';
|
|
12
12
|
export {default as UserSecondaryPin} from './UserSecondaryPin';
|
|
13
13
|
export {default as ActiveSpeaker} from './ActiveSpeaker';
|
|
14
|
+
export {default as Spotlight} from './Spotlight';
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
UserPin,
|
|
33
33
|
UserSecondaryPin,
|
|
34
34
|
ActiveSpeaker,
|
|
35
|
+
Spotlight,
|
|
35
36
|
} from './Reducer';
|
|
36
37
|
import Create from './Rtc/Create';
|
|
37
38
|
import Join from './Rtc/Join';
|
|
@@ -260,6 +261,11 @@ const RtcConfigure = (outerProps: {children: React.ReactNode}) => {
|
|
|
260
261
|
stateUpdate = ActiveSpeaker(state, action);
|
|
261
262
|
}
|
|
262
263
|
break;
|
|
264
|
+
case 'Spotlight':
|
|
265
|
+
if (actionTypeGuard(action, action.type)) {
|
|
266
|
+
stateUpdate = Spotlight(state, action);
|
|
267
|
+
}
|
|
268
|
+
break;
|
|
263
269
|
}
|
|
264
270
|
|
|
265
271
|
// TODO: remove Handle event listeners
|
|
@@ -459,6 +465,7 @@ const RtcConfigure = (outerProps: {children: React.ReactNode}) => {
|
|
|
459
465
|
? uidState.secondaryPinnedUid
|
|
460
466
|
: undefined,
|
|
461
467
|
lastJoinedUid: uidState.lastJoinedUid,
|
|
468
|
+
spotlightUid: uidState.spotlightUid,
|
|
462
469
|
}}>
|
|
463
470
|
{outerProps.children}
|
|
464
471
|
</ContentProvider>
|
|
@@ -49,4 +49,5 @@ export {useFullScreen} from '../src/utils/useFullScreen';
|
|
|
49
49
|
export {useHideShareTitle} from '../src/utils/useHideShareTile';
|
|
50
50
|
export {useActionSheet} from '../src/utils/useActionSheet';
|
|
51
51
|
export {default as PlatformWrapper} from '../src/utils/PlatformWrapper';
|
|
52
|
+
export {useSpotlight} from '../src/utils/useSpotlight';
|
|
52
53
|
export {useActiveUids} from '../src/utils/useActiveUids';
|
|
@@ -76,11 +76,12 @@ const DefaultConfig = {
|
|
|
76
76
|
CHAT_ORG_NAME: '',
|
|
77
77
|
CHAT_APP_NAME: '',
|
|
78
78
|
CHAT_URL: '',
|
|
79
|
-
CLI_VERSION: '3.0.
|
|
80
|
-
CORE_VERSION: '4.0.
|
|
79
|
+
CLI_VERSION: '3.0.36-1',
|
|
80
|
+
CORE_VERSION: '4.0.36-1',
|
|
81
81
|
DISABLE_LANDSCAPE_MODE: false,
|
|
82
82
|
STT_AUTO_START: false,
|
|
83
83
|
CLOUD_RECORDING_AUTO_START: false,
|
|
84
|
+
ENABLE_SPOTLIGHT: false,
|
|
84
85
|
AUTO_CONNECT_RTM: false,
|
|
85
86
|
};
|
|
86
87
|
|
package/template/global.d.ts
CHANGED
|
@@ -24,16 +24,23 @@ import RecordingBotRoute from './components/recording-bot/RecordingBotRoute';
|
|
|
24
24
|
import {useIsRecordingBot} from './subComponents/recording/useIsRecordingBot';
|
|
25
25
|
import {LogSource, logger} from './logger/AppBuilderLogger';
|
|
26
26
|
import {isValidReactComponent} from './utils/common';
|
|
27
|
+
import ErrorBoundary from './components/ErrorBoundary';
|
|
28
|
+
import {ErrorBoundaryFallback} from './components/ErrorBoundaryFallback';
|
|
27
29
|
|
|
28
30
|
function VideoCallWrapper(props) {
|
|
29
31
|
const {isRecordingBot} = useIsRecordingBot();
|
|
32
|
+
const ErrorBoundaryFallbackComponent = <ErrorBoundaryFallback />;
|
|
30
33
|
return isRecordingBot ? (
|
|
31
34
|
<RecordingBotRoute history={props.history}>
|
|
32
|
-
<
|
|
35
|
+
<ErrorBoundary fallback={ErrorBoundaryFallbackComponent}>
|
|
36
|
+
<VideoCall />
|
|
37
|
+
</ErrorBoundary>
|
|
33
38
|
</RecordingBotRoute>
|
|
34
39
|
) : (
|
|
35
40
|
<AuthRoute>
|
|
36
|
-
<
|
|
41
|
+
<ErrorBoundary fallback={ErrorBoundaryFallbackComponent}>
|
|
42
|
+
<VideoCall />
|
|
43
|
+
</ErrorBoundary>
|
|
37
44
|
</AuthRoute>
|
|
38
45
|
);
|
|
39
46
|
}
|
|
Binary file
|