agora-appbuilder-core 4.0.32 → 4.0.33-beta-3

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.32",
3
+ "version": "4.0.33-beta-3",
4
4
  "description": "React Native template for RTE app builder",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -11,7 +11,7 @@
11
11
  "vercel-build": "npm run dev-setup && cd template && npm run web:build && cd .. && npm run copy-vercel",
12
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 appbuilder-uikit-3.0.29",
13
13
  "deps": "cd template && npm i --force",
14
- "dev-setup": "npm run uikit && npm run deps && node devSetup.js",
14
+ "dev-setup": "npm run deps && node devSetup.js",
15
15
  "web-build": "cd template && npm run web:build && cd .. && npm run copy-vercel",
16
16
  "copy-vercel": "cp -r Builds/web template/dist && cp vercel.json template/dist",
17
17
  "pre-release": "cd template && cp _package-lock.json package-lock.json"
@@ -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
  }
@@ -33,6 +33,7 @@ export interface ContentStateInterface {
33
33
  pinnedUid?: UidType;
34
34
  secondaryPinnedUid?: UidType;
35
35
  lastJoinedUid?: UidType;
36
+ spotlightUid?: UidType;
36
37
  }
37
38
 
38
39
  export interface ActionInterface<T extends keyof CallbacksInterface> {
@@ -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,3 +49,4 @@ 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';
@@ -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.32',
80
- CORE_VERSION: '4.0.32',
79
+ CLI_VERSION: '3.0.33-beta-3',
80
+ CORE_VERSION: '4.0.33-beta-3',
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
  };
85
86
 
86
87
  module.exports = DefaultConfig;
@@ -168,6 +168,7 @@ interface ConfigInterface {
168
168
  DISABLE_LANDSCAPE_MODE: boolean;
169
169
  STT_AUTO_START: boolean;
170
170
  CLOUD_RECORDING_AUTO_START: boolean;
171
+ ENABLE_SPOTLIGHT: boolean;
171
172
  }
172
173
  declare var $config: ConfigInterface;
173
174
  declare module 'customization' {
@@ -24,6 +24,10 @@
24
24
  -moz-osx-font-smoothing: grayscale;
25
25
  }
26
26
 
27
+ .icon-spotlight:before {
28
+ content: '\e9a3';
29
+ color: #fff;
30
+ }
27
31
  .icon-clipboard_outlined:before {
28
32
  content: '\e9a2';
29
33
  }