agora-appbuilder-core 4.1.22-beta.2 → 4.1.22-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.
Files changed (43) hide show
  1. package/package.json +2 -2
  2. package/template/.eslintrc.js +20 -0
  3. package/template/.prettierrc.js +18 -0
  4. package/template/.watchmanconfig +1 -0
  5. package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +2 -0
  6. package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +12 -2
  7. package/template/bridge/rtc/webNg/RtcEngine.ts +639 -251
  8. package/template/bridge/rtc/webNg/RtcSurfaceView.tsx +203 -16
  9. package/template/bridge/rtc/webNg/__tests__/screenshareLifecycle.test.ts +358 -0
  10. package/template/bridge/rtc/webNg/__tests__/screenshareMediaHealth.test.ts +49 -0
  11. package/template/bridge/rtc/webNg/screenshareMediaHealth.ts +49 -0
  12. package/template/bridge/rtm/web/index.ts +22 -31
  13. package/template/config.json +101 -0
  14. package/template/customization-api/atoms.ts +0 -2
  15. package/template/customization-api/customEvents.ts +1 -4
  16. package/template/customization-api/index.ts +0 -1
  17. package/template/customization-api/typeDefinition.ts +1 -6
  18. package/template/defaultConfig.js +2 -2
  19. package/template/src/components/Controls.tsx +12 -6
  20. package/template/src/components/CustomSidePanel.tsx +13 -13
  21. package/template/src/components/RTMConfigure.tsx +0 -14
  22. package/template/src/components/participants/UserActionMenuOptions.tsx +1 -28
  23. package/template/src/logger/transports/__tests__/agora-transport.test.ts +48 -0
  24. package/template/src/logger/transports/agora-transport.ts +18 -6
  25. package/template/src/pages/Create.tsx +19 -31
  26. package/template/src/pages/video-call/ActionSheet.native.tsx +0 -2
  27. package/template/src/pages/video-call/ActionSheet.tsx +0 -2
  28. package/template/src/pages/video-call/ActionSheetHandle.tsx +0 -1
  29. package/template/src/pages/video-call/SidePanelHeader.tsx +1 -3
  30. package/template/src/pages/video-call/VideoCallScreen.tsx +0 -3
  31. package/template/src/pages/video-call/VideoRenderer.tsx +0 -4
  32. package/template/src/rtm-events-api/Events.ts +3 -1
  33. package/template/src/rtm-events-api/__tests__/Events.test.ts +55 -0
  34. package/template/src/subComponents/SidePanelHeader.tsx +2 -16
  35. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +38 -4
  36. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +280 -34
  37. package/template/src/subComponents/screenshare/__tests__/screenshareJourney.test.ts +10 -0
  38. package/template/src/subComponents/screenshare/__tests__/screenshareOperation.test.ts +31 -0
  39. package/template/src/subComponents/screenshare/screenshareJourney.ts +6 -0
  40. package/template/src/subComponents/screenshare/screenshareOperation.ts +21 -0
  41. package/template/src/subComponents/screenshare/useScreenshare.tsx +8 -0
  42. package/template/theme.json +91 -0
  43. package/template/customization-api/ai-agent.ts +0 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-appbuilder-core",
3
- "version": "4.1.22-beta.2",
3
+ "version": "4.1.22-beta.3",
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/appbuilder-ui-kit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout appbuilder-uikit-3.1.11",
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.1.22",
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",
@@ -0,0 +1,20 @@
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
+ module.exports = {
13
+ root: true,
14
+ extends: '@react-native',
15
+ parser: '@typescript-eslint/parser',
16
+ plugins: ['@typescript-eslint'],
17
+ globals: {
18
+ $config: true,
19
+ },
20
+ };
@@ -0,0 +1,18 @@
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
+ module.exports = {
13
+ arrowParens: 'avoid',
14
+ bracketSameLine: true,
15
+ bracketSpacing: false,
16
+ singleQuote: true,
17
+ trailingComma: 'all',
18
+ };
@@ -0,0 +1 @@
1
+ {}
@@ -46,6 +46,7 @@ const MaxVideoView: React.FC<MaxViewInterface> = (props) => {
46
46
  ? RenderModeType.RenderModeAdaptive
47
47
  : RenderModeType.RenderModeFit,
48
48
  uid: 0,
49
+ isScreenshare: props?.user?.type === 'screenshare',
49
50
  }}
50
51
  />
51
52
  ) : Fallback ? (
@@ -68,6 +69,7 @@ const MaxVideoView: React.FC<MaxViewInterface> = (props) => {
68
69
  canvas={{
69
70
  renderMode: RenderModeType.RenderModeFit,
70
71
  uid: uid as number,
72
+ isScreenshare: props?.user?.type === 'screenshare',
71
73
  }}
72
74
  />
73
75
  </div>
@@ -35,7 +35,11 @@ const MinVideoView: React.FC<MinViewInterface> = (props) => {
35
35
  props.user.video ? (
36
36
  <LocalView
37
37
  style={{...styles.minView, ...(minViewStyles as object)}}
38
- canvas={{renderMode: RenderModeType.RenderModeHidden, uid: 0}}
38
+ canvas={{
39
+ renderMode: RenderModeType.RenderModeHidden,
40
+ uid: 0,
41
+ isScreenshare: props?.user?.type === 'screenshare',
42
+ }}
39
43
  zOrderMediaOverlay={true}
40
44
  />
41
45
  ) : (
@@ -54,6 +58,7 @@ const MinVideoView: React.FC<MinViewInterface> = (props) => {
54
58
  canvas={{
55
59
  renderMode: RenderModeType.RenderModeHidden,
56
60
  uid: uid as number,
61
+ isScreenshare: props?.user?.type === 'screenshare',
57
62
  }}
58
63
  zOrderMediaOverlay={true}
59
64
  />
@@ -62,7 +67,11 @@ const MinVideoView: React.FC<MinViewInterface> = (props) => {
62
67
  ) : uid === localUid ? (
63
68
  <LocalView
64
69
  style={{...styles.minView, ...(minViewStyles as object)}}
65
- canvas={{renderMode: RenderModeType.RenderModeHidden, uid: 0}}
70
+ canvas={{
71
+ renderMode: RenderModeType.RenderModeHidden,
72
+ uid: 0,
73
+ isScreenshare: props?.user?.type === 'screenshare',
74
+ }}
66
75
  zOrderMediaOverlay={true}
67
76
  />
68
77
  ) : (
@@ -71,6 +80,7 @@ const MinVideoView: React.FC<MinViewInterface> = (props) => {
71
80
  canvas={{
72
81
  renderMode: RenderModeType.RenderModeHidden,
73
82
  uid: uid as number,
83
+ isScreenshare: props?.user?.type === 'screenshare',
74
84
  }}
75
85
  zOrderMediaOverlay={true}
76
86
  />