agora-appbuilder-core 3.0.10 → 3.0.12
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/Readme.md +0 -6
- package/package.json +2 -2
- package/template/_package-lock.json +4979 -7086
- package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +0 -4
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +0 -18
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +0 -2
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +26 -30
- package/template/agora-rn-uikit/src/Controls/Icons.ts +83 -30
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +6 -6
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +0 -2
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/index.ts +0 -3
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +1 -89
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +2 -39
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +5 -15
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +9 -15
- package/template/agora-rn-uikit/src/index.ts +1 -3
- package/template/android/app/build.gradle +0 -1
- package/template/android/app/src/main/AndroidManifest.xml +15 -22
- package/template/android/app/src/main/java/com/helloworld/MainActivity.java +0 -50
- package/template/android/build.gradle +3 -3
- package/template/babel.config.js +0 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +17 -110
- package/template/customization-api/sub-components.ts +1 -1
- package/template/customization-api/typeDefinition.ts +1 -2
- package/template/electron/index.html +27 -27
- package/template/electron/renderer/index.js +0 -1
- package/template/global.d.ts +4 -26
- package/template/index.js +0 -4
- package/template/index.rsdk.tsx +0 -1
- package/template/index.web.js +1 -7
- package/template/index.wsdk.tsx +1 -1
- package/template/ios/HelloWorld/Info.plist +1 -14
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +0 -17
- package/template/metro.config.js +1 -1
- package/template/package.json +7 -21
- package/template/react-native-toast-message/index.d.ts +43 -43
- package/template/react-native-toast-message/src/colors/index.js +2 -3
- package/template/react-native-toast-message/src/components/base/index.js +59 -46
- package/template/react-native-toast-message/src/components/base/styles.js +32 -16
- package/template/react-native-toast-message/src/components/error.js +2 -3
- package/template/react-native-toast-message/src/components/info.js +2 -3
- package/template/react-native-toast-message/src/components/success.js +2 -3
- package/template/react-native-toast-message/src/index.js +31 -122
- package/template/react-native-toast-message/src/index.sdk.tsx +35 -125
- package/template/react-native-toast-message/src/styles.js +4 -3
- package/template/react-native-toast-message/src/styles.sdk.ts +4 -3
- package/template/src/App.tsx +0 -6
- package/template/src/AppWrapper.tsx +28 -63
- package/template/src/assets/icons.ts +102 -0
- package/template/src/atoms/HorizontalRule.tsx +1 -3
- package/template/src/atoms/PrimaryButton.tsx +26 -51
- package/template/src/atoms/SecondaryButton.tsx +5 -8
- package/template/src/atoms/TextInput.tsx +14 -12
- package/template/src/components/Chat.tsx +214 -86
- package/template/src/components/ChatContext.ts +1 -8
- package/template/src/components/ColorConfigure.tsx +1 -1
- package/template/src/components/ColorContext.ts +1 -1
- package/template/src/components/{Controls1.native.tsx → Controls.native.tsx} +4 -6
- package/template/src/components/Controls.tsx +42 -342
- package/template/src/components/DeviceConfigure.tsx +101 -461
- package/template/src/components/DeviceContext.tsx +4 -8
- package/template/src/components/EventsConfigure.tsx +7 -144
- package/template/src/components/GraphQLProvider.tsx +1 -1
- package/template/src/components/GridVideo.tsx +44 -59
- package/template/src/components/HostControlView.tsx +35 -114
- package/template/src/components/Navbar.tsx +398 -216
- package/template/src/components/NetworkQualityContext.tsx +20 -20
- package/template/src/components/ParticipantsView.tsx +154 -177
- package/template/src/components/PinnedVideo.tsx +120 -207
- package/template/src/components/Precall.native.tsx +119 -358
- package/template/src/components/Precall.tsx +135 -269
- package/template/src/components/RTMConfigure.tsx +4 -27
- package/template/src/components/Router.electron.ts +0 -1
- package/template/src/components/Router.native.ts +0 -1
- package/template/src/components/Router.sdk.ts +0 -1
- package/template/src/components/Router.ts +0 -1
- package/template/src/components/Settings.tsx +95 -26
- package/template/src/components/SettingsView.tsx +56 -251
- package/template/src/components/Share.tsx +273 -302
- package/template/src/components/StorageContext.tsx +3 -30
- package/template/src/components/chat-messages/useChatMessages.tsx +23 -69
- package/template/src/components/chat-ui/useChatUIControl.tsx +0 -7
- package/template/src/components/common/Error.tsx +6 -20
- package/template/src/components/common/Logo.tsx +15 -16
- package/template/src/components/contexts/LiveStreamDataContext.tsx +5 -10
- package/template/src/components/contexts/VideoMeetingDataContext.tsx +7 -37
- package/template/src/components/livestream/LiveStreamContext.tsx +36 -270
- package/template/src/components/livestream/Types.ts +14 -39
- package/template/src/components/livestream/index.ts +0 -1
- package/template/src/components/livestream/views/LiveStreamControls.tsx +4 -12
- package/template/src/components/participants/AllAudienceParticipants.tsx +30 -101
- package/template/src/components/participants/AllHostParticipants.tsx +34 -103
- package/template/src/components/participants/MeParticipant.tsx +38 -0
- package/template/src/components/participants/ParticipantName.tsx +7 -13
- package/template/src/components/participants/ParticipantSectionTitle.tsx +10 -35
- package/template/src/components/participants/RemoteParticipants.tsx +71 -0
- package/template/src/components/participants/ScreenshareParticipants.tsx +12 -144
- package/template/src/components/precall/{LocalMute1.native.tsx → LocalMute.native.tsx} +5 -21
- package/template/src/components/precall/LocalMute.tsx +14 -84
- package/template/src/components/precall/VideoPreview.native.tsx +3 -48
- package/template/src/components/precall/VideoPreview.tsx +7 -163
- package/template/src/components/precall/joinCallBtn.tsx +2 -15
- package/template/src/components/precall/meetingTitle.tsx +12 -15
- package/template/src/components/precall/selectDevice.tsx +21 -1
- package/template/src/components/precall/textInput.tsx +4 -32
- package/template/src/components/precall/usePreCall.tsx +0 -16
- package/template/src/components/styles.ts +21 -42
- package/template/src/components/useShareLink.tsx +14 -12
- package/template/src/language/default-labels/precallScreenLabels.ts +3 -3
- package/template/src/pages/Authenticate.tsx +15 -5
- package/template/src/pages/Create.tsx +165 -293
- package/template/src/pages/Join.tsx +67 -93
- package/template/src/pages/VideoCall.tsx +64 -89
- package/template/src/pages/video-call/DefaultLayouts.ts +4 -4
- package/template/src/pages/video-call/NameWithMicIcon.tsx +44 -120
- package/template/src/pages/video-call/RenderComponent.tsx +2 -3
- package/template/src/pages/video-call/VideoCallScreen.tsx +9 -45
- package/template/src/pages/video-call/VideoComponent.tsx +3 -18
- package/template/src/pages/video-call/VideoRenderer.tsx +60 -218
- package/template/src/rtm-events/constants.ts +0 -2
- package/template/src/subComponents/ChatBubble.tsx +83 -123
- package/template/src/subComponents/ChatContainer.tsx +84 -257
- package/template/src/subComponents/ChatInput.tsx +46 -61
- package/template/src/subComponents/Checkbox.native.tsx +5 -16
- package/template/src/subComponents/Checkbox.tsx +2 -2
- package/template/src/subComponents/CopyJoinInfo.tsx +58 -36
- package/template/src/subComponents/FallbackLogo.tsx +40 -122
- package/template/src/subComponents/LanguageSelector.tsx +1 -1
- package/template/src/subComponents/{LayoutIconDropdown1.native.tsx → LayoutIconDropdown.native.tsx} +18 -4
- package/template/src/subComponents/LayoutIconDropdown.tsx +134 -131
- package/template/src/subComponents/LocalAudioMute.tsx +27 -119
- package/template/src/subComponents/LocalEndCall.tsx +33 -71
- package/template/src/subComponents/LocalSwitchCamera.tsx +30 -17
- package/template/src/subComponents/LocalVideoMute.tsx +27 -117
- package/template/src/subComponents/Logo.tsx +4 -3
- package/template/src/subComponents/LogoutButton.tsx +1 -1
- package/template/src/subComponents/NetworkQualityPill.tsx +63 -60
- package/template/src/subComponents/OpenInNativeButton.tsx +3 -3
- package/template/src/subComponents/Recording.tsx +29 -28
- package/template/src/subComponents/RemoteAudioMute.tsx +29 -83
- package/template/src/subComponents/RemoteEndCall.tsx +5 -8
- package/template/src/subComponents/RemoteVideoMute.tsx +21 -74
- package/template/src/subComponents/ScreenShareNotice.tsx +8 -83
- package/template/src/subComponents/SelectDevice.tsx +61 -404
- package/template/src/subComponents/SelectOAuth.tsx +8 -9
- package/template/src/subComponents/ToastConfig.tsx +10 -150
- package/template/src/subComponents/chat/ChatParticipants.tsx +78 -187
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +32 -95
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +33 -29
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +6 -6
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +11 -24
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +10 -17
- package/template/src/subComponents/recording/useRecording.tsx +27 -79
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +70 -52
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +2 -11
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +4 -26
- package/template/src/utils/common.tsx +1 -155
- package/template/src/utils/index.tsx +0 -19
- package/template/src/utils/isMobileOrTablet.ts +2 -7
- package/template/src/utils/useButtonTemplate.tsx +0 -1
- package/template/src/utils/useMuteToggleLocal.ts +3 -54
- package/template/web/index.html +0 -5
- package/template/webpack.commons.js +8 -13
- package/template/webpack.web.config.js +0 -1
- package/template/agora-rn-uikit/src/Reducer/ActiveSpeakerDetected.ts +0 -11
- package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +0 -24
- package/template/agora-rn-uikit/src/Reducer/UserPin.ts +0 -11
- package/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/android/app/src/main/res/values/colors.xml +0 -7
- package/template/react-native-toast-message/src/components/checkbox.js +0 -178
- package/template/react-native.config.js +0 -7
- package/template/src/assets/font-styles.css +0 -329
- package/template/src/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/permission.png +0 -0
- package/template/src/assets/selection.json +0 -1
- package/template/src/atoms/ActionMenu.tsx +0 -236
- package/template/src/atoms/AnimatedActiveSpeaker.native.tsx +0 -71
- package/template/src/atoms/AnimatedActiveSpeaker.tsx +0 -84
- package/template/src/atoms/AnimatedRings.native.tsx +0 -68
- package/template/src/atoms/AnimatedRings.tsx +0 -70
- package/template/src/atoms/Card.tsx +0 -61
- package/template/src/atoms/CircularProgress.native.tsx +0 -121
- package/template/src/atoms/CircularProgress.tsx +0 -102
- package/template/src/atoms/CustomIcon.tsx +0 -88
- package/template/src/atoms/CustomSwitch.tsx +0 -287
- package/template/src/atoms/Dropdown.tsx +0 -306
- package/template/src/atoms/IconButton.tsx +0 -162
- package/template/src/atoms/ImageIcon.tsx +0 -98
- package/template/src/atoms/InfoBubble.tsx +0 -291
- package/template/src/atoms/Input.tsx +0 -87
- package/template/src/atoms/InviteInfo.tsx +0 -166
- package/template/src/atoms/LinkButton.tsx +0 -28
- package/template/src/atoms/OutlineButton.tsx +0 -61
- package/template/src/atoms/ParticipantsCount.tsx +0 -73
- package/template/src/atoms/Popup.tsx +0 -147
- package/template/src/atoms/RecordingInfo.tsx +0 -49
- package/template/src/atoms/Spacer.tsx +0 -22
- package/template/src/atoms/TertiaryButton.tsx +0 -78
- package/template/src/atoms/Toggle.tsx +0 -47
- package/template/src/atoms/Tooltip.native.tsx +0 -65
- package/template/src/atoms/Tooltip.tsx +0 -94
- package/template/src/atoms/UserAvatar.tsx +0 -60
- package/template/src/components/CommonStyles.ts +0 -44
- package/template/src/components/ToastComponent.tsx +0 -8
- package/template/src/components/participants/Participant.tsx +0 -302
- package/template/src/components/participants/UserActionMenuOptions.tsx +0 -398
- package/template/src/components/popups/InvitePopup.tsx +0 -115
- package/template/src/components/popups/StopRecordingPopup.tsx +0 -114
- package/template/src/components/precall/PermissionHelper.native.tsx +0 -5
- package/template/src/components/precall/PermissionHelper.tsx +0 -126
- package/template/src/components/precall/PreCallSettings.tsx +0 -52
- package/template/src/components/useToast.tsx +0 -41
- package/template/src/components/useVideoCall.tsx +0 -65
- package/template/src/pages/Endcall.tsx +0 -148
- package/template/src/pages/video-call/ActionSheet.native.tsx +0 -215
- package/template/src/pages/video-call/ActionSheet.tsx +0 -226
- package/template/src/pages/video-call/ActionSheetContent.tsx +0 -479
- package/template/src/pages/video-call/ActionSheetHandle.tsx +0 -38
- package/template/src/pages/video-call/ActionSheetStyles.css +0 -138
- package/template/src/pages/video-call/SidePanelHeader.tsx +0 -190
- package/template/src/pages/video-call/VideoCallMobileView.tsx +0 -139
- package/template/src/pages/video-call/VideoCallScreen.native.tsx +0 -37
- package/template/src/subComponents/ChatInput.ios.tsx +0 -237
- package/template/src/subComponents/EndcallPopup.tsx +0 -107
- package/template/src/subComponents/LayoutIconButton.tsx +0 -201
- package/template/src/subComponents/RemoteMutePopup.tsx +0 -193
- package/template/src/subComponents/RemoveMeetingPopup.tsx +0 -109
- package/template/src/subComponents/RemoveScreensharePopup.tsx +0 -109
- package/template/src/subComponents/SelectDeviceSettings.backup.tsx +0 -207
- package/template/src/subComponents/SidePanelHeader.tsx +0 -112
- package/template/src/theme/index.ts +0 -46
- package/template/src/utils/PlatformWrapper.tsx +0 -21
- package/template/src/utils/hexadecimalTransparency.ts +0 -108
- package/template/src/utils/pendingStateUpdateHelper.ts +0 -19
- package/template/src/utils/useFocus.tsx +0 -46
- package/template/src/utils/useIsActiveSpeaker.ts +0 -27
- package/template/src/utils/useIsHandRaised.ts +0 -13
- package/template/src/utils/useRemoteEndScreenshare.ts +0 -26
- package/template/src/utils/useRemoteRequest.ts +0 -84
|
@@ -9,14 +9,12 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
// @ts-nocheck
|
|
13
|
+
import React, {useState} from 'react';
|
|
13
14
|
import {View, Text, StyleSheet, ScrollView} from 'react-native';
|
|
14
15
|
import {useHistory} from '../components/Router';
|
|
15
|
-
|
|
16
|
-
import Logo from '../components/common/Logo';
|
|
17
|
-
import Spacer from '../atoms/Spacer';
|
|
16
|
+
import Logo from '../subComponents/Logo';
|
|
18
17
|
import {
|
|
19
|
-
isMobileUA,
|
|
20
18
|
isValidReactComponent,
|
|
21
19
|
shouldAuthenticate,
|
|
22
20
|
useHasBrandLogo,
|
|
@@ -31,16 +29,6 @@ import {useString} from '../utils/useString';
|
|
|
31
29
|
import {useCustomization} from 'customization-implementation';
|
|
32
30
|
import {useSetMeetingInfo} from '../components/meeting-info/useSetMeetingInfo';
|
|
33
31
|
import {MeetingInfoDefaultValue} from '../components/meeting-info/useMeetingInfo';
|
|
34
|
-
import Card from '../atoms/Card';
|
|
35
|
-
import Input from '../atoms/Input';
|
|
36
|
-
import LinkButton from '../atoms/LinkButton';
|
|
37
|
-
import Toast from '../../react-native-toast-message';
|
|
38
|
-
import useJoinMeeting from '../utils/useJoinMeeting';
|
|
39
|
-
import isMobileOrTablet from '../utils/isMobileOrTablet';
|
|
40
|
-
import ThemeConfig from '../theme';
|
|
41
|
-
|
|
42
|
-
const isLiveStream = $config.EVENT_MODE;
|
|
43
|
-
const mobileOrTablet = isMobileOrTablet();
|
|
44
32
|
|
|
45
33
|
const Join = () => {
|
|
46
34
|
const hasBrandLogo = useHasBrandLogo();
|
|
@@ -48,46 +36,22 @@ const Join = () => {
|
|
|
48
36
|
// const meetingIdInputPlaceholder = useString('meetingIdInputPlaceholder')();
|
|
49
37
|
// const enterMeetingButton = useString('enterMeetingButton')();
|
|
50
38
|
// const createMeetingButton = useString('createMeetingButton')();
|
|
51
|
-
const meetingIdInputPlaceholder =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const enterMeetingButton = isLiveStream ? 'Join Stream' : 'Join Meeting';
|
|
55
|
-
const createMeetingButton = isLiveStream
|
|
56
|
-
? 'Create a Stream'
|
|
57
|
-
: 'Create a meeting';
|
|
39
|
+
const meetingIdInputPlaceholder = 'Enter Meeting ID';
|
|
40
|
+
const enterMeetingButton = 'Enter Meeting';
|
|
41
|
+
const createMeetingButton = 'Create Meeting';
|
|
58
42
|
const history = useHistory();
|
|
59
43
|
const [phrase, setPhrase] = useState('');
|
|
60
44
|
const [error, setError] = useState<null | {name: string; message: string}>(
|
|
61
45
|
null,
|
|
62
46
|
);
|
|
63
|
-
|
|
64
|
-
const useJoin = useJoinMeeting();
|
|
65
47
|
const {setMeetingInfo} = useSetMeetingInfo();
|
|
66
48
|
const createMeeting = () => {
|
|
67
49
|
history.push('/create');
|
|
68
50
|
};
|
|
69
51
|
|
|
70
52
|
const startCall = async () => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
setMeetingInfo(MeetingInfoDefaultValue);
|
|
74
|
-
history.push(phrase);
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
.catch((error) => {
|
|
78
|
-
const isInvalidUrl =
|
|
79
|
-
error?.message.toLowerCase().trim() === 'invalid url' || false;
|
|
80
|
-
Toast.show({
|
|
81
|
-
type: 'error',
|
|
82
|
-
text1: isInvalidUrl ? 'Meeting ID Invalid.' : 'Some Error Occured.',
|
|
83
|
-
text2: isInvalidUrl
|
|
84
|
-
? 'Please enter a valid Meeting ID'
|
|
85
|
-
: 'Please try again',
|
|
86
|
-
visibilityTime: 3000,
|
|
87
|
-
primaryBtn: null,
|
|
88
|
-
secondaryBtn: null,
|
|
89
|
-
});
|
|
90
|
-
});
|
|
53
|
+
setMeetingInfo(MeetingInfoDefaultValue);
|
|
54
|
+
history.push(phrase);
|
|
91
55
|
};
|
|
92
56
|
const {JoinComponent} = useCustomization((data) => {
|
|
93
57
|
let components: {
|
|
@@ -107,83 +71,93 @@ const Join = () => {
|
|
|
107
71
|
return JoinComponent ? (
|
|
108
72
|
<JoinComponent />
|
|
109
73
|
) : (
|
|
110
|
-
<
|
|
111
|
-
<
|
|
74
|
+
<ScrollView contentContainerStyle={style.main}>
|
|
75
|
+
<View style={style.nav}>
|
|
76
|
+
{hasBrandLogo() && <Logo />}
|
|
112
77
|
{error ? <Error error={error} /> : <></>}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<Spacer size={40} />
|
|
121
|
-
<Input
|
|
122
|
-
labelStyle={style.labelStyle}
|
|
123
|
-
label={isLiveStream ? 'Stream ID' : 'Meeting ID'}
|
|
124
|
-
autoFocus
|
|
78
|
+
</View>
|
|
79
|
+
<View style={style.content}>
|
|
80
|
+
<View style={style.leftContent}>
|
|
81
|
+
<Text style={style.heading}>{$config.APP_NAME}</Text>
|
|
82
|
+
<Text style={style.headline}>{$config.LANDING_SUB_HEADING}</Text>
|
|
83
|
+
<View style={style.inputs}>
|
|
84
|
+
<TextInput
|
|
125
85
|
value={phrase}
|
|
126
|
-
helpText={
|
|
127
|
-
isLiveStream
|
|
128
|
-
? 'Enter the stream ID here for the meeting you’d like to join'
|
|
129
|
-
: 'Enter the meeting ID here for the meeting you’d like to join'
|
|
130
|
-
}
|
|
131
|
-
placeholder={meetingIdInputPlaceholder}
|
|
132
86
|
onChangeText={(text) => setPhrase(text)}
|
|
133
87
|
onSubmitEditing={() => startCall()}
|
|
88
|
+
placeholder={meetingIdInputPlaceholder}
|
|
134
89
|
/>
|
|
135
|
-
<
|
|
136
|
-
</View>
|
|
137
|
-
<View style={style.btnContainer}>
|
|
90
|
+
<View style={{height: 10}} />
|
|
138
91
|
<PrimaryButton
|
|
139
|
-
iconName="video-on"
|
|
140
92
|
disabled={phrase === ''}
|
|
141
93
|
onPress={() => startCall()}
|
|
142
94
|
text={enterMeetingButton}
|
|
143
|
-
containerStyle={isMobileUA() && {width: '100%'}}
|
|
144
95
|
/>
|
|
145
|
-
<
|
|
146
|
-
<
|
|
147
|
-
text={createMeetingButton}
|
|
96
|
+
<HorizontalRule />
|
|
97
|
+
<SecondaryButton
|
|
148
98
|
onPress={() => createMeeting()}
|
|
99
|
+
text={createMeetingButton}
|
|
149
100
|
/>
|
|
150
101
|
{shouldAuthenticate ? (
|
|
151
|
-
<LogoutButton
|
|
152
|
-
//@ts-ignore
|
|
153
|
-
setError={setError}
|
|
154
|
-
/> //setError not available in logout?
|
|
102
|
+
<LogoutButton setError={setError} /> //setError not available in logout?
|
|
155
103
|
) : (
|
|
156
104
|
<></>
|
|
157
105
|
)}
|
|
158
106
|
</View>
|
|
159
|
-
</
|
|
160
|
-
</
|
|
161
|
-
</
|
|
107
|
+
</View>
|
|
108
|
+
</View>
|
|
109
|
+
</ScrollView>
|
|
162
110
|
);
|
|
163
111
|
};
|
|
164
112
|
|
|
165
113
|
const style = StyleSheet.create({
|
|
166
|
-
|
|
167
|
-
width: '100%',
|
|
168
|
-
alignItems: 'center',
|
|
169
|
-
},
|
|
170
|
-
labelStyle: {
|
|
171
|
-
paddingLeft: 8,
|
|
172
|
-
},
|
|
173
|
-
root: {
|
|
174
|
-
flex: 1,
|
|
175
|
-
},
|
|
114
|
+
illustration: {flex: 1, alignSelf: 'flex-end'},
|
|
176
115
|
main: {
|
|
116
|
+
paddingVertical: '8%',
|
|
117
|
+
marginHorizontal: '8%',
|
|
118
|
+
display: 'flex',
|
|
119
|
+
justifyContent: 'space-evenly',
|
|
177
120
|
flexGrow: 1,
|
|
121
|
+
},
|
|
122
|
+
nav: {
|
|
123
|
+
flex: 1,
|
|
124
|
+
width: '100%',
|
|
178
125
|
flexDirection: 'row',
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
alignSelf: 'center',
|
|
179
128
|
justifyContent: 'center',
|
|
180
129
|
},
|
|
130
|
+
content: {flex: 6, flexDirection: 'row'},
|
|
131
|
+
leftContent: {
|
|
132
|
+
width: '100%',
|
|
133
|
+
minHeight: 300,
|
|
134
|
+
flex: 1,
|
|
135
|
+
justifyContent: 'space-evenly',
|
|
136
|
+
marginBottom: '15%',
|
|
137
|
+
marginTop: '8%',
|
|
138
|
+
// marginRight: '5%',
|
|
139
|
+
marginHorizontal: 'auto',
|
|
140
|
+
},
|
|
181
141
|
heading: {
|
|
182
|
-
fontSize:
|
|
142
|
+
fontSize: 32,
|
|
183
143
|
fontWeight: '700',
|
|
184
|
-
|
|
185
|
-
color: $config.
|
|
186
|
-
|
|
144
|
+
textAlign: 'center',
|
|
145
|
+
color: $config.PRIMARY_FONT_COLOR,
|
|
146
|
+
marginBottom: 20,
|
|
147
|
+
},
|
|
148
|
+
headline: {
|
|
149
|
+
fontSize: 18,
|
|
150
|
+
fontWeight: '400',
|
|
151
|
+
textAlign: 'center',
|
|
152
|
+
color: $config.PRIMARY_FONT_COLOR,
|
|
153
|
+
marginBottom: 20,
|
|
154
|
+
},
|
|
155
|
+
inputs: {
|
|
156
|
+
flex: 1,
|
|
157
|
+
width: '100%',
|
|
158
|
+
alignSelf: 'flex-start',
|
|
159
|
+
alignItems: 'center',
|
|
160
|
+
justifyContent: 'space-evenly',
|
|
187
161
|
},
|
|
188
162
|
});
|
|
189
163
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
// @ts-nocheck
|
|
13
13
|
import React, {useState, useContext, useEffect} from 'react';
|
|
14
|
-
import {View, StyleSheet, Text
|
|
14
|
+
import {View, StyleSheet, Text} from 'react-native';
|
|
15
15
|
import {
|
|
16
16
|
RtcConfigure,
|
|
17
17
|
PropsProvider,
|
|
@@ -24,7 +24,7 @@ import {useParams, useHistory} from '../components/Router';
|
|
|
24
24
|
import RtmConfigure from '../components/RTMConfigure';
|
|
25
25
|
import DeviceConfigure from '../components/DeviceConfigure';
|
|
26
26
|
import Logo from '../subComponents/Logo';
|
|
27
|
-
import {useHasBrandLogo, isArray
|
|
27
|
+
import {useHasBrandLogo, isArray} from '../utils/common';
|
|
28
28
|
import {SidePanelType} from '../subComponents/SidePanelEnum';
|
|
29
29
|
import {videoView} from '../../theme.json';
|
|
30
30
|
import {LiveStreamContextProvider} from '../components/livestream';
|
|
@@ -54,9 +54,6 @@ import {useWakeLock} from '../components/useWakeLock';
|
|
|
54
54
|
import SDKEvents from '../utils/SdkEvents';
|
|
55
55
|
import {UserPreferenceProvider} from '../components/useUserPreference';
|
|
56
56
|
import EventsConfigure from '../components/EventsConfigure';
|
|
57
|
-
import PermissionHelper from '../components/precall/PermissionHelper';
|
|
58
|
-
import {currentFocus, FocusProvider} from '../utils/useFocus';
|
|
59
|
-
import {VideoCallProvider} from '../components/useVideoCall';
|
|
60
57
|
|
|
61
58
|
enum RnEncryptionEnum {
|
|
62
59
|
/**
|
|
@@ -102,9 +99,6 @@ const VideoCall: React.FC = () => {
|
|
|
102
99
|
const [isRecordingActive, setRecordingActive] = useState(false);
|
|
103
100
|
const [queryComplete, setQueryComplete] = useState(false);
|
|
104
101
|
const [sidePanel, setSidePanel] = useState<SidePanelType>(SidePanelType.None);
|
|
105
|
-
const [currentFocus, setFocus] = useState<currentFocus>({
|
|
106
|
-
editName: false,
|
|
107
|
-
});
|
|
108
102
|
const {phrase} = useParams<{phrase: string}>();
|
|
109
103
|
// commented for v1 release
|
|
110
104
|
//const lifecycle = useCustomization((data) => data.lifecycle);
|
|
@@ -142,7 +136,6 @@ const VideoCall: React.FC = () => {
|
|
|
142
136
|
.then(() => {})
|
|
143
137
|
.catch((error) => {
|
|
144
138
|
setGlobalErrorMessage(error);
|
|
145
|
-
history.push('/');
|
|
146
139
|
});
|
|
147
140
|
}, []);
|
|
148
141
|
|
|
@@ -188,10 +181,7 @@ const VideoCall: React.FC = () => {
|
|
|
188
181
|
history.push('/');
|
|
189
182
|
}, 0),
|
|
190
183
|
};
|
|
191
|
-
|
|
192
|
-
const [isMicAvailable, setMicAvailable] = useState(false);
|
|
193
|
-
const [isSpeakerAvailable, setSpeakerAvailable] = useState(false);
|
|
194
|
-
const [isPermissionRequested, setIsPermissionRequested] = useState(false);
|
|
184
|
+
|
|
195
185
|
return (
|
|
196
186
|
<>
|
|
197
187
|
{queryComplete ? (
|
|
@@ -220,80 +210,65 @@ const VideoCall: React.FC = () => {
|
|
|
220
210
|
currentLayout,
|
|
221
211
|
setLayout,
|
|
222
212
|
}}>
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
<
|
|
235
|
-
<
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
<
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
<
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
</NetworkQualityProvider>
|
|
283
|
-
</CustomUserContextHolder>
|
|
284
|
-
</LocalUserContext>
|
|
285
|
-
</LiveStreamDataProvider>
|
|
286
|
-
</LiveStreamContextProvider>
|
|
287
|
-
</ScreenshareConfigure>
|
|
288
|
-
</RecordingProvider>
|
|
289
|
-
</WhiteboardProvider>
|
|
290
|
-
</EventsConfigure>
|
|
291
|
-
</UserPreferenceProvider>
|
|
292
|
-
</RtmConfigure>
|
|
293
|
-
</ScreenShareProvider>
|
|
294
|
-
</ChatMessagesProvider>
|
|
295
|
-
</SidePanelProvider>
|
|
296
|
-
</FocusProvider>
|
|
213
|
+
<SidePanelProvider
|
|
214
|
+
value={{
|
|
215
|
+
sidePanel,
|
|
216
|
+
setSidePanel,
|
|
217
|
+
}}>
|
|
218
|
+
<ChatMessagesProvider>
|
|
219
|
+
<ScreenShareProvider>
|
|
220
|
+
<RtmConfigure
|
|
221
|
+
setRecordingActive={setRecordingActive}
|
|
222
|
+
callActive={callActive}>
|
|
223
|
+
<UserPreferenceProvider>
|
|
224
|
+
<EventsConfigure>
|
|
225
|
+
<WhiteboardProvider>
|
|
226
|
+
<RecordingProvider
|
|
227
|
+
value={{
|
|
228
|
+
setRecordingActive,
|
|
229
|
+
isRecordingActive,
|
|
230
|
+
}}>
|
|
231
|
+
<ScreenshareConfigure>
|
|
232
|
+
<LiveStreamContextProvider
|
|
233
|
+
value={{
|
|
234
|
+
setRtcProps,
|
|
235
|
+
rtcProps,
|
|
236
|
+
callActive,
|
|
237
|
+
}}>
|
|
238
|
+
<LiveStreamDataProvider>
|
|
239
|
+
<LocalUserContext
|
|
240
|
+
localUid={rtcProps?.uid || 0}>
|
|
241
|
+
<CustomUserContextHolder>
|
|
242
|
+
<NetworkQualityProvider>
|
|
243
|
+
{callActive ? (
|
|
244
|
+
<VideoMeetingDataProvider>
|
|
245
|
+
<VideoCallScreen />
|
|
246
|
+
</VideoMeetingDataProvider>
|
|
247
|
+
) : $config.PRECALL ? (
|
|
248
|
+
<PreCallProvider
|
|
249
|
+
value={{
|
|
250
|
+
callActive,
|
|
251
|
+
setCallActive,
|
|
252
|
+
}}>
|
|
253
|
+
<Precall />
|
|
254
|
+
</PreCallProvider>
|
|
255
|
+
) : (
|
|
256
|
+
<></>
|
|
257
|
+
)}
|
|
258
|
+
</NetworkQualityProvider>
|
|
259
|
+
</CustomUserContextHolder>
|
|
260
|
+
</LocalUserContext>
|
|
261
|
+
</LiveStreamDataProvider>
|
|
262
|
+
</LiveStreamContextProvider>
|
|
263
|
+
</ScreenshareConfigure>
|
|
264
|
+
</RecordingProvider>
|
|
265
|
+
</WhiteboardProvider>
|
|
266
|
+
</EventsConfigure>
|
|
267
|
+
</UserPreferenceProvider>
|
|
268
|
+
</RtmConfigure>
|
|
269
|
+
</ScreenShareProvider>
|
|
270
|
+
</ChatMessagesProvider>
|
|
271
|
+
</SidePanelProvider>
|
|
297
272
|
</LayoutProvider>
|
|
298
273
|
</ChatNotificationProvider>
|
|
299
274
|
</ChatUIControlProvider>
|
|
@@ -327,7 +302,7 @@ const styleProps = {
|
|
|
327
302
|
recording: styles.localButton,
|
|
328
303
|
screenshare: styles.localButton,
|
|
329
304
|
},
|
|
330
|
-
theme: $config.
|
|
305
|
+
theme: $config.PRIMARY_COLOR,
|
|
331
306
|
remoteBtnStyles: {
|
|
332
307
|
muteRemoteAudio: styles.remoteButton,
|
|
333
308
|
muteRemoteVideo: styles.remoteButton,
|
|
@@ -355,7 +330,7 @@ const style = StyleSheet.create({
|
|
|
355
330
|
justifyContent: 'center',
|
|
356
331
|
marginBottom: 30,
|
|
357
332
|
},
|
|
358
|
-
loaderText: {fontWeight: '500', color: $config.
|
|
333
|
+
loaderText: {fontWeight: '500', color: $config.PRIMARY_FONT_COLOR},
|
|
359
334
|
});
|
|
360
335
|
|
|
361
336
|
export default VideoCall;
|
|
@@ -7,14 +7,14 @@ import {useLayout} from '../../utils/useLayout';
|
|
|
7
7
|
export const DefaultLayouts: layoutObjectType[] = [
|
|
8
8
|
{
|
|
9
9
|
name: 'grid',
|
|
10
|
-
label: 'Grid',
|
|
11
|
-
iconName: '
|
|
10
|
+
label: 'Grid Layout',
|
|
11
|
+
iconName: 'gridLayoutIcon',
|
|
12
12
|
component: GridVideo,
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
name: 'pinned',
|
|
16
|
-
label: 'Pinned',
|
|
17
|
-
iconName: '
|
|
16
|
+
label: 'Pinned Layout',
|
|
17
|
+
iconName: 'pinnedLayoutIcon',
|
|
18
18
|
component: PinnedVideo,
|
|
19
19
|
},
|
|
20
20
|
];
|
|
@@ -1,144 +1,68 @@
|
|
|
1
|
-
import React, {useContext
|
|
2
|
-
import {View, StyleSheet, useWindowDimensions
|
|
1
|
+
import React, {useContext} from 'react';
|
|
2
|
+
import {View, StyleSheet, useWindowDimensions} from 'react-native';
|
|
3
3
|
import {RFValue} from 'react-native-responsive-fontsize';
|
|
4
|
-
import
|
|
5
|
-
import {RenderInterface} from '../../../agora-rn-uikit';
|
|
6
|
-
import ImageIcon from '../../atoms/ImageIcon';
|
|
4
|
+
import {ImageIcon, RenderInterface} from '../../../agora-rn-uikit';
|
|
7
5
|
import TextWithTooltip from '../../subComponents/TextWithTooltip';
|
|
6
|
+
import ColorContext from '../../components/ColorContext';
|
|
8
7
|
import {useString} from '../../utils/useString';
|
|
9
|
-
import {useLayout, useRender} from 'customization-api';
|
|
10
|
-
import useIsActiveSpeaker from '../../utils/useIsActiveSpeaker';
|
|
11
|
-
import {isMobileUA, isWeb, isWebInternal, useIsSmall} from '../../utils/common';
|
|
12
|
-
import AnimatedActiveSpeaker from '../../atoms/AnimatedActiveSpeaker';
|
|
13
|
-
import {getGridLayoutName, getPinnedLayoutName} from './DefaultLayouts';
|
|
14
8
|
|
|
15
9
|
interface NameWithMicIconProps {
|
|
16
10
|
user: RenderInterface;
|
|
17
|
-
isMax: boolean;
|
|
18
|
-
videoTileWidth: number;
|
|
19
11
|
}
|
|
20
12
|
|
|
21
13
|
const NameWithMicIcon = (props: NameWithMicIconProps) => {
|
|
22
|
-
const {activeUids} = useRender();
|
|
23
|
-
const {currentLayout} = useLayout();
|
|
24
|
-
const reduceSpace =
|
|
25
|
-
isMobileUA() &&
|
|
26
|
-
activeUids.length > 4 &&
|
|
27
|
-
currentLayout === getGridLayoutName();
|
|
28
14
|
const {user} = props;
|
|
15
|
+
const {primaryColor} = useContext(ColorContext);
|
|
29
16
|
const {height, width} = useWindowDimensions();
|
|
30
|
-
const isActiveSpeaker = useIsActiveSpeaker();
|
|
31
|
-
const isSpeaking = isActiveSpeaker(user.uid);
|
|
32
17
|
//commented for v1 release
|
|
33
18
|
//const remoteUserDefaultLabel = useString('remoteUserDefaultLabel')();
|
|
34
19
|
const remoteUserDefaultLabel = 'User';
|
|
35
|
-
const isSmall = useIsSmall();
|
|
36
20
|
return (
|
|
37
|
-
|
|
38
|
-
style={[
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
: 'mic-off'
|
|
58
|
-
}
|
|
59
|
-
tintColor={
|
|
60
|
-
user.audio
|
|
61
|
-
? $config.PRIMARY_ACTION_BRAND_COLOR
|
|
62
|
-
: $config.SEMANTIC_ERROR
|
|
63
|
-
}
|
|
64
|
-
iconSize={20}
|
|
65
|
-
/>
|
|
66
|
-
{/* )} */}
|
|
67
|
-
{/* <ImageIcon
|
|
68
|
-
name={
|
|
69
|
-
isSpeaking ? 'active-speaker' : user.audio ? 'mic-on' : 'mic-off'
|
|
70
|
-
}
|
|
71
|
-
tintColor={
|
|
72
|
-
isSpeaking
|
|
73
|
-
? $config.PRIMARY_ACTION_BRAND_COLOR
|
|
74
|
-
: user.audio
|
|
75
|
-
? $config.PRIMARY_ACTION_BRAND_COLOR
|
|
76
|
-
: $config.SEMANTIC_ERROR
|
|
77
|
-
}
|
|
78
|
-
iconSize={'small'}
|
|
79
|
-
/> */}
|
|
80
|
-
{(isMobileUA() || (!isMobileUA() && isSmall())) &&
|
|
81
|
-
currentLayout === getGridLayoutName() &&
|
|
82
|
-
activeUids.length > 6 ? (
|
|
83
|
-
// || (isMobileUA() &&
|
|
84
|
-
// currentLayout !== getPinnedLayoutName() &&
|
|
85
|
-
// !props?.isMax)
|
|
86
|
-
<></>
|
|
87
|
-
) : (
|
|
88
|
-
<PlatformWrapper>
|
|
89
|
-
<Text
|
|
90
|
-
numberOfLines={1}
|
|
91
|
-
textBreakStrategy="simple"
|
|
92
|
-
ellipsizeMode="tail"
|
|
93
|
-
style={style.name}>
|
|
94
|
-
{user.name || remoteUserDefaultLabel}
|
|
95
|
-
</Text>
|
|
96
|
-
</PlatformWrapper>
|
|
97
|
-
)}
|
|
98
|
-
</View>
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
const PlatformWrapper = ({children}) => {
|
|
102
|
-
return isWeb() ? (
|
|
103
|
-
<div
|
|
104
|
-
style={{
|
|
105
|
-
userSelect: 'none',
|
|
106
|
-
MozUserSelect: 'none',
|
|
107
|
-
WebkitUserSelect: 'none',
|
|
108
|
-
msUserSelect: 'none',
|
|
109
|
-
alignSelf: 'center',
|
|
110
|
-
overflow: 'hidden',
|
|
111
|
-
textOverflow: 'ellipsis',
|
|
112
|
-
color: $config.VIDEO_AUDIO_TILE_TEXT_COLOR,
|
|
113
|
-
}}>
|
|
114
|
-
{children}
|
|
115
|
-
</div>
|
|
116
|
-
) : (
|
|
117
|
-
<>{children}</>
|
|
21
|
+
<>
|
|
22
|
+
<View style={[style.MicBackdrop]}>
|
|
23
|
+
<ImageIcon
|
|
24
|
+
name={user.audio ? 'mic' : 'micOff'}
|
|
25
|
+
color={user.audio ? primaryColor : 'red'}
|
|
26
|
+
style={style.MicIcon}
|
|
27
|
+
/>
|
|
28
|
+
</View>
|
|
29
|
+
<View style={{flex: 1}}>
|
|
30
|
+
<TextWithTooltip
|
|
31
|
+
value={user.name || remoteUserDefaultLabel}
|
|
32
|
+
style={[
|
|
33
|
+
style.name,
|
|
34
|
+
{
|
|
35
|
+
fontSize: RFValue(14, height > width ? height : width),
|
|
36
|
+
},
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
</View>
|
|
40
|
+
</>
|
|
118
41
|
);
|
|
119
42
|
};
|
|
120
43
|
|
|
121
44
|
const style = StyleSheet.create({
|
|
122
|
-
container: {
|
|
123
|
-
backgroundColor: $config.VIDEO_AUDIO_TILE_OVERLAY_COLOR,
|
|
124
|
-
position: 'absolute',
|
|
125
|
-
alignItems: 'center',
|
|
126
|
-
padding: 8,
|
|
127
|
-
// height: 34,
|
|
128
|
-
left: 8,
|
|
129
|
-
bottom: 8,
|
|
130
|
-
borderRadius: 4,
|
|
131
|
-
flexDirection: 'row',
|
|
132
|
-
zIndex: 5,
|
|
133
|
-
},
|
|
134
45
|
name: {
|
|
135
|
-
color: $config.
|
|
136
|
-
|
|
137
|
-
fontWeight: '
|
|
138
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
46
|
+
color: $config.PRIMARY_FONT_COLOR,
|
|
47
|
+
lineHeight: 25,
|
|
48
|
+
fontWeight: '700',
|
|
139
49
|
flexShrink: 1,
|
|
140
|
-
|
|
141
|
-
|
|
50
|
+
},
|
|
51
|
+
MicBackdrop: {
|
|
52
|
+
width: 20,
|
|
53
|
+
height: 20,
|
|
54
|
+
borderRadius: 15,
|
|
55
|
+
marginHorizontal: 10,
|
|
56
|
+
backgroundColor: $config.SECONDARY_FONT_COLOR,
|
|
57
|
+
display: 'flex',
|
|
58
|
+
alignSelf: 'center',
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
},
|
|
61
|
+
MicIcon: {
|
|
62
|
+
width: '80%',
|
|
63
|
+
height: '80%',
|
|
64
|
+
alignSelf: 'center',
|
|
65
|
+
resizeMode: 'contain',
|
|
142
66
|
},
|
|
143
67
|
});
|
|
144
68
|
|