agora-appbuilder-core 2.3.0-beta.9 → 3.0.0
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 +11 -6
- package/package.json +1 -1
- package/template/Gulpfile.js +121 -83
- package/template/_gitignore +2 -2
- package/template/_package-lock.json +12959 -13248
- package/template/agora-rn-uikit/src/AgoraUIKit.tsx +2 -2
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +2 -0
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +3 -3
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +4 -5
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +3 -1
- package/template/agora-rn-uikit/src/Controls/LocalControls.tsx +2 -2
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +4 -4
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +7 -5
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +1 -1
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +2 -2
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +88 -43
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +13 -4
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +36 -19
- package/template/agora-rn-uikit/src/Utils/permission.ts +17 -6
- package/template/babel.config.js +9 -9
- package/template/bridge/rtc/webNg/RtcEngine.ts +51 -26
- package/template/customization-api/action-library.ts +22 -0
- package/template/{fpe-api/context.ts → customization-api/app-state.ts} +16 -14
- package/template/customization-api/customEvents.ts +9 -0
- package/template/{fpe-api/install.ts → customization-api/customize.ts} +27 -26
- package/template/{fpe-api → customization-api}/index.ts +11 -6
- package/template/{fpe-api/components.ts → customization-api/sub-components.ts} +22 -3
- package/template/{fpe-api → customization-api}/typeDefinition.ts +13 -14
- package/template/customization-api/utils.ts +30 -0
- package/template/{fpe-implementation → customization-implementation}/createHook.ts +0 -0
- package/template/{fpe-implementation/dummyFpe.ts → customization-implementation/dummyConfig.ts} +4 -4
- package/template/customization-implementation/index.ts +4 -0
- package/template/{fpe-api/useFpe.tsx → customization-implementation/useCustomization.tsx} +12 -12
- package/template/{fpe.config.js → customization.config.js} +11 -11
- package/template/electron/main/index.js +42 -35
- package/template/esbuild.rsdk.go +8 -17
- package/template/global.d.ts +4 -3
- package/template/index.rsdk.tsx +13 -5
- package/template/index.wsdk.tsx +21 -5
- package/template/package.json +3 -0
- package/template/react-native-toast-message/src/index.js +3 -7
- package/template/react-native-toast-message/src/{index.wsdk.js → index.sdk.tsx} +1 -1
- package/template/react-native-toast-message/src/styles.sdk.ts +17 -0
- package/template/src/App.tsx +8 -4
- package/template/src/AppWrapper.tsx +8 -6
- package/template/src/SDKAppWrapper.tsx +28 -21
- package/template/src/app-state/useLocalUserInfo.ts +8 -0
- package/template/src/app-state/useMessages.ts +52 -0
- package/template/src/atoms/PrimaryButton.tsx +2 -2
- package/template/src/atoms/SecondaryButton.tsx +12 -4
- package/template/src/atoms/TextInput.tsx +2 -2
- package/template/src/components/Chat.tsx +22 -11
- package/template/src/components/ChatContext.ts +10 -27
- package/template/src/components/Controls.native.tsx +13 -7
- package/template/src/components/Controls.tsx +15 -24
- package/template/src/components/DeviceConfigure.tsx +4 -3
- package/template/src/components/EventsConfigure.tsx +54 -0
- package/template/src/components/GridVideo.tsx +5 -6
- package/template/src/components/HostControlView.tsx +13 -19
- package/template/src/components/Navbar.tsx +54 -41
- package/template/src/components/NetworkQualityContext.tsx +4 -3
- package/template/src/components/ParticipantsView.tsx +7 -7
- package/template/src/components/PinnedVideo.tsx +3 -4
- package/template/src/components/Precall.native.tsx +3 -3
- package/template/src/components/Precall.tsx +14 -10
- package/template/src/components/RTMConfigure.tsx +61 -219
- package/template/src/components/SettingsView.tsx +6 -3
- package/template/src/components/Share.tsx +24 -18
- package/template/src/components/chat-messages/useChatMessages.tsx +397 -80
- package/template/src/components/chat-notification/useChatNotification.tsx +2 -2
- package/template/src/components/chat-ui/useChatUIControl.tsx +1 -1
- package/template/src/components/common/Logo.tsx +3 -2
- package/template/src/components/contexts/LiveStreamDataContext.tsx +3 -3
- package/template/src/components/contexts/ScreenShareContext.tsx +3 -1
- package/template/src/components/contexts/VideoMeetingDataContext.tsx +85 -0
- package/template/src/components/contexts/WhiteboardContext.tsx +8 -8
- package/template/src/components/livestream/LiveStreamContext.tsx +88 -74
- package/template/src/components/meeting-info/useMeetingInfo.tsx +23 -19
- package/template/src/components/meeting-info/useSetMeetingInfo.tsx +1 -1
- package/template/src/components/participants/AllAudienceParticipants.tsx +2 -2
- package/template/src/components/participants/AllHostParticipants.tsx +4 -4
- package/template/src/components/participants/MeParticipant.tsx +5 -3
- package/template/src/components/participants/ParticipantName.tsx +2 -2
- package/template/src/components/participants/RemoteParticipants.tsx +9 -7
- package/template/src/components/precall/LocalMute.native.tsx +14 -10
- package/template/src/components/precall/LocalMute.tsx +7 -5
- package/template/src/components/precall/VideoPreview.native.tsx +6 -6
- package/template/src/components/precall/VideoPreview.tsx +3 -3
- package/template/src/components/precall/joinCallBtn.tsx +3 -3
- package/template/src/components/precall/meetingTitle.tsx +3 -1
- package/template/src/components/precall/selectDevice.tsx +2 -2
- package/template/src/components/precall/usePreCall.tsx +1 -1
- package/template/src/components/styles.ts +3 -3
- package/template/src/components/useShareLink.tsx +69 -29
- package/template/src/components/useUserPreference.tsx +16 -15
- package/template/src/components/useWakeLock.tsx +3 -3
- package/template/src/language/i18nTypes.ts +1 -1
- package/template/src/language/index.ts +2 -2
- package/template/src/language/useLanguage.tsx +2 -3
- package/template/src/pages/Authenticate.tsx +3 -2
- package/template/src/pages/Create.tsx +18 -20
- package/template/src/pages/Join.tsx +6 -7
- package/template/src/pages/VideoCall.tsx +74 -66
- package/template/src/pages/create/useCreate.tsx +1 -1
- package/template/src/pages/video-call/CustomUserContextHolder.tsx +14 -6
- package/template/src/pages/video-call/DefaultLayouts.ts +8 -8
- package/template/src/pages/video-call/{NameWithMicStatus.tsx → NameWithMicIcon.tsx} +8 -1
- package/template/src/pages/video-call/RenderComponent.tsx +7 -10
- package/template/src/pages/video-call/VideoCallScreen.tsx +31 -22
- package/template/src/pages/video-call/VideoComponent.tsx +13 -15
- package/template/src/pages/video-call/VideoRenderer.tsx +6 -6
- package/template/src/pages/video-call/useLayoutsData.ts +23 -0
- package/template/src/rtm/RTMEngine.ts +13 -0
- package/template/src/rtm-events/EventUtils.ts +20 -20
- package/template/src/rtm-events/EventsQueue.ts +9 -3
- package/template/src/rtm-events/constants.ts +5 -0
- package/template/src/rtm-events/index.tsx +1 -3
- package/template/src/{custom-events/CustomEvents.ts → rtm-events-api/Events.ts} +67 -61
- package/template/src/rtm-events-api/index.tsx +6 -0
- package/template/src/rtm-events-api/types.ts +22 -0
- package/template/src/subComponents/ChatBubble.tsx +24 -8
- package/template/src/subComponents/ChatContainer.tsx +24 -15
- package/template/src/subComponents/ChatInput.tsx +56 -42
- package/template/src/subComponents/LanguageSelector.tsx +2 -2
- package/template/src/subComponents/LayoutIconDropdown.native.tsx +5 -5
- package/template/src/subComponents/LayoutIconDropdown.tsx +7 -7
- package/template/src/subComponents/LocalAudioMute.tsx +3 -4
- package/template/src/subComponents/LocalEndCall.tsx +3 -6
- package/template/src/subComponents/LocalSwitchCamera.tsx +3 -4
- package/template/src/subComponents/LocalVideoMute.tsx +3 -3
- package/template/src/subComponents/NetworkQualityPill.tsx +8 -9
- package/template/src/subComponents/OpenInNativeButton.tsx +2 -3
- package/template/src/subComponents/RemoteAudioMute.tsx +5 -11
- package/template/src/subComponents/RemoteEndCall.tsx +3 -10
- package/template/src/subComponents/RemoteVideoMute.tsx +3 -10
- package/template/src/subComponents/SelectDevice.tsx +1 -1
- package/template/src/subComponents/SelectOAuth.tsx +3 -2
- package/template/src/subComponents/SidePanelButtons.ts +6 -5
- package/template/src/subComponents/TextWithTooltip.tsx +6 -2
- package/template/src/subComponents/{toastConfig.tsx → ToastConfig.tsx} +2 -2
- package/template/src/subComponents/chat/ChatParticipants.tsx +6 -5
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +2 -2
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +4 -3
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +2 -2
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +2 -4
- package/template/src/subComponents/livestream/index.ts +2 -2
- package/template/src/subComponents/recording/useRecording.tsx +44 -23
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +11 -5
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +46 -34
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +97 -38
- package/template/src/subComponents/screenshare/useScreenshare.tsx +1 -1
- package/template/src/utils/SdkEvents.ts +9 -46
- package/template/src/utils/common.tsx +25 -9
- package/template/src/utils/getUniqueID.ts +5 -0
- package/template/src/utils/isMobileOrTablet.native.ts +2 -2
- package/template/src/utils/isMobileOrTablet.ts +21 -8
- package/template/src/utils/useButtonTemplate.tsx +1 -1
- package/template/src/utils/useCreateMeeting.ts +21 -10
- package/template/src/utils/useGetMeetingPhrase.ts +11 -8
- package/template/src/utils/{IsAttendeeUser.ts → useIsAttendee.ts} +3 -1
- package/template/src/utils/{isAudioEnabled.ts → useIsAudioEnabled.ts} +4 -4
- package/template/src/utils/{isHostUser.ts → useIsHost.ts} +13 -16
- package/template/src/utils/{isPSTNUser.ts → useIsPSTN.ts} +2 -2
- package/template/src/utils/{isScreenShareUser.ts → useIsScreenShare.ts} +0 -0
- package/template/src/utils/{isVideoEnabled.ts → useIsVideoEnabled.ts} +5 -6
- package/template/src/utils/useJoinMeeting.ts +8 -6
- package/template/src/utils/useLayout.tsx +5 -5
- package/template/src/utils/useMutePSTN.ts +5 -3
- package/template/src/utils/useMuteToggleLocal.ts +3 -4
- package/template/src/utils/useRemoteEndCall.ts +11 -10
- package/template/src/utils/useRemoteMute.ts +42 -20
- package/template/src/utils/useSidePanel.tsx +1 -1
- package/template/src/utils/useString.ts +2 -2
- package/template/src/utils/useUserName.ts +11 -0
- package/template/tsconfig_fpeApi.json +8 -9
- package/template/tsconfig_rsdk_index.json +8 -9
- package/template/tsconfig_wsdk_index.json +8 -9
- package/template/webpack.commons.js +9 -9
- package/template/webpack.rsdk.config.js +4 -2
- package/template/webpack.ts.config.js +6 -6
- package/template/webpack.wsdk.config.js +2 -1
- package/template/fpe-api/fpeEvents.ts +0 -9
- package/template/fpe-api/utils.ts +0 -61
- package/template/fpe-implementation/index.ts +0 -1
- package/template/fpe-todo.txt +0 -14
- package/template/src/components/RTMEvents.tsx +0 -84
- package/template/src/custom-events/index.tsx +0 -4
- package/template/src/custom-events/types.ts +0 -51
- package/template/src/pages/video-call/CustomLayout.ts +0 -17
- package/template/src/rtm-events/types.ts +0 -7
- package/template/src/utils/getMeetingInvite.ts +0 -53
- package/template/src/utils/useGroupMessages.ts +0 -24
- package/template/src/utils/useNavParams.ts +0 -6
- package/template/src/utils/useNavigateTo.ts +0 -8
- package/template/src/utils/usePrivateMessages.ts +0 -33
- package/template/src/utils/useSendControlMessage.ts +0 -51
- package/template/src/utils/useSendMessage.ts +0 -40
- package/template/src/utils/useSetUnreadMessageCount.ts +0 -43
- package/template/src/utils/useUnreadMessageCount.ts +0 -50
- package/template/src/utils/useUserList.ts +0 -26
|
@@ -17,7 +17,7 @@ import icons from '../assets/icons';
|
|
|
17
17
|
import {useString} from '../utils/useString';
|
|
18
18
|
import {useChatMessages} from '../components/chat-messages/useChatMessages';
|
|
19
19
|
import {isValidReactComponent} from '../utils/common';
|
|
20
|
-
import {
|
|
20
|
+
import {useCustomization} from 'customization-implementation';
|
|
21
21
|
import {useChatUIControl} from '../components/chat-ui/useChatUIControl';
|
|
22
22
|
|
|
23
23
|
export interface ChatSendButtonProps {
|
|
@@ -119,48 +119,62 @@ export const ChatTextInput = (props: ChatTextInputProps) => {
|
|
|
119
119
|
/**
|
|
120
120
|
* Input component for the Chat interface
|
|
121
121
|
*/
|
|
122
|
-
const ChatInput = (
|
|
122
|
+
const ChatInput = (props: {
|
|
123
|
+
chatInput?: React.ComponentType<ChatTextInputProps>;
|
|
124
|
+
chatSendButton?: React.ComponentType<ChatSendButtonProps>;
|
|
125
|
+
}) => {
|
|
123
126
|
const {primaryColor} = useContext(ColorContext);
|
|
124
|
-
const {ChatInputComponent, ChatSendButtonComponent} =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
127
|
+
const {ChatInputComponent, ChatSendButtonComponent} = useCustomization(
|
|
128
|
+
(data) => {
|
|
129
|
+
let components: {
|
|
130
|
+
ChatInputComponent: React.ComponentType<ChatTextInputProps>;
|
|
131
|
+
ChatSendButtonComponent: React.ComponentType<ChatSendButtonProps>;
|
|
132
|
+
} = {
|
|
133
|
+
ChatInputComponent: ChatTextInput,
|
|
134
|
+
ChatSendButtonComponent: ChatSendButton,
|
|
135
|
+
};
|
|
136
|
+
if (
|
|
137
|
+
data?.components?.videoCall &&
|
|
138
|
+
typeof data?.components?.videoCall === 'object'
|
|
139
|
+
) {
|
|
140
|
+
if (
|
|
141
|
+
data?.components?.videoCall?.chat &&
|
|
142
|
+
typeof data?.components?.videoCall?.chat === 'object'
|
|
143
|
+
) {
|
|
144
|
+
if (
|
|
145
|
+
data?.components?.videoCall?.chat?.chatInput &&
|
|
146
|
+
typeof data?.components?.videoCall?.chat?.chatInput !== 'object' &&
|
|
147
|
+
isValidReactComponent(data?.components?.videoCall?.chat?.chatInput)
|
|
148
|
+
) {
|
|
149
|
+
components.ChatInputComponent =
|
|
150
|
+
data?.components?.videoCall?.chat?.chatInput;
|
|
151
|
+
}
|
|
152
|
+
if (
|
|
153
|
+
data?.components?.videoCall?.chat?.chatSendButton &&
|
|
154
|
+
typeof data?.components?.videoCall?.chat?.chatSendButton !==
|
|
155
|
+
'object' &&
|
|
156
|
+
isValidReactComponent(
|
|
157
|
+
data?.components?.videoCall?.chat?.chatSendButton,
|
|
158
|
+
)
|
|
159
|
+
) {
|
|
160
|
+
components.ChatSendButtonComponent =
|
|
161
|
+
data?.components?.videoCall?.chat?.chatSendButton;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
if (props?.chatInput && isValidReactComponent(props.chatInput)) {
|
|
166
|
+
components.ChatInputComponent = props.chatInput;
|
|
167
|
+
}
|
|
168
|
+
if (
|
|
169
|
+
props?.chatSendButton &&
|
|
170
|
+
isValidReactComponent(props.chatSendButton)
|
|
171
|
+
) {
|
|
172
|
+
components.ChatSendButtonComponent = props.chatSendButton;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return components;
|
|
176
|
+
},
|
|
177
|
+
);
|
|
164
178
|
|
|
165
179
|
return (
|
|
166
180
|
<View style={[style.inputView, {borderColor: primaryColor, height: 40}]}>
|
|
@@ -13,14 +13,14 @@ import React, {useContext} from 'react';
|
|
|
13
13
|
import {Picker, StyleSheet, Text} from 'react-native';
|
|
14
14
|
import ColorContext from '../components/ColorContext';
|
|
15
15
|
import {useLanguage} from '../language/useLanguage';
|
|
16
|
-
import {
|
|
16
|
+
import {useCustomization} from 'customization-implementation';
|
|
17
17
|
import {useString} from '../utils/useString';
|
|
18
18
|
import {DEFAULT_I18_DATA} from '../language';
|
|
19
19
|
|
|
20
20
|
const LanguageSelector = () => {
|
|
21
21
|
const {primaryColor} = useContext(ColorContext);
|
|
22
22
|
const {languageCode, setLanguageCode} = useLanguage();
|
|
23
|
-
const languageData =
|
|
23
|
+
const languageData = useCustomization((data) => data?.i18n);
|
|
24
24
|
//commented for v1 release
|
|
25
25
|
//const languageText = useString('language')();
|
|
26
26
|
const languageText = 'Language';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
Dimensions,
|
|
10
10
|
} from 'react-native';
|
|
11
11
|
import {ImageIcon} from '../../agora-rn-uikit';
|
|
12
|
-
import
|
|
12
|
+
import useLayoutsData from '../pages/video-call/useLayoutsData';
|
|
13
13
|
import {useLayout} from '../utils/useLayout';
|
|
14
14
|
|
|
15
15
|
const deviceHeight = Dimensions.get('screen').height;
|
|
@@ -24,15 +24,15 @@ interface LayoutIconDropdownProps {
|
|
|
24
24
|
|
|
25
25
|
const LayoutIconDropdown = (props: LayoutIconDropdownProps) => {
|
|
26
26
|
const {showDropdown, setShowDropdown} = props;
|
|
27
|
-
const layouts =
|
|
28
|
-
const {
|
|
27
|
+
const layouts = useLayoutsData();
|
|
28
|
+
const {currentLayout, setLayout} = useLayout();
|
|
29
29
|
const selectedItemHighlighter = (isSelected: boolean) => {
|
|
30
30
|
return <View style={isSelected ? style.highlighter : {}} />;
|
|
31
31
|
};
|
|
32
32
|
const renderDropdown = () => {
|
|
33
33
|
const data = layouts.map((item, index) => {
|
|
34
34
|
let onPress = () => {
|
|
35
|
-
|
|
35
|
+
setLayout(item.name);
|
|
36
36
|
setShowDropdown(false);
|
|
37
37
|
};
|
|
38
38
|
let content = [];
|
|
@@ -58,7 +58,7 @@ const LayoutIconDropdown = (props: LayoutIconDropdownProps) => {
|
|
|
58
58
|
key={'dropdownLayoutIcon' + index}>
|
|
59
59
|
<>
|
|
60
60
|
<View style={style.highlighterContainer}>
|
|
61
|
-
{selectedItemHighlighter(item.name ===
|
|
61
|
+
{selectedItemHighlighter(item.name === currentLayout)}
|
|
62
62
|
</View>
|
|
63
63
|
<View style={{flex: 1}}>{BtnTemplateLocal}</View>
|
|
64
64
|
<View style={style.layoutNameContainer}>
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
TouchableWithoutFeedback,
|
|
8
8
|
Modal,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import {
|
|
10
|
+
import {isWebInternal} from '../utils/common';
|
|
11
11
|
import {ImageIcon} from '../../agora-rn-uikit';
|
|
12
|
-
import
|
|
12
|
+
import useLayoutsData from '../pages/video-call/useLayoutsData';
|
|
13
13
|
import {useLayout} from '../utils/useLayout';
|
|
14
14
|
import DimensionContext from '../components/dimension/DimensionContext';
|
|
15
15
|
|
|
@@ -33,10 +33,10 @@ const LayoutIconDropdown = (props: LayoutIconDropdownProps) => {
|
|
|
33
33
|
const {getDimensionData} = useContext(DimensionContext);
|
|
34
34
|
const {isDesktop, dim} = getDimensionData();
|
|
35
35
|
|
|
36
|
-
const layouts =
|
|
37
|
-
const {
|
|
36
|
+
const layouts = useLayoutsData();
|
|
37
|
+
const {currentLayout, setLayout} = useLayout();
|
|
38
38
|
const renderSeparatorHorizontal = () => {
|
|
39
|
-
return
|
|
39
|
+
return isWebInternal() && isDesktop ? (
|
|
40
40
|
<View style={style.navItem}>
|
|
41
41
|
<View style={style.navItemSeparatorHorizontal}></View>
|
|
42
42
|
</View>
|
|
@@ -50,7 +50,7 @@ const LayoutIconDropdown = (props: LayoutIconDropdownProps) => {
|
|
|
50
50
|
const renderDropdown = () => {
|
|
51
51
|
const data = layouts.map((item, index) => {
|
|
52
52
|
let onPress = () => {
|
|
53
|
-
|
|
53
|
+
setLayout(item.name);
|
|
54
54
|
setShowDropdown(false);
|
|
55
55
|
};
|
|
56
56
|
let content = [];
|
|
@@ -76,7 +76,7 @@ const LayoutIconDropdown = (props: LayoutIconDropdownProps) => {
|
|
|
76
76
|
onPress={onPress}>
|
|
77
77
|
<>
|
|
78
78
|
<View style={style.highlighterContainer}>
|
|
79
|
-
{selectedItemHighlighter(item.name ===
|
|
79
|
+
{selectedItemHighlighter(item.name === currentLayout)}
|
|
80
80
|
</View>
|
|
81
81
|
<View style={{flex: 1}}>{BtnTemplateLocal}</View>
|
|
82
82
|
<View style={style.layoutNameContainer}>
|
|
@@ -9,11 +9,10 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
-
import React
|
|
12
|
+
import React from 'react';
|
|
13
13
|
import {
|
|
14
14
|
BtnTemplate,
|
|
15
15
|
ToggleState,
|
|
16
|
-
LocalContext,
|
|
17
16
|
BtnTemplateInterface,
|
|
18
17
|
} from '../../agora-rn-uikit';
|
|
19
18
|
import useMuteToggleLocal, {MUTE_LOCAL_TYPE} from '../utils/useMuteToggleLocal';
|
|
@@ -23,7 +22,7 @@ import {
|
|
|
23
22
|
useButtonTemplate,
|
|
24
23
|
} from '../utils/useButtonTemplate';
|
|
25
24
|
import {useString} from '../utils/useString';
|
|
26
|
-
|
|
25
|
+
import {useLocalUserInfo} from 'customization-api';
|
|
27
26
|
/**
|
|
28
27
|
* A component to mute / unmute the local audio
|
|
29
28
|
*/
|
|
@@ -37,7 +36,7 @@ export interface LocalAudioMuteProps {
|
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
function LocalAudioMute(props: LocalAudioMuteProps) {
|
|
40
|
-
const local =
|
|
39
|
+
const local = useLocalUserInfo();
|
|
41
40
|
const localMute = useMuteToggleLocal();
|
|
42
41
|
//commented for v1 release
|
|
43
42
|
//const audioLabel = useString('toggleAudioButton')();
|
|
@@ -3,13 +3,10 @@ import {
|
|
|
3
3
|
ButtonTemplateName,
|
|
4
4
|
useButtonTemplate,
|
|
5
5
|
} from '../utils/useButtonTemplate';
|
|
6
|
-
import {
|
|
7
|
-
BtnTemplate,
|
|
8
|
-
BtnTemplateInterface,
|
|
9
|
-
RtcContext,
|
|
10
|
-
} from '../../agora-rn-uikit';
|
|
6
|
+
import {BtnTemplate, BtnTemplateInterface} from '../../agora-rn-uikit';
|
|
11
7
|
import Styles from '../components/styles';
|
|
12
8
|
import {useString} from '../utils/useString';
|
|
9
|
+
import {useRtc} from 'customization-api';
|
|
13
10
|
|
|
14
11
|
export interface LocalEndcallProps {
|
|
15
12
|
buttonTemplateName?: ButtonTemplateName;
|
|
@@ -20,7 +17,7 @@ export interface LocalEndcallProps {
|
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
const LocalEndcall = (props: LocalEndcallProps) => {
|
|
23
|
-
const {dispatch} =
|
|
20
|
+
const {dispatch} = useRtc();
|
|
24
21
|
//commented for v1 release
|
|
25
22
|
//const endCallLabel = useString('endCallButton')();
|
|
26
23
|
const endCallLabel = 'Hang Up';
|
|
@@ -6,13 +6,12 @@ import {
|
|
|
6
6
|
import {useString} from '../utils/useString';
|
|
7
7
|
import {
|
|
8
8
|
BtnTemplate,
|
|
9
|
-
RtcContext,
|
|
10
9
|
PropsContext,
|
|
11
|
-
LocalContext,
|
|
12
10
|
ToggleState,
|
|
13
11
|
BtnTemplateInterface,
|
|
14
12
|
} from '../../agora-rn-uikit';
|
|
15
13
|
import Styles from '../components/styles';
|
|
14
|
+
import {useLocalUserInfo, useRtc} from 'customization-api';
|
|
16
15
|
|
|
17
16
|
export interface LocalSwitchCameraProps {
|
|
18
17
|
buttonTemplateName?: ButtonTemplateName;
|
|
@@ -25,8 +24,8 @@ export interface LocalSwitchCameraProps {
|
|
|
25
24
|
|
|
26
25
|
function LocalSwitchCamera(props: LocalSwitchCameraProps) {
|
|
27
26
|
const {callbacks} = useContext(PropsContext);
|
|
28
|
-
const {RtcEngine} =
|
|
29
|
-
const local =
|
|
27
|
+
const {RtcEngine} = useRtc();
|
|
28
|
+
const local = useLocalUserInfo();
|
|
30
29
|
//commented for v1 release
|
|
31
30
|
//const switchCameraButtonText = useString('switchCameraButton')();
|
|
32
31
|
const switchCameraButtonText = 'Switch';
|
|
@@ -9,11 +9,10 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
-
import React
|
|
12
|
+
import React from 'react';
|
|
13
13
|
import {
|
|
14
14
|
BtnTemplate,
|
|
15
15
|
ToggleState,
|
|
16
|
-
LocalContext,
|
|
17
16
|
BtnTemplateInterface,
|
|
18
17
|
} from '../../agora-rn-uikit';
|
|
19
18
|
import useMuteToggleLocal, {MUTE_LOCAL_TYPE} from '../utils/useMuteToggleLocal';
|
|
@@ -23,6 +22,7 @@ import {
|
|
|
23
22
|
useButtonTemplate,
|
|
24
23
|
} from '../utils/useButtonTemplate';
|
|
25
24
|
import {useString} from '../utils/useString';
|
|
25
|
+
import {useLocalUserInfo} from 'customization-api';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* A component to mute / unmute the local video
|
|
@@ -37,7 +37,7 @@ export interface LocalVideoMuteProps {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function LocalVideoMute(props: LocalVideoMuteProps) {
|
|
40
|
-
const local =
|
|
40
|
+
const local = useLocalUserInfo();
|
|
41
41
|
const localMute = useMuteToggleLocal();
|
|
42
42
|
//commented for v1 release
|
|
43
43
|
//const videoLabel = useString('toggleVideoButton')();
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {useString} from '../utils/useString';
|
|
14
14
|
import {networkIconsObject} from '../components/NetworkQualityContext';
|
|
15
15
|
import {NetworkQualities} from 'src/language/default-labels/videoCallScreenLabels';
|
|
16
|
-
import {
|
|
16
|
+
import {isWebInternal} from '../utils/common';
|
|
17
17
|
import NetworkQualityContext from '../components/NetworkQualityContext';
|
|
18
18
|
import {RenderInterface, UidType} from '../../agora-rn-uikit';
|
|
19
19
|
|
|
@@ -27,17 +27,14 @@ import {RenderInterface, UidType} from '../../agora-rn-uikit';
|
|
|
27
27
|
* hover to show network quality text [ ex. Excellent, Good, Bad etc ]
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
user,
|
|
32
|
-
primaryColor,
|
|
33
|
-
small,
|
|
34
|
-
rootStyle,
|
|
35
|
-
}: {
|
|
30
|
+
interface NetworkQualityPillProps {
|
|
36
31
|
user: RenderInterface;
|
|
37
32
|
primaryColor: any;
|
|
38
33
|
small?: boolean;
|
|
39
34
|
rootStyle?: StyleProp<ViewStyle>;
|
|
40
|
-
}
|
|
35
|
+
}
|
|
36
|
+
const NetworkQualityPill = (props: NetworkQualityPillProps) => {
|
|
37
|
+
const {user, primaryColor, small, rootStyle} = props;
|
|
41
38
|
const [networkTextVisible, setNetworkTextVisible] = useState(false);
|
|
42
39
|
//commented for v1 release
|
|
43
40
|
//const getLabel = useString<NetworkQualities>('networkQualityLabel');
|
|
@@ -115,7 +112,7 @@ const PlatformSpecificWrapper = ({
|
|
|
115
112
|
setNetworkTextVisible,
|
|
116
113
|
children,
|
|
117
114
|
}: any) => {
|
|
118
|
-
return !
|
|
115
|
+
return !isWebInternal() ? (
|
|
119
116
|
<Pressable
|
|
120
117
|
style={{
|
|
121
118
|
height: '100%',
|
|
@@ -189,3 +186,5 @@ const style = StyleSheet.create({
|
|
|
189
186
|
justifyContent: 'center',
|
|
190
187
|
},
|
|
191
188
|
});
|
|
189
|
+
|
|
190
|
+
export default NetworkQualityPill;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React, {useContext} from 'react';
|
|
13
13
|
import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
|
|
14
|
-
import {
|
|
14
|
+
import {isWebInternal} from '../utils/common';
|
|
15
15
|
import ColorContext from '../components/ColorContext';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -22,8 +22,7 @@ import ColorContext from '../components/ColorContext';
|
|
|
22
22
|
const OpenInNativeButton = () => {
|
|
23
23
|
const {primaryColor} = useContext(ColorContext);
|
|
24
24
|
const openInNative = () => {};
|
|
25
|
-
|
|
26
|
-
return isWeb ? (
|
|
25
|
+
return isWebInternal() ? (
|
|
27
26
|
<View style={{position: 'absolute', right: 0}}>
|
|
28
27
|
<TouchableOpacity
|
|
29
28
|
style={[style.btn, {borderColor: primaryColor}]}
|
|
@@ -11,13 +11,10 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import {StyleSheet} from 'react-native';
|
|
14
|
-
import {controlMessageEnum} from '../components/ChatContext';
|
|
15
14
|
import {BtnTemplate, UidType} from '../../agora-rn-uikit';
|
|
16
|
-
import useIsPSTN from '../utils/
|
|
15
|
+
import useIsPSTN from '../utils/useIsPSTN';
|
|
17
16
|
import useMutePSTN from '../utils/useMutePSTN';
|
|
18
|
-
import
|
|
19
|
-
CONTROL_MESSAGE_TYPE,
|
|
20
|
-
} from '../utils/useSendControlMessage';
|
|
17
|
+
import useRemoteMute, {MUTE_REMOTE_TYPE} from '../utils/useRemoteMute';
|
|
21
18
|
|
|
22
19
|
export interface RemoteAudioMuteProps {
|
|
23
20
|
uid: UidType;
|
|
@@ -31,7 +28,8 @@ export interface RemoteAudioMuteProps {
|
|
|
31
28
|
*/
|
|
32
29
|
const RemoteAudioMute = (props: RemoteAudioMuteProps) => {
|
|
33
30
|
const {isHost = false} = props;
|
|
34
|
-
const
|
|
31
|
+
const muteRemoteAudio = useRemoteMute();
|
|
32
|
+
|
|
35
33
|
const isPSTN = useIsPSTN();
|
|
36
34
|
const mutePSTN = useMutePSTN();
|
|
37
35
|
return (
|
|
@@ -45,11 +43,7 @@ const RemoteAudioMute = (props: RemoteAudioMuteProps) => {
|
|
|
45
43
|
console.error('An error occurred while muting the PSTN user.');
|
|
46
44
|
}
|
|
47
45
|
} else {
|
|
48
|
-
|
|
49
|
-
CONTROL_MESSAGE_TYPE.controlMessageToUid,
|
|
50
|
-
controlMessageEnum.muteAudio,
|
|
51
|
-
props.uid,
|
|
52
|
-
);
|
|
46
|
+
muteRemoteAudio(MUTE_REMOTE_TYPE.audio, props.uid);
|
|
53
47
|
}
|
|
54
48
|
}}
|
|
55
49
|
style={style.buttonIconMic}
|
|
@@ -11,27 +11,20 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import {StyleSheet} from 'react-native';
|
|
14
|
-
import {controlMessageEnum} from '../components/ChatContext';
|
|
15
14
|
import {BtnTemplate, UidType} from '../../agora-rn-uikit';
|
|
16
|
-
import
|
|
17
|
-
CONTROL_MESSAGE_TYPE,
|
|
18
|
-
} from '../utils/useSendControlMessage';
|
|
15
|
+
import useRemoteEndCall from '../utils/useRemoteEndCall';
|
|
19
16
|
|
|
20
17
|
export interface RemoteEndCallProps {
|
|
21
18
|
uid: UidType;
|
|
22
19
|
isHost: boolean;
|
|
23
20
|
}
|
|
24
21
|
const RemoteEndCall = (props: RemoteEndCallProps) => {
|
|
25
|
-
const
|
|
22
|
+
const endRemoteCall = useRemoteEndCall();
|
|
26
23
|
return props.isHost && String(props.uid)[0] !== '1' ? (
|
|
27
24
|
<BtnTemplate
|
|
28
25
|
style={style.remoteButton}
|
|
29
26
|
onPress={() => {
|
|
30
|
-
|
|
31
|
-
CONTROL_MESSAGE_TYPE.controlMessageToUid,
|
|
32
|
-
controlMessageEnum.kickUser,
|
|
33
|
-
props.uid,
|
|
34
|
-
);
|
|
27
|
+
endRemoteCall(props.uid);
|
|
35
28
|
}}
|
|
36
29
|
color="#FD0845"
|
|
37
30
|
name={'remoteEndCall'} // earlier was endCall, added remoteEndCall
|
|
@@ -11,11 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import {StyleSheet} from 'react-native';
|
|
14
|
-
import {controlMessageEnum} from '../components/ChatContext';
|
|
15
14
|
import {BtnTemplate, UidType} from '../../agora-rn-uikit';
|
|
16
|
-
import
|
|
17
|
-
CONTROL_MESSAGE_TYPE,
|
|
18
|
-
} from '../utils/useSendControlMessage';
|
|
15
|
+
import useRemoteMute, {MUTE_REMOTE_TYPE} from '../utils/useRemoteMute';
|
|
19
16
|
|
|
20
17
|
/**
|
|
21
18
|
* Component to mute / unmute remote video.
|
|
@@ -29,17 +26,13 @@ export interface RemoteVideoMuteProps {
|
|
|
29
26
|
}
|
|
30
27
|
const RemoteVideoMute = (props: RemoteVideoMuteProps) => {
|
|
31
28
|
const {isHost = false} = props;
|
|
32
|
-
const
|
|
29
|
+
const muteRemoteVideo = useRemoteMute();
|
|
33
30
|
|
|
34
31
|
return String(props.uid)[0] !== '1' ? (
|
|
35
32
|
<BtnTemplate
|
|
36
33
|
disabled={!isHost}
|
|
37
34
|
onPress={() => {
|
|
38
|
-
|
|
39
|
-
CONTROL_MESSAGE_TYPE.controlMessageToUid,
|
|
40
|
-
controlMessageEnum.muteVideo,
|
|
41
|
-
props.uid,
|
|
42
|
-
);
|
|
35
|
+
muteRemoteVideo(MUTE_REMOTE_TYPE.video, props.uid);
|
|
43
36
|
}}
|
|
44
37
|
style={style.buttonIconCam}
|
|
45
38
|
name={props.video ? 'videocam' : 'videocamOff'}
|
|
@@ -21,10 +21,11 @@ import slack from '../assets/slack.png';
|
|
|
21
21
|
// @ts-ignore
|
|
22
22
|
import microsoft from '../assets/microsoft.png';
|
|
23
23
|
import Logo from './Logo';
|
|
24
|
-
import {
|
|
24
|
+
import {useHasBrandLogo} from '../utils/common';
|
|
25
25
|
import {useString} from '../utils/useString';
|
|
26
26
|
|
|
27
27
|
const SelectOAuth = ({onSelectOAuth}) => {
|
|
28
|
+
const hasBrandLogo = useHasBrandLogo();
|
|
28
29
|
// Linking.openURL(url);
|
|
29
30
|
const {primaryColor} = useContext(ColorContext);
|
|
30
31
|
//commented for v1 release
|
|
@@ -40,7 +41,7 @@ const SelectOAuth = ({onSelectOAuth}) => {
|
|
|
40
41
|
const appleAuthButton = 'Apple';
|
|
41
42
|
return (
|
|
42
43
|
<View style={style.main}>
|
|
43
|
-
<View style={style.nav}>{hasBrandLogo && <Logo />}</View>
|
|
44
|
+
<View style={style.nav}>{hasBrandLogo() && <Logo />}</View>
|
|
44
45
|
<View style={style.content}>
|
|
45
46
|
<View style={style.leftContent}>
|
|
46
47
|
<Text style={style.heading}>{$config.APP_NAME}</Text>
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
RemoteLiveStreamRequestApprove,
|
|
5
5
|
RemoteLiveStreamRequestReject,
|
|
6
6
|
RemoteLiveStreamApprovedRequestRecallProps,
|
|
7
|
-
|
|
7
|
+
RemoteLiveStreamControlProps,
|
|
8
8
|
} from './livestream';
|
|
9
9
|
import RemoteAudioMute, {RemoteAudioMuteProps} from './RemoteAudioMute';
|
|
10
10
|
import RemoteVideoMute, {RemoteVideoMuteProps} from './RemoteVideoMute';
|
|
@@ -16,17 +16,18 @@ import {
|
|
|
16
16
|
MuteAllVideoButtonProps,
|
|
17
17
|
} from '../components/HostControlView';
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
type SidePanelButtonsArrayProps = [
|
|
20
20
|
(props: RemoteAudioMuteProps) => JSX.Element,
|
|
21
21
|
(props: RemoteVideoMuteProps) => JSX.Element,
|
|
22
22
|
(props: RemoteEndCallProps) => JSX.Element,
|
|
23
23
|
(props: RemoteLiveStreamApprovedRequestRecallProps) => JSX.Element,
|
|
24
|
-
(props:
|
|
25
|
-
(props:
|
|
24
|
+
(props: RemoteLiveStreamControlProps) => JSX.Element,
|
|
25
|
+
(props: RemoteLiveStreamControlProps) => JSX.Element,
|
|
26
26
|
(props: ChatSendButtonProps) => JSX.Element,
|
|
27
27
|
(props: MuteAllAudioButtonProps) => JSX.Element,
|
|
28
28
|
(props: MuteAllVideoButtonProps) => JSX.Element,
|
|
29
|
-
]
|
|
29
|
+
];
|
|
30
|
+
export const SidePanelButtonsArray: SidePanelButtonsArrayProps = [
|
|
30
31
|
RemoteAudioMute,
|
|
31
32
|
RemoteVideoMute,
|
|
32
33
|
RemoteEndCall,
|
|
@@ -11,13 +11,17 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import {Text} from 'react-native';
|
|
14
|
-
import isMobileOrTablet from '../utils/isMobileOrTablet';
|
|
15
14
|
import TextWithToolTipNative from './TextWithTooltip.native';
|
|
15
|
+
import isMobileOrTablet from '../utils/isMobileOrTablet';
|
|
16
16
|
/**
|
|
17
17
|
* Text with tooltip
|
|
18
18
|
* web - used title attribute to show the tooltip
|
|
19
19
|
*/
|
|
20
|
-
const TextWithToolTip = (props: {
|
|
20
|
+
const TextWithToolTip = (props: {
|
|
21
|
+
touchable?: boolean;
|
|
22
|
+
value: string;
|
|
23
|
+
style: object;
|
|
24
|
+
}) => {
|
|
21
25
|
return (
|
|
22
26
|
<div style={style.containerStyle} title={props.value}>
|
|
23
27
|
<Text numberOfLines={1} textBreakStrategy="simple" style={[props.style]}>
|
|
@@ -15,7 +15,7 @@ import {Platform} from 'react-native';
|
|
|
15
15
|
import Toast, {BaseToast} from '../../react-native-toast-message';
|
|
16
16
|
import isMobileOrTablet from '../utils/isMobileOrTablet';
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const ToastConfig = {
|
|
19
19
|
/*
|
|
20
20
|
overwrite 'success' type,
|
|
21
21
|
modifying the existing `BaseToast` component
|
|
@@ -42,4 +42,4 @@ const toastConfig = {
|
|
|
42
42
|
),
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export default
|
|
45
|
+
export default ToastConfig;
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
import {RFValue} from 'react-native-responsive-fontsize';
|
|
11
11
|
import TextWithTooltip from '../TextWithTooltip';
|
|
12
12
|
import {useString} from '../../utils/useString';
|
|
13
|
-
import {isIOS,
|
|
13
|
+
import {isIOS, isWebInternal} from '../../utils/common';
|
|
14
14
|
import {useChatNotification} from '../../components/chat-notification/useChatNotification';
|
|
15
|
-
import useUserList from '../../utils/useUserList';
|
|
16
15
|
import {UidType, useLocalUid} from '../../../agora-rn-uikit';
|
|
16
|
+
import {useRender} from 'customization-api';
|
|
17
17
|
|
|
18
18
|
const ChatParticipants = (props: any) => {
|
|
19
19
|
//commented for v1 release
|
|
@@ -21,7 +21,7 @@ const ChatParticipants = (props: any) => {
|
|
|
21
21
|
const remoteUserDefaultLabel = 'User';
|
|
22
22
|
const {selectUser} = props;
|
|
23
23
|
const {height, width} = useWindowDimensions();
|
|
24
|
-
const {renderList} =
|
|
24
|
+
const {renderList} = useRender();
|
|
25
25
|
const localUid = useLocalUid();
|
|
26
26
|
const {unreadIndividualMessageCount} = useChatNotification();
|
|
27
27
|
const isChatUser = (userId: UidType, userInfo: any) => {
|
|
@@ -95,7 +95,7 @@ const style = StyleSheet.create({
|
|
|
95
95
|
},
|
|
96
96
|
participantText: {
|
|
97
97
|
flex: 1,
|
|
98
|
-
fontWeight:
|
|
98
|
+
fontWeight: isWebInternal() ? '500' : '700',
|
|
99
99
|
flexDirection: 'row',
|
|
100
100
|
color: $config.PRIMARY_FONT_COLOR,
|
|
101
101
|
textAlign: 'left',
|
|
@@ -110,11 +110,12 @@ const style = StyleSheet.create({
|
|
|
110
110
|
justifyContent: 'center',
|
|
111
111
|
backgroundColor: $config.PRIMARY_COLOR,
|
|
112
112
|
color: $config.SECONDARY_FONT_COLOR,
|
|
113
|
-
fontFamily: isIOS ? 'Helvetica' : 'sans-serif',
|
|
113
|
+
fontFamily: isIOS() ? 'Helvetica' : 'sans-serif',
|
|
114
114
|
borderRadius: 10,
|
|
115
115
|
position: 'absolute',
|
|
116
116
|
right: 20,
|
|
117
117
|
top: 0,
|
|
118
118
|
},
|
|
119
119
|
});
|
|
120
|
+
|
|
120
121
|
export default ChatParticipants;
|