agora-appbuilder-core 4.0.0-beta.75 → 4.0.0-beta.77
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 +44 -7
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +4 -0
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +5 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +21 -4
- package/template/configTransform.js +4 -4
- package/template/defaultConfig.js +2 -0
- package/template/global.d.ts +2 -0
- package/template/ios/HelloWorld/HelloWorldDebug.entitlements +10 -0
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +4 -0
- package/template/ios/Podfile.lock +25 -0
- package/template/package.json +1 -1
- package/template/src/components/PinnedVideo.tsx +5 -3
- package/template/src/components/StorageContext.tsx +4 -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/videoCallScreenLabels.ts +6 -0
- package/template/src/pages/VideoCall.tsx +49 -2
- package/template/src/pages/video-call/VideoCallMobileView.tsx +26 -2
- package/template/src/pages/video-call/VideoRenderer.tsx +48 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agora-appbuilder-core",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.77",
|
|
4
4
|
"description": "React Native template for RTE app builder",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -9,8 +9,8 @@
|
|
|
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/ReactNative-UIKit.git template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout v3-release-
|
|
13
|
-
"deps": "cd template && npm i",
|
|
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 v3-release-geo-fencing",
|
|
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",
|
|
16
16
|
"copy-vercel": "cp -r Builds/web template/dist && cp vercel.json template/dist",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"react-native-vector-icons": "9.2.0",
|
|
58
58
|
"react-native-walkthrough-tooltip": "1.4.0",
|
|
59
59
|
"react-native-web": "0.19.7",
|
|
60
|
-
"react-native-webview": "
|
|
60
|
+
"react-native-webview": "13.8.1",
|
|
61
61
|
"react-router-dom": "5.2.0",
|
|
62
62
|
"react-router-native": "5.2.0",
|
|
63
63
|
"react-spring-bottom-sheet": "3.4.1",
|
|
@@ -3624,6 +3624,27 @@
|
|
|
3624
3624
|
"react-native-webview": "^11.22.2"
|
|
3625
3625
|
}
|
|
3626
3626
|
},
|
|
3627
|
+
"node_modules/@netless/react-native-bridge/node_modules/escape-string-regexp": {
|
|
3628
|
+
"version": "2.0.0",
|
|
3629
|
+
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
|
3630
|
+
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
|
|
3631
|
+
"engines": {
|
|
3632
|
+
"node": ">=8"
|
|
3633
|
+
}
|
|
3634
|
+
},
|
|
3635
|
+
"node_modules/@netless/react-native-bridge/node_modules/react-native-webview": {
|
|
3636
|
+
"version": "11.26.1",
|
|
3637
|
+
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.26.1.tgz",
|
|
3638
|
+
"integrity": "sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw==",
|
|
3639
|
+
"dependencies": {
|
|
3640
|
+
"escape-string-regexp": "2.0.0",
|
|
3641
|
+
"invariant": "2.2.4"
|
|
3642
|
+
},
|
|
3643
|
+
"peerDependencies": {
|
|
3644
|
+
"react": "*",
|
|
3645
|
+
"react-native": "*"
|
|
3646
|
+
}
|
|
3647
|
+
},
|
|
3627
3648
|
"node_modules/@netless/react-native-whiteboard": {
|
|
3628
3649
|
"version": "0.0.14",
|
|
3629
3650
|
"resolved": "https://registry.npmjs.org/@netless/react-native-whiteboard/-/react-native-whiteboard-0.0.14.tgz",
|
|
@@ -26542,9 +26563,9 @@
|
|
|
26542
26563
|
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
|
|
26543
26564
|
},
|
|
26544
26565
|
"node_modules/react-native-webview": {
|
|
26545
|
-
"version": "
|
|
26546
|
-
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-
|
|
26547
|
-
"integrity": "sha512-
|
|
26566
|
+
"version": "13.8.1",
|
|
26567
|
+
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-13.8.1.tgz",
|
|
26568
|
+
"integrity": "sha512-7Jqm1WzWJrOWraBAXQfKtr/Uo5Jw/IJHzC40jYLwgV/eVGmLJ9BpGKw6QVw7wpRkjmTZ2Typ4B1aHJLJJQFslA==",
|
|
26548
26569
|
"dependencies": {
|
|
26549
26570
|
"escape-string-regexp": "2.0.0",
|
|
26550
26571
|
"invariant": "2.2.4"
|
|
@@ -34667,6 +34688,22 @@
|
|
|
34667
34688
|
"@netless/webview-bridge": "^*",
|
|
34668
34689
|
"react-native-uuid": "^2.0.1",
|
|
34669
34690
|
"react-native-webview": "^11.22.2"
|
|
34691
|
+
},
|
|
34692
|
+
"dependencies": {
|
|
34693
|
+
"escape-string-regexp": {
|
|
34694
|
+
"version": "2.0.0",
|
|
34695
|
+
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
|
|
34696
|
+
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
|
|
34697
|
+
},
|
|
34698
|
+
"react-native-webview": {
|
|
34699
|
+
"version": "11.26.1",
|
|
34700
|
+
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.26.1.tgz",
|
|
34701
|
+
"integrity": "sha512-hC7BkxOpf+z0UKhxFSFTPAM4shQzYmZHoELa6/8a/MspcjEP7ukYKpuSUTLDywQditT8yI9idfcKvfZDKQExGw==",
|
|
34702
|
+
"requires": {
|
|
34703
|
+
"escape-string-regexp": "2.0.0",
|
|
34704
|
+
"invariant": "2.2.4"
|
|
34705
|
+
}
|
|
34706
|
+
}
|
|
34670
34707
|
}
|
|
34671
34708
|
},
|
|
34672
34709
|
"@netless/react-native-whiteboard": {
|
|
@@ -51997,9 +52034,9 @@
|
|
|
51997
52034
|
}
|
|
51998
52035
|
},
|
|
51999
52036
|
"react-native-webview": {
|
|
52000
|
-
"version": "
|
|
52001
|
-
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-
|
|
52002
|
-
"integrity": "sha512-
|
|
52037
|
+
"version": "13.8.1",
|
|
52038
|
+
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-13.8.1.tgz",
|
|
52039
|
+
"integrity": "sha512-7Jqm1WzWJrOWraBAXQfKtr/Uo5Jw/IJHzC40jYLwgV/eVGmLJ9BpGKw6QVw7wpRkjmTZ2Typ4B1aHJLJJQFslA==",
|
|
52003
52040
|
"requires": {
|
|
52004
52041
|
"escape-string-regexp": "2.0.0",
|
|
52005
52042
|
"invariant": "2.2.4"
|
|
@@ -129,6 +129,8 @@ export interface RtcPropsInterface {
|
|
|
129
129
|
// useBeforeCreate?: () => () => Promise<void>;
|
|
130
130
|
// };
|
|
131
131
|
geoFencing?: boolean;
|
|
132
|
+
geoFencingIncludeArea?: number;
|
|
133
|
+
geoFencingExcludeArea?: number;
|
|
132
134
|
audioRoom?: boolean;
|
|
133
135
|
activeSpeaker?: boolean;
|
|
134
136
|
preventJoin?: boolean;
|
|
@@ -180,6 +182,8 @@ const initialValue: Partial<PropsInterface> = {
|
|
|
180
182
|
appId: '',
|
|
181
183
|
channel: '',
|
|
182
184
|
geoFencing: true,
|
|
185
|
+
geoFencingIncludeArea: -1,
|
|
186
|
+
geoFencingExcludeArea: 0,
|
|
183
187
|
audioRoom: false,
|
|
184
188
|
preventJoin: true,
|
|
185
189
|
},
|
|
@@ -32,6 +32,8 @@ const Create = ({
|
|
|
32
32
|
const {callbacks, rtcProps, mode} = useContext(PropsContext);
|
|
33
33
|
const {
|
|
34
34
|
geoFencing = true,
|
|
35
|
+
geoFencingIncludeArea = -1,
|
|
36
|
+
geoFencingExcludeArea = 0,
|
|
35
37
|
audioRoom = false,
|
|
36
38
|
activeSpeaker = false,
|
|
37
39
|
} = rtcProps || {};
|
|
@@ -223,7 +225,9 @@ const Create = ({
|
|
|
223
225
|
rtcProps?.appId,
|
|
224
226
|
// eslint-disable-next-line no-bitwise
|
|
225
227
|
//@ts-ignore
|
|
226
|
-
|
|
228
|
+
geoFencingExcludeArea === 0
|
|
229
|
+
? geoFencingIncludeArea
|
|
230
|
+
: geoFencingIncludeArea ^ geoFencingExcludeArea,
|
|
227
231
|
);
|
|
228
232
|
}
|
|
229
233
|
} else {
|
|
@@ -171,10 +171,27 @@ interface RemoteStream {
|
|
|
171
171
|
video?: IRemoteVideoTrack;
|
|
172
172
|
}
|
|
173
173
|
if ($config.GEO_FENCING) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
let includeArea = $config.GEO_FENCING_INCLUDE_AREA
|
|
175
|
+
? $config.GEO_FENCING_INCLUDE_AREA
|
|
176
|
+
: AREAS.GLOBAL;
|
|
177
|
+
let excludeArea = $config.GEO_FENCING_EXCLUDE_AREA
|
|
178
|
+
? $config.GEO_FENCING_EXCLUDE_AREA
|
|
179
|
+
: '';
|
|
180
|
+
|
|
181
|
+
try {
|
|
182
|
+
if (excludeArea) {
|
|
183
|
+
AgoraRTC.setArea({
|
|
184
|
+
areaCode: includeArea,
|
|
185
|
+
excludedArea: excludeArea,
|
|
186
|
+
});
|
|
187
|
+
} else {
|
|
188
|
+
AgoraRTC.setArea({
|
|
189
|
+
areaCode: includeArea,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
} catch (setAeraError) {
|
|
193
|
+
console.log('error on setArea', setAeraError);
|
|
194
|
+
}
|
|
178
195
|
}
|
|
179
196
|
|
|
180
197
|
if ($config.LOG_ENABLED) {
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
let jsonFile = require('./config.json');
|
|
13
13
|
let PREFIX = '$config';
|
|
14
14
|
let config = {};
|
|
15
|
-
Object.keys(jsonFile).map(
|
|
15
|
+
Object.keys(jsonFile).map(key => {
|
|
16
16
|
config[`${PREFIX}.${key}`] = jsonFile[key];
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
//find any missing config
|
|
20
20
|
const defaultConfig = require('./defaultConfig');
|
|
21
21
|
const filteredArray = Object.keys(defaultConfig).filter(
|
|
22
|
-
|
|
22
|
+
value => !Object.keys(jsonFile).includes(value),
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
//add missing config with default value
|
|
26
26
|
if (filteredArray && filteredArray?.length) {
|
|
27
|
-
console.error('config.json missing ', filteredArray);
|
|
28
|
-
filteredArray.forEach(
|
|
27
|
+
//console.error('config.json missing ', filteredArray);
|
|
28
|
+
filteredArray.forEach(i => {
|
|
29
29
|
config[`${PREFIX}.${i}`] = defaultConfig[i];
|
|
30
30
|
});
|
|
31
31
|
}
|
package/template/global.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ interface ConfigInterface {
|
|
|
69
69
|
EVENT_MODE: boolean;
|
|
70
70
|
RAISE_HAND: boolean;
|
|
71
71
|
GEO_FENCING: boolean;
|
|
72
|
+
GEO_FENCING_INCLUDE_AREA: string;
|
|
73
|
+
GEO_FENCING_EXCLUDE_AREA: string;
|
|
72
74
|
LOG_ENABLED: boolean;
|
|
73
75
|
AUDIO_ROOM: boolean;
|
|
74
76
|
PRIMARY_ACTION_BRAND_COLOR: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>com.apple.developer.associated-domains</key>
|
|
6
|
+
<array>
|
|
7
|
+
<string>applinks:FRONTEND_ENDPOINT_BASE</string>
|
|
8
|
+
</array>
|
|
9
|
+
</dict>
|
|
10
|
+
</plist>
|
|
@@ -570,6 +570,7 @@
|
|
|
570
570
|
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
|
|
571
571
|
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
|
|
572
572
|
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
|
|
573
|
+
"${PODS_CONFIGURATION_BUILD_DIR}/react-native-whiteboard/Whiteboard.bundle",
|
|
573
574
|
);
|
|
574
575
|
name = "[CP] Copy Pods Resources";
|
|
575
576
|
outputPaths = (
|
|
@@ -591,6 +592,7 @@
|
|
|
591
592
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
|
|
592
593
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
|
|
593
594
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
|
|
595
|
+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Whiteboard.bundle",
|
|
594
596
|
);
|
|
595
597
|
runOnlyForDeploymentPostprocessing = 0;
|
|
596
598
|
shellPath = /bin/sh;
|
|
@@ -722,6 +724,7 @@
|
|
|
722
724
|
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
|
|
723
725
|
"${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
|
|
724
726
|
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
|
|
727
|
+
"${PODS_CONFIGURATION_BUILD_DIR}/react-native-whiteboard/Whiteboard.bundle",
|
|
725
728
|
);
|
|
726
729
|
name = "[CP] Copy Pods Resources";
|
|
727
730
|
outputPaths = (
|
|
@@ -743,6 +746,7 @@
|
|
|
743
746
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
|
|
744
747
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
|
|
745
748
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
|
|
749
|
+
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Whiteboard.bundle",
|
|
746
750
|
);
|
|
747
751
|
runOnlyForDeploymentPostprocessing = 0;
|
|
748
752
|
shellPath = /bin/sh;
|
|
@@ -408,8 +408,15 @@ PODS:
|
|
|
408
408
|
- react-native-agora (3.7.2-rc.3):
|
|
409
409
|
- AgoraRtcEngine_Special_iOS (= 3.7.2.4)
|
|
410
410
|
- React-Core
|
|
411
|
+
- react-native-document-picker (9.1.0):
|
|
412
|
+
- React-Core
|
|
411
413
|
- react-native-keep-awake (4.0.0):
|
|
412
414
|
- React
|
|
415
|
+
- react-native-webview (13.8.1):
|
|
416
|
+
- RCT-Folly (= 2021.07.22.00)
|
|
417
|
+
- React-Core
|
|
418
|
+
- react-native-whiteboard (0.0.14):
|
|
419
|
+
- React-Core
|
|
413
420
|
- React-NativeModulesApple (0.72.4):
|
|
414
421
|
- hermes-engine
|
|
415
422
|
- React-callinvoker
|
|
@@ -535,6 +542,8 @@ PODS:
|
|
|
535
542
|
- React-Core
|
|
536
543
|
- RNExitApp (1.1.0):
|
|
537
544
|
- React
|
|
545
|
+
- RNFS (2.20.0):
|
|
546
|
+
- React-Core
|
|
538
547
|
- RNGestureHandler (2.8.0):
|
|
539
548
|
- React-Core
|
|
540
549
|
- RNInAppBrowser (3.5.1):
|
|
@@ -628,7 +637,10 @@ DEPENDENCIES:
|
|
|
628
637
|
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
|
629
638
|
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
|
|
630
639
|
- react-native-agora (from `../node_modules/react-native-agora`)
|
|
640
|
+
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
|
|
631
641
|
- react-native-keep-awake (from `../node_modules/react-native-keep-awake`)
|
|
642
|
+
- react-native-webview (from `../node_modules/react-native-webview`)
|
|
643
|
+
- "react-native-whiteboard (from `../node_modules/@netless/react-native-whiteboard`)"
|
|
632
644
|
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
|
|
633
645
|
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
|
|
634
646
|
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
|
@@ -652,6 +664,7 @@ DEPENDENCIES:
|
|
|
652
664
|
- "RNCCheckbox (from `../node_modules/@react-native-community/checkbox`)"
|
|
653
665
|
- "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)"
|
|
654
666
|
- RNExitApp (from `../node_modules/react-native-exit-app`)
|
|
667
|
+
- RNFS (from `../node_modules/react-native-fs`)
|
|
655
668
|
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
|
|
656
669
|
- RNInAppBrowser (from `../node_modules/react-native-inappbrowser-reborn`)
|
|
657
670
|
- RNReanimated (from `../node_modules/react-native-reanimated`)
|
|
@@ -730,8 +743,14 @@ EXTERNAL SOURCES:
|
|
|
730
743
|
:path: "../node_modules/react-native/ReactCommon/logger"
|
|
731
744
|
react-native-agora:
|
|
732
745
|
:path: "../node_modules/react-native-agora"
|
|
746
|
+
react-native-document-picker:
|
|
747
|
+
:path: "../node_modules/react-native-document-picker"
|
|
733
748
|
react-native-keep-awake:
|
|
734
749
|
:path: "../node_modules/react-native-keep-awake"
|
|
750
|
+
react-native-webview:
|
|
751
|
+
:path: "../node_modules/react-native-webview"
|
|
752
|
+
react-native-whiteboard:
|
|
753
|
+
:path: "../node_modules/@netless/react-native-whiteboard"
|
|
735
754
|
React-NativeModulesApple:
|
|
736
755
|
:path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios"
|
|
737
756
|
React-perflogger:
|
|
@@ -778,6 +797,8 @@ EXTERNAL SOURCES:
|
|
|
778
797
|
:path: "../node_modules/@react-native-community/clipboard"
|
|
779
798
|
RNExitApp:
|
|
780
799
|
:path: "../node_modules/react-native-exit-app"
|
|
800
|
+
RNFS:
|
|
801
|
+
:path: "../node_modules/react-native-fs"
|
|
781
802
|
RNGestureHandler:
|
|
782
803
|
:path: "../node_modules/react-native-gesture-handler"
|
|
783
804
|
RNInAppBrowser:
|
|
@@ -834,7 +855,10 @@ SPEC CHECKSUMS:
|
|
|
834
855
|
React-jsinspector: aaed4cf551c4a1c98092436518c2d267b13a673f
|
|
835
856
|
React-logger: da1ebe05ae06eb6db4b162202faeafac4b435e77
|
|
836
857
|
react-native-agora: 16de7d9657b24dcf1ea6edebb30d06fe3e050c68
|
|
858
|
+
react-native-document-picker: b4f4a23b73f864ce17965b284c0757648993805b
|
|
837
859
|
react-native-keep-awake: afad8a51dfef9fe9655a6344771be32c8596d774
|
|
860
|
+
react-native-webview: bdc091de8cf7f8397653e30182efcd9f772e03b3
|
|
861
|
+
react-native-whiteboard: d56d2ffa0392b8572bfc613954845e48c6dfd38e
|
|
838
862
|
React-NativeModulesApple: edb5ace14f73f4969df6e7b1f3e41bef0012740f
|
|
839
863
|
React-perflogger: 496a1a3dc6737f964107cb3ddae7f9e265ddda58
|
|
840
864
|
React-RCTActionSheet: 02904b932b50e680f4e26e7a686b33ebf7ef3c00
|
|
@@ -858,6 +882,7 @@ SPEC CHECKSUMS:
|
|
|
858
882
|
RNCCheckbox: 75255b03e604bbcc26411eb31c4cbe3e3865f538
|
|
859
883
|
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
|
|
860
884
|
RNExitApp: c4e052df2568b43bec8a37c7cd61194d4cfee2c3
|
|
885
|
+
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
|
|
861
886
|
RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3
|
|
862
887
|
RNInAppBrowser: 48b95ba7a4eaff5cc223bca338d3e319561dbd1b
|
|
863
888
|
RNReanimated: 726395a2fa2f04cea340274ba57a4e659bc0d9c1
|
package/template/package.json
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"react-native-vector-icons": "9.2.0",
|
|
98
98
|
"react-native-walkthrough-tooltip": "1.4.0",
|
|
99
99
|
"react-native-web": "0.19.7",
|
|
100
|
-
"react-native-webview": "
|
|
100
|
+
"react-native-webview": "13.8.1",
|
|
101
101
|
"react-router-dom": "5.2.0",
|
|
102
102
|
"react-router-native": "5.2.0",
|
|
103
103
|
"react-spring-bottom-sheet": "3.4.1",
|
|
@@ -24,7 +24,7 @@ import {useContent} from 'customization-api';
|
|
|
24
24
|
import RenderComponent from '../pages/video-call/RenderComponent';
|
|
25
25
|
import IconButton from '../atoms/IconButton';
|
|
26
26
|
import hexadecimalTransparency from '../utils/hexadecimalTransparency';
|
|
27
|
-
import {BREAKPOINTS, isMobileUA} from '../utils/common';
|
|
27
|
+
import {BREAKPOINTS, isMobileUA, isWebInternal} from '../utils/common';
|
|
28
28
|
import {DispatchContext} from '../../agora-rn-uikit';
|
|
29
29
|
import {useVideoCall} from '../components/useVideoCall';
|
|
30
30
|
import useActiveSpeaker from '../utils/useActiveSpeaker';
|
|
@@ -108,7 +108,9 @@ const PinnedVideo = ({renderData}) => {
|
|
|
108
108
|
marginBottom: 8,
|
|
109
109
|
}
|
|
110
110
|
}>
|
|
111
|
-
{secondaryPinnedUid
|
|
111
|
+
{secondaryPinnedUid &&
|
|
112
|
+
secondaryPinnedUid !== pinnedUid &&
|
|
113
|
+
secondaryPinnedUid !== maxUid ? (
|
|
112
114
|
<Pressable
|
|
113
115
|
disabled={true}
|
|
114
116
|
style={
|
|
@@ -178,7 +180,7 @@ const PinnedVideo = ({renderData}) => {
|
|
|
178
180
|
);
|
|
179
181
|
})}
|
|
180
182
|
</ScrollView>
|
|
181
|
-
{$config.ACTIVE_SPEAKER && !isOnTop && (
|
|
183
|
+
{$config.ACTIVE_SPEAKER && !isOnTop && isWebInternal() && (
|
|
182
184
|
<View
|
|
183
185
|
style={
|
|
184
186
|
isSidePinnedlayout
|
|
@@ -28,6 +28,7 @@ export interface StoreInterface {
|
|
|
28
28
|
rememberedDevicesListEntries
|
|
29
29
|
>;
|
|
30
30
|
activeDeviceId: Record<MediaDeviceInfo['kind'], string>;
|
|
31
|
+
whiteboardNativeInfoToast?: boolean;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
export interface StorageContextInterface {
|
|
@@ -36,6 +37,7 @@ export interface StorageContextInterface {
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export const initStoreValue: StoreInterface = {
|
|
40
|
+
whiteboardNativeInfoToast: false,
|
|
39
41
|
token: null,
|
|
40
42
|
displayName: '',
|
|
41
43
|
selectedLanguageCode: '',
|
|
@@ -78,7 +80,7 @@ export const StorageProvider = (props: {children: React.ReactNode}) => {
|
|
|
78
80
|
setReady(true);
|
|
79
81
|
} else {
|
|
80
82
|
const storeFromStorage = JSON.parse(storeString);
|
|
81
|
-
Object.keys(initStoreValue).forEach(
|
|
83
|
+
Object.keys(initStoreValue).forEach(key => {
|
|
82
84
|
if (!storeFromStorage[key]) {
|
|
83
85
|
storeFromStorage[key] = initStoreValue[key];
|
|
84
86
|
}
|
|
@@ -87,6 +89,7 @@ export const StorageProvider = (props: {children: React.ReactNode}) => {
|
|
|
87
89
|
if (!ENABLE_AUTH) {
|
|
88
90
|
storeFromStorage['token'] = null;
|
|
89
91
|
}
|
|
92
|
+
storeFromStorage['whiteboardNativeInfoToast'] = false;
|
|
90
93
|
setStore(storeFromStorage);
|
|
91
94
|
setReady(true);
|
|
92
95
|
}
|
|
@@ -77,6 +77,8 @@ export interface whiteboardContextInterface {
|
|
|
77
77
|
getWhiteboardUid: () => number;
|
|
78
78
|
whiteboardStartedFirst?: boolean;
|
|
79
79
|
clearAllCallback: () => void;
|
|
80
|
+
isWhiteboardOnFullScreen?: boolean;
|
|
81
|
+
setWhiteboardOnFullScreen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
export interface WhiteboardPropsInterface {
|
|
@@ -90,6 +92,7 @@ const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
|
|
|
90
92
|
const [boardColor, setBoardColor] = useState<BoardColor>(BoardColor.White);
|
|
91
93
|
// Defines whiteboard room state, whether disconnected, Connected, Connecting etc.
|
|
92
94
|
const [whiteboardRoomState, setWhiteboardRoomState] = useState();
|
|
95
|
+
const [isWhiteboardOnFullScreen, setWhiteboardOnFullScreen] = useState(false);
|
|
93
96
|
const whiteboardUidRef = useRef(Date.now());
|
|
94
97
|
const whiteboardRoom = useRef({});
|
|
95
98
|
|
|
@@ -109,6 +112,12 @@ const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
|
|
|
109
112
|
return whiteboardUidRef?.current;
|
|
110
113
|
};
|
|
111
114
|
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
if (!whiteboardActive && isWhiteboardOnFullScreen) {
|
|
117
|
+
setWhiteboardOnFullScreen(false);
|
|
118
|
+
}
|
|
119
|
+
}, [whiteboardActive]);
|
|
120
|
+
|
|
112
121
|
const clearAllCallback = () => {};
|
|
113
122
|
return (
|
|
114
123
|
<whiteboardContext.Provider
|
|
@@ -126,6 +135,8 @@ const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
|
|
|
126
135
|
insertImageIntoWhiteboard,
|
|
127
136
|
whiteboardStartedFirst,
|
|
128
137
|
clearAllCallback,
|
|
138
|
+
isWhiteboardOnFullScreen,
|
|
139
|
+
setWhiteboardOnFullScreen,
|
|
129
140
|
}}>
|
|
130
141
|
{props.children}
|
|
131
142
|
</whiteboardContext.Provider>
|
|
@@ -93,6 +93,8 @@ export interface whiteboardContextInterface {
|
|
|
93
93
|
getWhiteboardUid: () => number;
|
|
94
94
|
whiteboardStartedFirst?: boolean;
|
|
95
95
|
clearAllCallback?: () => void;
|
|
96
|
+
isWhiteboardOnFullScreen?: boolean;
|
|
97
|
+
setWhiteboardOnFullScreen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
export interface WhiteboardPropsInterface {
|
|
@@ -101,6 +103,7 @@ export interface WhiteboardPropsInterface {
|
|
|
101
103
|
|
|
102
104
|
const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
|
|
103
105
|
// Defines intent, whether whiteboard should be active or not
|
|
106
|
+
const [isWhiteboardOnFullScreen, setWhiteboardOnFullScreen] = useState(false);
|
|
104
107
|
const [whiteboardActive, setWhiteboardActive] = useState(false);
|
|
105
108
|
const [whiteboardStartedFirst, setWhiteboardStartedFirst] = useState(false);
|
|
106
109
|
const [boardColor, setBoardColor] = useState<BoardColor>(BoardColor.White);
|
|
@@ -430,6 +433,8 @@ const WhiteboardConfigure: React.FC<WhiteboardPropsInterface> = props => {
|
|
|
430
433
|
insertImageIntoWhiteboard,
|
|
431
434
|
whiteboardStartedFirst,
|
|
432
435
|
clearAllCallback,
|
|
436
|
+
isWhiteboardOnFullScreen,
|
|
437
|
+
setWhiteboardOnFullScreen,
|
|
433
438
|
}}>
|
|
434
439
|
{props.children}
|
|
435
440
|
</whiteboardContext.Provider>
|
|
@@ -10,37 +10,80 @@
|
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import React, {useContext, useRef} from 'react';
|
|
13
|
+
import React, {useContext, useEffect, useRef, useState} from 'react';
|
|
14
14
|
import {whiteboardContext} from './WhiteboardConfigure';
|
|
15
|
-
import {StyleSheet, View} from 'react-native';
|
|
15
|
+
import {StyleSheet, View, Text} from 'react-native';
|
|
16
16
|
import {useRoomInfo} from 'customization-api';
|
|
17
17
|
import {
|
|
18
18
|
WhiteboardView as NativeWhiteboardView,
|
|
19
19
|
RoomCallbackHandler,
|
|
20
20
|
} from '@netless/react-native-whiteboard';
|
|
21
21
|
import WhiteboardWidget from './WhiteboardWidget';
|
|
22
|
+
import {
|
|
23
|
+
whiteboardInitializingText,
|
|
24
|
+
whiteboardNativeInfoToastHeading,
|
|
25
|
+
} from '../../language/default-labels/videoCallScreenLabels';
|
|
26
|
+
import {useString} from '../../utils/useString';
|
|
27
|
+
import ThemeConfig from '../../theme';
|
|
28
|
+
import Toast from '../../../react-native-toast-message';
|
|
29
|
+
import {useContent} from 'customization-api';
|
|
30
|
+
import StorageContext from '../StorageContext';
|
|
22
31
|
|
|
23
32
|
interface WhiteboardViewInterface {}
|
|
24
33
|
|
|
25
34
|
const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
|
|
26
|
-
const {getWhiteboardUid, whiteboardActive} =
|
|
35
|
+
const {getWhiteboardUid, whiteboardActive, isWhiteboardOnFullScreen} =
|
|
36
|
+
useContext(whiteboardContext);
|
|
37
|
+
const {setStore, store} = useContext(StorageContext);
|
|
38
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
27
39
|
const roomRef = useRef({});
|
|
28
40
|
const sdkRef = useRef({});
|
|
29
41
|
const {
|
|
30
42
|
data: {whiteboard: {room_token, room_uuid} = {}},
|
|
31
43
|
} = useRoomInfo();
|
|
44
|
+
const whiteboardInitializing = useString(whiteboardInitializingText)();
|
|
45
|
+
const whiteboardNativeInfoToastHeadingText = useString(
|
|
46
|
+
whiteboardNativeInfoToastHeading,
|
|
47
|
+
)();
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (!store?.whiteboardNativeInfoToast) {
|
|
51
|
+
Toast.show({
|
|
52
|
+
leadingIconName: 'info',
|
|
53
|
+
type: 'info',
|
|
54
|
+
text1: whiteboardNativeInfoToastHeadingText,
|
|
55
|
+
visibilityTime: 5000,
|
|
56
|
+
primaryBtn: null,
|
|
57
|
+
secondaryBtn: null,
|
|
58
|
+
leadingIcon: null,
|
|
59
|
+
});
|
|
60
|
+
setStore(prevState => {
|
|
61
|
+
return {
|
|
62
|
+
...prevState,
|
|
63
|
+
whiteboardNativeInfoToast: true,
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}, [store]);
|
|
32
68
|
|
|
33
69
|
const roomCallbacks: Partial<RoomCallbackHandler> = {
|
|
34
|
-
onPhaseChanged: e =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
70
|
+
onPhaseChanged: e => {
|
|
71
|
+
console.log('debugging onPhaseChanged changed: ', e);
|
|
72
|
+
setIsLoading(false);
|
|
73
|
+
},
|
|
74
|
+
// onRoomStateChanged: e =>
|
|
75
|
+
// console.log('debugging onRoomStateChanged changed: ', e),
|
|
76
|
+
onDisconnectWithError: e => {
|
|
77
|
+
console.log('debugging onDisconnectWithError: ', e);
|
|
78
|
+
setIsLoading(false);
|
|
79
|
+
},
|
|
39
80
|
};
|
|
40
81
|
|
|
41
82
|
const sdkCallbacks = {
|
|
42
|
-
onSetupFail: error =>
|
|
43
|
-
console.log('debugging whiteboard sdk setup fail: ', error)
|
|
83
|
+
onSetupFail: error => {
|
|
84
|
+
console.log('debugging whiteboard sdk setup fail: ', error);
|
|
85
|
+
setIsLoading(false);
|
|
86
|
+
},
|
|
44
87
|
};
|
|
45
88
|
|
|
46
89
|
const joinRoomCallback = (aRoom, aSdk, error) => {
|
|
@@ -48,7 +91,7 @@ const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
|
|
|
48
91
|
sdkRef.current = aSdk;
|
|
49
92
|
|
|
50
93
|
console.log('debugging aRoom', aRoom);
|
|
51
|
-
|
|
94
|
+
setIsLoading(false);
|
|
52
95
|
if (error) {
|
|
53
96
|
console.log(error);
|
|
54
97
|
} else {
|
|
@@ -61,14 +104,29 @@ const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
|
|
|
61
104
|
};
|
|
62
105
|
|
|
63
106
|
return (
|
|
64
|
-
<View
|
|
107
|
+
<View
|
|
108
|
+
style={
|
|
109
|
+
isWhiteboardOnFullScreen
|
|
110
|
+
? style.whiteboardContainerLandscape
|
|
111
|
+
: style.whiteboardContainer
|
|
112
|
+
}>
|
|
65
113
|
{whiteboardActive ? (
|
|
66
114
|
<>
|
|
115
|
+
{isLoading ? (
|
|
116
|
+
<View style={style.placeholder}>
|
|
117
|
+
<Text style={style.loadingTextStyle}>
|
|
118
|
+
{whiteboardInitializing}
|
|
119
|
+
</Text>
|
|
120
|
+
</View>
|
|
121
|
+
) : (
|
|
122
|
+
<></>
|
|
123
|
+
)}
|
|
67
124
|
<WhiteboardWidget whiteboardRoom={roomRef} />
|
|
68
125
|
<NativeWhiteboardView
|
|
69
126
|
style={style.whiteboard}
|
|
70
127
|
sdkConfig={{
|
|
71
128
|
appIdentifier: $config.WHITEBOARD_APPIDENTIFIER,
|
|
129
|
+
userCursor: true,
|
|
72
130
|
}}
|
|
73
131
|
roomConfig={{
|
|
74
132
|
uid: getWhiteboardUid()?.toString(),
|
|
@@ -90,11 +148,26 @@ const WhiteboardView: React.FC<WhiteboardViewInterface> = () => {
|
|
|
90
148
|
};
|
|
91
149
|
|
|
92
150
|
const style = StyleSheet.create({
|
|
151
|
+
placeholder: {
|
|
152
|
+
position: 'absolute',
|
|
153
|
+
top: '30%',
|
|
154
|
+
alignItems: 'center', //Centered horizontally
|
|
155
|
+
flex: 1,
|
|
156
|
+
zIndex: 999,
|
|
157
|
+
},
|
|
158
|
+
whiteboardContainerLandscape: {
|
|
159
|
+
flex: 1,
|
|
160
|
+
position: 'relative',
|
|
161
|
+
alignSelf: 'center',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
transform: [{rotate: '90deg'}],
|
|
164
|
+
},
|
|
93
165
|
whiteboardContainer: {
|
|
94
166
|
flex: 1,
|
|
95
167
|
flexDirection: 'column',
|
|
96
168
|
alignItems: 'center',
|
|
97
169
|
backgroundColor: 'black',
|
|
170
|
+
position: 'relative',
|
|
98
171
|
},
|
|
99
172
|
whiteboard: {
|
|
100
173
|
aspectRatio: 16.0 / 9.0,
|
|
@@ -104,6 +177,12 @@ const style = StyleSheet.create({
|
|
|
104
177
|
flex: 1,
|
|
105
178
|
justifyContent: 'center',
|
|
106
179
|
},
|
|
180
|
+
loadingTextStyle: {
|
|
181
|
+
color: $config.HARD_CODED_BLACK_COLOR,
|
|
182
|
+
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
183
|
+
fontSize: ThemeConfig.FontSize.small,
|
|
184
|
+
fontWeight: '600',
|
|
185
|
+
},
|
|
107
186
|
});
|
|
108
187
|
|
|
109
188
|
export default WhiteboardView;
|
|
@@ -22,7 +22,13 @@ import {
|
|
|
22
22
|
import {whiteboardContext, BoardColor} from './WhiteboardConfigure';
|
|
23
23
|
import events, {PersistanceLevel} from '../../rtm-events-api';
|
|
24
24
|
import {EventNames} from '../../rtm-events';
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
isIOS,
|
|
27
|
+
isMobileUA,
|
|
28
|
+
isWebInternal,
|
|
29
|
+
randomString,
|
|
30
|
+
isAndroid,
|
|
31
|
+
} from '../../utils/common';
|
|
26
32
|
import Toast from '../../../react-native-toast-message';
|
|
27
33
|
import ThemeConfig from '../../theme';
|
|
28
34
|
import {DefaultLayouts} from '../../pages/video-call/DefaultLayouts';
|
|
@@ -69,8 +75,12 @@ const WhiteboardWidget = ({whiteboardRoom}) => {
|
|
|
69
75
|
const exportsuccess = useString(whiteboardExportSuccessToastHeading)();
|
|
70
76
|
|
|
71
77
|
const [isInProgress, setIsInProgress] = useState(false);
|
|
72
|
-
const {
|
|
73
|
-
|
|
78
|
+
const {
|
|
79
|
+
setBoardColor,
|
|
80
|
+
boardColor,
|
|
81
|
+
getWhiteboardUid,
|
|
82
|
+
isWhiteboardOnFullScreen,
|
|
83
|
+
} = useContext(whiteboardContext);
|
|
74
84
|
const {
|
|
75
85
|
data: {whiteboard: {room_uuid} = {}},
|
|
76
86
|
} = useRoomInfo();
|
|
@@ -199,7 +209,8 @@ const WhiteboardWidget = ({whiteboardRoom}) => {
|
|
|
199
209
|
<>
|
|
200
210
|
<View style={style.toolboxContainer}>
|
|
201
211
|
<View style={style.toolboxNew} nativeID="toolbox">
|
|
202
|
-
{!whiteboardRoom.current?.isWritable
|
|
212
|
+
{(!whiteboardRoom.current?.isWritable || isIOS() || isAndroid()) &&
|
|
213
|
+
!isWhiteboardOnFullScreen ? (
|
|
203
214
|
<View style={style.viewOnlyContainerStyle}>
|
|
204
215
|
<ImageIcon
|
|
205
216
|
name="view-only"
|
|
@@ -380,6 +380,9 @@ export const whiteboardToolboxEraseText = 'whiteboardToolboxEraseText';
|
|
|
380
380
|
export const whiteboardToolboxUploadText = 'whiteboardToolboxUploadText';
|
|
381
381
|
export const whiteboardToolboxClearAllText = 'whiteboardToolboxClearAllText';
|
|
382
382
|
|
|
383
|
+
export const whiteboardNativeInfoToastHeading =
|
|
384
|
+
'whiteboardNativeInfoToastHeading';
|
|
385
|
+
|
|
383
386
|
export const sttSpokenLanguageToastHeading = `${stt}SpokenLanguageToastHeading`;
|
|
384
387
|
export const sttSpokenLanguageToastSubHeading = `${stt}SpokenLanguageToastSubHeading`;
|
|
385
388
|
|
|
@@ -679,6 +682,7 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
679
682
|
[whiteboardFileUploadInfoToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
680
683
|
[whiteboardFileUploadTypeErrorToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
681
684
|
[whiteboardFileUploadTypeErrorToastSubHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
685
|
+
[whiteboardNativeInfoToastHeading]?: I18nBaseType;
|
|
682
686
|
|
|
683
687
|
[sttSpokenLanguageToastHeading]?: I18nBaseType<sttSpokenLanguageToastHeadingDataType>;
|
|
684
688
|
[sttSpokenLanguageToastSubHeading]?: I18nBaseType<sttSpokenLanguageToastSubHeadingDataInterface>;
|
|
@@ -1167,4 +1171,6 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
|
1167
1171
|
[videoRoomPeopleCountTooltipHostText]: 'Host',
|
|
1168
1172
|
[videoRoomPeopleCountTooltipAttendeeText]: ({eventMode}) =>
|
|
1169
1173
|
eventMode ? 'Audience' : 'Attendee',
|
|
1174
|
+
[whiteboardNativeInfoToastHeading]:
|
|
1175
|
+
'Use two finger to move around the whiteboard',
|
|
1170
1176
|
};
|
|
@@ -80,6 +80,37 @@ import {isWeb} from '../utils/common';
|
|
|
80
80
|
import {videoRoomStartingCallText} from '../language/default-labels/videoCallScreenLabels';
|
|
81
81
|
import {useString} from '../utils/useString';
|
|
82
82
|
|
|
83
|
+
const NativeAreaCode = {
|
|
84
|
+
/**
|
|
85
|
+
* China.
|
|
86
|
+
*/
|
|
87
|
+
CHINA: 1,
|
|
88
|
+
/**
|
|
89
|
+
* Asia, excluding Mainland China.
|
|
90
|
+
*/
|
|
91
|
+
ASIA: 8,
|
|
92
|
+
/**
|
|
93
|
+
* North America.
|
|
94
|
+
*/
|
|
95
|
+
NORTH_AMERICA: 2,
|
|
96
|
+
/**
|
|
97
|
+
* Europe.
|
|
98
|
+
*/
|
|
99
|
+
EUROPE: 4,
|
|
100
|
+
/**
|
|
101
|
+
* Japan.
|
|
102
|
+
*/
|
|
103
|
+
JAPAN: 16,
|
|
104
|
+
/**
|
|
105
|
+
* India.
|
|
106
|
+
*/
|
|
107
|
+
INDIA: 32,
|
|
108
|
+
/**
|
|
109
|
+
* Global.
|
|
110
|
+
*/
|
|
111
|
+
GLOBAL: -1,
|
|
112
|
+
};
|
|
113
|
+
|
|
83
114
|
enum RnEncryptionEnum {
|
|
84
115
|
/**
|
|
85
116
|
* @deprecated
|
|
@@ -157,6 +188,21 @@ const VideoCall: React.FC = () => {
|
|
|
157
188
|
clearState,
|
|
158
189
|
} = useContext(SdkApiContext);
|
|
159
190
|
|
|
191
|
+
let geoFencingIncludeArea = -1;
|
|
192
|
+
let geoFencingExcludeArea = 0;
|
|
193
|
+
|
|
194
|
+
try {
|
|
195
|
+
geoFencingIncludeArea = NativeAreaCode[$config.GEO_FENCING_INCLUDE_AREA];
|
|
196
|
+
} catch (error) {
|
|
197
|
+
console.log('error on native geoFencingIncludeArea', error);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
try {
|
|
201
|
+
geoFencingExcludeArea = NativeAreaCode[$config.GEO_FENCING_EXCLUDE_AREA];
|
|
202
|
+
} catch (error) {
|
|
203
|
+
console.log('error on native geoFencingExcludeArea', error);
|
|
204
|
+
}
|
|
205
|
+
|
|
160
206
|
// commented for v1 release
|
|
161
207
|
//const lifecycle = useCustomization((data) => data.lifecycle);
|
|
162
208
|
const [rtcProps, setRtcProps] = React.useState({
|
|
@@ -174,6 +220,8 @@ const VideoCall: React.FC = () => {
|
|
|
174
220
|
: false,
|
|
175
221
|
role: ClientRole.Broadcaster,
|
|
176
222
|
geoFencing: $config.GEO_FENCING,
|
|
223
|
+
geoFencingIncludeArea: geoFencingIncludeArea,
|
|
224
|
+
geoFencingExcludeArea: geoFencingExcludeArea,
|
|
177
225
|
audioRoom: $config.AUDIO_ROOM,
|
|
178
226
|
activeSpeaker: $config.ACTIVE_SPEAKER,
|
|
179
227
|
preferredCameraId:
|
|
@@ -428,8 +476,7 @@ const VideoCall: React.FC = () => {
|
|
|
428
476
|
<VideoMeetingDataProvider>
|
|
429
477
|
<VideoCallProvider>
|
|
430
478
|
<DisableChatProvider>
|
|
431
|
-
{$config.ENABLE_WHITEBOARD
|
|
432
|
-
isWebInternal() ? (
|
|
479
|
+
{$config.ENABLE_WHITEBOARD ? (
|
|
433
480
|
<WhiteboardConfigure>
|
|
434
481
|
<VideoCallScreen />
|
|
435
482
|
</WhiteboardConfigure>
|
|
@@ -36,10 +36,14 @@ import NavbarMobile from '../../components/NavbarMobile';
|
|
|
36
36
|
import {useVB} from '../../components/virtual-background/useVB';
|
|
37
37
|
import VBPanel from '../../components/virtual-background/VBPanel';
|
|
38
38
|
import {WhiteboardListener} from '../../components/Controls';
|
|
39
|
+
import {useWhiteboard} from '../../components/whiteboard/WhiteboardConfigure';
|
|
40
|
+
import WhiteboardView from '../../components/whiteboard/WhiteboardView';
|
|
39
41
|
|
|
40
42
|
const VideoCallMobileView = props => {
|
|
41
43
|
const {native = true} = props;
|
|
44
|
+
const {customContent} = useContent();
|
|
42
45
|
const {isScreenShareOnFullView, screenShareData} = useScreenContext();
|
|
46
|
+
const {getWhiteboardUid, isWhiteboardOnFullScreen} = useWhiteboard();
|
|
43
47
|
|
|
44
48
|
const {RtcEngineUnsafe} = useContext(RtcContext);
|
|
45
49
|
const {dispatch} = useContext(DispatchContext);
|
|
@@ -118,17 +122,37 @@ const VideoCallMobileView = props => {
|
|
|
118
122
|
return <VBPanel />;
|
|
119
123
|
}
|
|
120
124
|
|
|
125
|
+
if (isWhiteboardOnFullScreen) {
|
|
126
|
+
return (
|
|
127
|
+
<>
|
|
128
|
+
{$config.ENABLE_WHITEBOARD ? <WhiteboardListener /> : <></>}
|
|
129
|
+
<VideoRenderer
|
|
130
|
+
user={{
|
|
131
|
+
uid: customContent[getWhiteboardUid()]?.uid,
|
|
132
|
+
type: 'whiteboard',
|
|
133
|
+
video: 0,
|
|
134
|
+
audio: 0,
|
|
135
|
+
parentUid: undefined,
|
|
136
|
+
name: 'Whiteboard',
|
|
137
|
+
muted: undefined,
|
|
138
|
+
}}
|
|
139
|
+
CustomChild={WhiteboardView}
|
|
140
|
+
/>
|
|
141
|
+
</>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
121
145
|
return isScreenShareOnFullView &&
|
|
122
146
|
maxScreenShareUid &&
|
|
123
147
|
defaultContent[maxScreenShareUid] &&
|
|
124
148
|
defaultContent[maxScreenShareUid]?.video ? (
|
|
125
149
|
<>
|
|
126
|
-
{
|
|
150
|
+
{$config.ENABLE_WHITEBOARD ? <WhiteboardListener /> : <></>}
|
|
127
151
|
<VideoRenderer user={defaultContent[maxScreenShareUid]} />
|
|
128
152
|
</>
|
|
129
153
|
) : (
|
|
130
154
|
<>
|
|
131
|
-
{
|
|
155
|
+
{$config.ENABLE_WHITEBOARD ? <WhiteboardListener /> : <></>}
|
|
132
156
|
<VideoCallView />
|
|
133
157
|
</>
|
|
134
158
|
);
|
|
@@ -68,7 +68,12 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
68
68
|
const videoMoreMenuRef = useRef(null);
|
|
69
69
|
const [actionMenuVisible, setActionMenuVisible] = React.useState(false);
|
|
70
70
|
const {setVideoTileInViewPortState} = useVideoCall();
|
|
71
|
-
const {
|
|
71
|
+
const {
|
|
72
|
+
getWhiteboardUid = () => 0,
|
|
73
|
+
isWhiteboardOnFullScreen,
|
|
74
|
+
setWhiteboardOnFullScreen,
|
|
75
|
+
whiteboardActive,
|
|
76
|
+
} = useWhiteboard();
|
|
72
77
|
const [landscapeMode, setLandscapeMode] = useState(
|
|
73
78
|
isAndroid() || isIOS() ? true : false,
|
|
74
79
|
);
|
|
@@ -125,8 +130,13 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
125
130
|
}, [screenShareData, isScreenShareOnFullView]);
|
|
126
131
|
|
|
127
132
|
const isNativeScreenShareActive =
|
|
128
|
-
(isAndroid() || isIOS()) &&
|
|
129
|
-
|
|
133
|
+
(isAndroid() || isIOS() || isMobileUA()) && user?.type === 'screenshare';
|
|
134
|
+
|
|
135
|
+
const isNativeWhiteboardActive =
|
|
136
|
+
(isAndroid() || isIOS() || isMobileUA()) && whiteboardActive;
|
|
137
|
+
|
|
138
|
+
const enableExpandButton =
|
|
139
|
+
isNativeScreenShareActive || isNativeWhiteboardActive ? true : false;
|
|
130
140
|
|
|
131
141
|
const {enablePinForMe} = useVideoCall();
|
|
132
142
|
|
|
@@ -191,13 +201,15 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
191
201
|
) : (
|
|
192
202
|
<></>
|
|
193
203
|
)}
|
|
194
|
-
{enableExpandButton &&
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
{(enableExpandButton &&
|
|
205
|
+
screenShareData &&
|
|
206
|
+
screenShareData?.[user.uid] &&
|
|
207
|
+
isMobileUA()) ||
|
|
208
|
+
(isMobileUA() && enableExpandButton && user?.type == 'whiteboard') ? (
|
|
198
209
|
<IconButton
|
|
199
210
|
containerStyle={
|
|
200
|
-
isScreenShareOnFullView &&
|
|
211
|
+
(isScreenShareOnFullView || isWhiteboardOnFullScreen) &&
|
|
212
|
+
landscapeMode
|
|
201
213
|
? {
|
|
202
214
|
position: 'absolute',
|
|
203
215
|
top: 8,
|
|
@@ -206,6 +218,14 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
206
218
|
zIndex: 999,
|
|
207
219
|
elevation: 999,
|
|
208
220
|
}
|
|
221
|
+
: user?.type == 'whiteboard'
|
|
222
|
+
? {
|
|
223
|
+
position: 'absolute',
|
|
224
|
+
top: 8,
|
|
225
|
+
left: 8,
|
|
226
|
+
zIndex: 999,
|
|
227
|
+
elevation: 999,
|
|
228
|
+
}
|
|
209
229
|
: {
|
|
210
230
|
position: 'absolute',
|
|
211
231
|
top: 8,
|
|
@@ -220,18 +240,22 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
220
240
|
}
|
|
221
241
|
}
|
|
222
242
|
onPress={() => {
|
|
223
|
-
|
|
224
|
-
!
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
243
|
+
if (user?.type == 'whiteboard') {
|
|
244
|
+
setWhiteboardOnFullScreen(!isWhiteboardOnFullScreen);
|
|
245
|
+
} else {
|
|
246
|
+
setScreenShareOnFullView(
|
|
247
|
+
!screenShareData[user.uid]?.isExpanded,
|
|
248
|
+
);
|
|
249
|
+
setScreenShareData(prevState => {
|
|
250
|
+
return {
|
|
251
|
+
...prevState,
|
|
252
|
+
[user.uid]: {
|
|
253
|
+
...prevState[user.uid],
|
|
254
|
+
isExpanded: !prevState[user.uid]?.isExpanded,
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
});
|
|
258
|
+
}
|
|
235
259
|
}}
|
|
236
260
|
iconProps={{
|
|
237
261
|
iconContainerStyle: {
|
|
@@ -241,6 +265,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
241
265
|
transform: [{rotate: '-45deg'}],
|
|
242
266
|
},
|
|
243
267
|
name:
|
|
268
|
+
isWhiteboardOnFullScreen ||
|
|
244
269
|
screenShareData?.[user?.uid]?.isExpanded === true
|
|
245
270
|
? 'collapse'
|
|
246
271
|
: 'expand',
|
|
@@ -284,7 +309,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
284
309
|
avatarSize,
|
|
285
310
|
);
|
|
286
311
|
}}
|
|
287
|
-
user={
|
|
312
|
+
user={user}
|
|
288
313
|
containerStyle={{
|
|
289
314
|
width:
|
|
290
315
|
landscapeMode && isScreenShareOnFullView
|
|
@@ -292,8 +317,6 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
292
317
|
: '100%',
|
|
293
318
|
height:
|
|
294
319
|
landscapeMode && isScreenShareOnFullView ? width : '100%',
|
|
295
|
-
// width: '100%',
|
|
296
|
-
// height: '100%',
|
|
297
320
|
borderRadius: 4,
|
|
298
321
|
overflow: 'hidden',
|
|
299
322
|
}}
|
|
@@ -307,6 +330,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
307
330
|
</ZoomableWrapper>
|
|
308
331
|
{(!isScreenShareOnFullView && !CustomChild) ||
|
|
309
332
|
(CustomChild &&
|
|
333
|
+
!isWhiteboardOnFullScreen &&
|
|
310
334
|
(pinnedUid !== getWhiteboardUid() || currentLayout === 'grid')) ? (
|
|
311
335
|
<VideoContainerProvider value={{videoTileWidth}}>
|
|
312
336
|
<NameWithMicIcon
|
|
@@ -325,7 +349,7 @@ const VideoRenderer: React.FC<VideoRendererProps> = ({
|
|
|
325
349
|
) : (
|
|
326
350
|
<></>
|
|
327
351
|
)}
|
|
328
|
-
{!isScreenShareOnFullView &&
|
|
352
|
+
{!(isScreenShareOnFullView || isWhiteboardOnFullScreen) &&
|
|
329
353
|
// user.uid !== rtcProps?.screenShareUid &&
|
|
330
354
|
(isHovered || actionMenuVisible || isMobileUA()) ? (
|
|
331
355
|
<MoreMenu
|