agora-appbuilder-core 2.2.0 → 2.3.0-beta.2
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 +7 -1
- package/package.json +4 -3
- package/template/Gulpfile.js +306 -87
- package/template/_gitignore +4 -1
- package/template/_package-lock.json +32186 -3078
- package/template/agora-rn-uikit/src/AgoraUIKit.tsx +23 -20
- package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +13 -8
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +25 -9
- package/template/agora-rn-uikit/src/Contexts/RenderContext.tsx +10 -0
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +11 -5
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +6 -2
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +1 -1
- package/template/agora-rn-uikit/src/Controls/Local/EndCall.tsx +6 -2
- package/template/agora-rn-uikit/src/Controls/Local/LocalAudioMute.tsx +2 -2
- package/template/agora-rn-uikit/src/Controls/Local/LocalVideoMute.tsx +2 -2
- package/template/agora-rn-uikit/src/Controls/Local/SwitchCamera.tsx +6 -2
- package/template/agora-rn-uikit/src/Controls/LocalControls.tsx +11 -6
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteAudioMute.tsx +10 -6
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteSwap.tsx +7 -6
- package/template/agora-rn-uikit/src/Controls/Remote/RemoteVideoMute.tsx +6 -5
- package/template/agora-rn-uikit/src/Controls/RemoteControls.tsx +3 -3
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +16 -13
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +16 -13
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +13 -13
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +16 -13
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +28 -31
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +48 -35
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +11 -13
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +11 -13
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +18 -15
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +14 -2
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +19 -3
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +161 -44
- package/template/agora-rn-uikit/src/Utils/useLocalUid.ts +8 -0
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +8 -6
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +8 -6
- package/template/agora-rn-uikit/src/Views/MinVideoView.tsx +18 -9
- package/template/agora-rn-uikit/src/index.ts +12 -12
- package/template/babel.config.js +17 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +34 -28
- package/template/bridge/rtc/webNg/SurfaceView.tsx +3 -2
- package/template/bridge/rtc/webNg/Types.ts +14 -0
- package/template/bridge/rtc/webNg/index.ts +5 -2
- package/template/bridge/rtm/web/index.ts +13 -7
- package/template/electron-builder.js +3 -2
- package/template/esbuild.rsdk.go +226 -0
- package/template/{src/subComponents/LayoutEnum.tsx → esbuildConfigTransform.js} +1 -5
- package/template/fpe-api/components.ts +42 -0
- package/template/fpe-api/context.ts +45 -0
- package/template/fpe-api/fpeEvents.ts +9 -0
- package/template/fpe-api/index.ts +21 -0
- package/template/fpe-api/install.ts +128 -0
- package/template/fpe-api/typeDefinition.ts +143 -0
- package/template/fpe-api/useFpe.tsx +35 -0
- package/template/fpe-api/utils.ts +62 -0
- package/template/fpe-implementation/createHook.ts +33 -0
- package/template/fpe-implementation/dummyFpe.ts +17 -0
- package/template/fpe-implementation/index.ts +1 -0
- package/template/fpe-todo.txt +14 -0
- package/template/fpe.config.js +29 -0
- package/template/global.d.ts +4 -0
- package/template/index.rsdk.tsx +27 -0
- package/template/index.wsdk.tsx +27 -0
- package/template/package.json +28 -12
- package/template/react-native-toast-message/src/index.js +9 -10
- package/template/react-native-toast-message/src/index.wsdk.js +419 -0
- package/template/src/App.tsx +97 -65
- package/template/src/AppWrapper.tsx +79 -0
- package/template/src/SDKAppWrapper.tsx +67 -0
- package/template/src/atoms/PrimaryButton.tsx +14 -8
- package/template/src/atoms/TextInput.tsx +13 -5
- package/template/src/components/Chat.tsx +171 -139
- package/template/src/components/ChatContext.ts +14 -22
- package/template/src/components/ColorConfigure.tsx +2 -2
- package/template/src/components/Controls.native.tsx +72 -62
- package/template/src/components/Controls.tsx +90 -69
- package/template/src/components/DeviceConfigure.tsx +1 -1
- package/template/src/components/DeviceContext.tsx +14 -7
- package/template/src/components/GraphQLProvider.tsx +9 -2
- package/template/src/components/GridVideo.tsx +20 -159
- package/template/src/components/HostControlView.tsx +54 -15
- package/template/src/components/Navbar.tsx +408 -157
- package/template/src/components/NetworkQualityContext.tsx +29 -22
- package/template/src/components/ParticipantsView.tsx +91 -115
- package/template/src/components/PinnedVideo.tsx +41 -188
- package/template/src/components/Precall.native.tsx +131 -97
- package/template/src/components/Precall.tsx +193 -158
- package/template/src/components/RTMConfigure.tsx +328 -416
- package/template/src/components/Router.sdk.ts +20 -0
- package/template/src/components/SessionContext.tsx +6 -3
- package/template/src/components/Settings.native.tsx +3 -0
- package/template/src/components/Settings.tsx +65 -31
- package/template/src/components/SettingsView.tsx +14 -8
- package/template/src/components/Share.tsx +188 -220
- package/template/src/components/StorageContext.tsx +5 -5
- package/template/src/components/StoreToken.tsx +5 -1
- package/template/src/components/chat-messages/useChatMessages.tsx +208 -0
- package/template/src/components/chat-notification/useChatNotification.tsx +78 -0
- package/template/src/components/chat-ui/useChatUIControl.tsx +66 -0
- package/template/src/components/common/Error.tsx +54 -0
- package/template/src/components/common/Logo.tsx +35 -0
- package/template/src/components/common/index.tsx +8 -0
- package/template/src/components/contexts/LiveStreamDataContext.tsx +79 -0
- package/template/src/components/contexts/ScreenShareContext.tsx +47 -0
- package/template/src/components/contexts/WhiteboardContext.tsx +59 -0
- package/template/src/components/dimension/DimensionContext.ts +27 -0
- package/template/src/components/dimension/DimensionProvider.tsx +34 -0
- package/template/src/components/livestream/LiveStreamContext.tsx +293 -272
- package/template/src/components/livestream/Types.ts +26 -7
- package/template/src/components/livestream/index.ts +13 -2
- package/template/src/components/livestream/views/LiveStreamControls.tsx +5 -1
- package/template/src/components/meeting-info/useMeetingInfo.tsx +63 -0
- package/template/src/components/meeting-info/useSetMeetingInfo.tsx +38 -0
- package/template/src/components/participants/AllAudienceParticipants.tsx +26 -21
- package/template/src/components/participants/AllHostParticipants.tsx +41 -53
- package/template/src/components/participants/MeParticipant.tsx +9 -10
- package/template/src/components/participants/ParticipantName.tsx +2 -1
- package/template/src/components/participants/RemoteParticipants.tsx +3 -3
- package/template/src/components/precall/LocalMute.native.tsx +91 -0
- package/template/src/components/precall/LocalMute.tsx +90 -0
- package/template/src/components/precall/VideoPreview.native.tsx +35 -0
- package/template/src/components/precall/VideoPreview.tsx +33 -0
- package/template/src/components/precall/index.tsx +28 -0
- package/template/src/components/precall/joinCallBtn.native.tsx +69 -0
- package/template/src/components/precall/joinCallBtn.tsx +91 -0
- package/template/src/components/precall/meetingTitle.tsx +26 -0
- package/template/src/components/precall/selectDevice.tsx +46 -0
- package/template/src/components/precall/textInput.tsx +43 -0
- package/template/src/components/precall/usePreCall.tsx +41 -0
- package/template/src/components/styles.ts +20 -3
- package/template/src/components/useShareLink.tsx +239 -0
- package/template/src/components/useWakeLock.tsx +3 -3
- package/template/src/custom-events/CustomEvents.ts +221 -0
- package/template/src/custom-events/index.tsx +4 -0
- package/template/src/custom-events/types.ts +51 -0
- package/template/src/language/default-labels/commonLabels.ts +21 -0
- package/template/src/language/default-labels/createScreenLabels.ts +22 -0
- package/template/src/language/default-labels/index.ts +38 -0
- package/template/src/language/default-labels/joinScreenLabels.ts +13 -0
- package/template/src/language/default-labels/precallScreenLabels.ts +33 -0
- package/template/src/language/default-labels/shareLinkScreenLabels.ts +44 -0
- package/template/src/language/default-labels/videoCallScreenLabels.ts +189 -0
- package/template/src/language/i18nTypes.ts +10 -0
- package/template/src/language/index.ts +18 -0
- package/template/src/language/useLanguage.tsx +92 -0
- package/template/src/pages/Authenticate.tsx +21 -15
- package/template/src/pages/Create.tsx +176 -159
- package/template/src/pages/Join.tsx +44 -32
- package/template/src/pages/VideoCall.tsx +134 -406
- package/template/src/pages/create/useCreate.tsx +37 -0
- package/template/src/pages/video-call/CustomLayout.ts +17 -0
- package/template/src/pages/video-call/CustomUserContextHolder.tsx +12 -0
- package/template/src/pages/video-call/DefaultLayouts.ts +65 -0
- package/template/src/pages/video-call/NameWithMicStatus.tsx +62 -0
- package/template/src/pages/video-call/RenderComponent.tsx +52 -0
- package/template/src/pages/video-call/VideoCallScreen.tsx +191 -0
- package/template/src/pages/video-call/VideoComponent.tsx +34 -0
- package/template/src/pages/video-call/VideoRenderer.tsx +86 -0
- package/template/src/pages/video-call/index.ts +20 -0
- package/template/src/rtm/RTMEngine.ts +58 -0
- package/template/src/rtm/utils.ts +44 -0
- package/template/src/rtm-events/EventUtils.ts +267 -0
- package/template/src/rtm-events/EventsQueue.ts +38 -0
- package/template/src/rtm-events/constants.ts +40 -0
- package/template/src/rtm-events/index.tsx +8 -0
- package/template/src/rtm-events/types.ts +7 -0
- package/template/src/subComponents/ChatBubble.tsx +18 -11
- package/template/src/subComponents/ChatContainer.tsx +79 -30
- package/template/src/subComponents/ChatInput.tsx +146 -70
- package/template/src/subComponents/CopyJoinInfo.tsx +52 -67
- package/template/src/subComponents/Error.tsx +35 -24
- package/template/src/subComponents/LanguageSelector.tsx +85 -0
- package/template/src/subComponents/LayoutIconDropdown.native.tsx +163 -0
- package/template/src/subComponents/LayoutIconDropdown.tsx +198 -0
- package/template/src/subComponents/LocalAudioMute.tsx +52 -30
- package/template/src/subComponents/LocalEndCall.tsx +52 -0
- package/template/src/subComponents/LocalSwitchCamera.tsx +61 -0
- package/template/src/subComponents/LocalVideoMute.tsx +48 -30
- package/template/src/subComponents/LogoutButton.tsx +20 -5
- package/template/src/subComponents/NetworkQualityPill.tsx +43 -13
- package/template/src/subComponents/OpenInNativeButton.tsx +3 -2
- package/template/src/subComponents/Recording.tsx +46 -138
- package/template/src/subComponents/RemoteAudioMute.tsx +30 -34
- package/template/src/subComponents/RemoteEndCall.tsx +18 -7
- package/template/src/subComponents/RemoteVideoMute.tsx +17 -9
- package/template/src/subComponents/ScreenShareNotice.tsx +40 -40
- package/template/src/subComponents/SelectDevice.tsx +88 -45
- package/template/src/subComponents/SelectOAuth.tsx +30 -6
- package/template/src/subComponents/SidePanelButtons.ts +39 -0
- package/template/src/subComponents/TextWithTooltip.native.tsx +2 -1
- package/template/src/subComponents/TextWithTooltip.tsx +15 -20
- package/template/src/subComponents/chat/ChatParticipants.tsx +31 -32
- package/template/src/subComponents/livestream/ApprovedLiveStreamControlsView.tsx +7 -3
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +32 -18
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +22 -8
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +12 -7
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +24 -27
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +23 -26
- package/template/src/subComponents/livestream/index.ts +10 -2
- package/template/src/subComponents/recording/useRecording.tsx +209 -0
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +64 -0
- package/template/src/subComponents/screenshare/ScreenshareButton.native.tsx +18 -0
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +61 -31
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +57 -52
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +102 -143
- package/template/src/subComponents/screenshare/useScreenshare.tsx +29 -0
- package/template/src/subComponents/toastConfig.tsx +25 -20
- package/template/src/utils/IsAttendeeUser.ts +34 -0
- package/template/src/utils/SdkEvents.ts +68 -0
- package/template/src/utils/common.tsx +40 -0
- package/template/src/utils/eventEmitter.ts +29 -0
- package/template/src/utils/getMeetingInvite.ts +30 -0
- package/template/src/utils/index.tsx +11 -2
- package/template/src/utils/isAudioEnabled.ts +29 -0
- package/template/src/utils/isHostUser.ts +33 -0
- package/template/src/utils/isMobileOrTablet.native.ts +5 -0
- package/template/src/utils/{mobileWebTest.tsx → isMobileOrTablet.ts} +5 -2
- package/template/src/utils/isPSTNUser.ts +30 -0
- package/template/src/utils/isSDK.sdk.ts +5 -0
- package/template/src/utils/isSDK.ts +5 -0
- package/template/src/utils/isScreenShareUser.ts +31 -0
- package/template/src/utils/isVideoEnabled.ts +29 -0
- package/template/src/utils/useButtonTemplate.tsx +43 -0
- package/template/src/utils/useCreateMeeting.ts +74 -0
- package/template/src/utils/useGetLiveStreamingRequests.ts +24 -0
- package/template/src/utils/useGetMeetingPhrase.ts +68 -0
- package/template/src/utils/useGetName.ts +20 -0
- package/template/src/{subComponents/screenshare/ScreenshareContext.tsx → utils/useGroupMessages.ts} +10 -7
- package/template/src/utils/useJoinMeeting.ts +120 -0
- package/template/src/utils/useLayout.tsx +40 -0
- package/template/src/utils/useLiveStreamingUids.ts +26 -0
- package/template/src/utils/useMutePSTN.ts +43 -0
- package/template/src/utils/useMuteToggleLocal.ts +109 -0
- package/template/src/utils/useNavParams.ts +6 -0
- package/template/src/utils/useNavigateTo.ts +8 -0
- package/template/src/utils/usePrivateMessages.ts +33 -0
- package/template/src/utils/useRemoteEndCall.ts +27 -0
- package/template/src/utils/useRemoteMute.ts +64 -0
- package/template/src/utils/useSendControlMessage.ts +51 -0
- package/template/src/utils/useSendMessage.ts +40 -0
- package/template/src/utils/useSetName.ts +20 -0
- package/template/src/utils/useSetUnreadMessageCount.ts +43 -0
- package/template/src/utils/useSidePanel.tsx +41 -0
- package/template/src/utils/useString.ts +61 -0
- package/template/src/utils/useUnreadMessageCount.ts +50 -0
- package/template/src/utils/useUserList.ts +26 -0
- package/template/tsconfig.json +4 -4
- package/template/tsconfig_fpeApi.json +103 -0
- package/template/tsconfig_rsdk_index.json +105 -0
- package/template/tsconfig_wsdk_index.json +104 -0
- package/template/webpack.commons.js +40 -16
- package/template/webpack.main.config.js +2 -1
- package/template/webpack.renderer.config.js +1 -1
- package/template/webpack.rsdk.config.js +33 -0
- package/template/webpack.ts.config.js +89 -0
- package/template/webpack.web.config.js +8 -1
- package/template/webpack.wsdk.config.js +34 -0
- package/template/agora-rn-uikit/.git/HEAD +0 -1
- package/template/agora-rn-uikit/.git/config +0 -16
- package/template/agora-rn-uikit/.git/description +0 -1
- package/template/agora-rn-uikit/.git/hooks/applypatch-msg.sample +0 -15
- package/template/agora-rn-uikit/.git/hooks/commit-msg.sample +0 -24
- package/template/agora-rn-uikit/.git/hooks/fsmonitor-watchman.sample +0 -173
- package/template/agora-rn-uikit/.git/hooks/post-update.sample +0 -8
- package/template/agora-rn-uikit/.git/hooks/pre-applypatch.sample +0 -14
- package/template/agora-rn-uikit/.git/hooks/pre-commit.sample +0 -49
- package/template/agora-rn-uikit/.git/hooks/pre-merge-commit.sample +0 -13
- package/template/agora-rn-uikit/.git/hooks/pre-push.sample +0 -53
- package/template/agora-rn-uikit/.git/hooks/pre-rebase.sample +0 -169
- package/template/agora-rn-uikit/.git/hooks/pre-receive.sample +0 -24
- package/template/agora-rn-uikit/.git/hooks/prepare-commit-msg.sample +0 -42
- package/template/agora-rn-uikit/.git/hooks/push-to-checkout.sample +0 -78
- package/template/agora-rn-uikit/.git/hooks/update.sample +0 -128
- package/template/agora-rn-uikit/.git/index +0 -0
- package/template/agora-rn-uikit/.git/info/exclude +0 -6
- package/template/agora-rn-uikit/.git/logs/HEAD +0 -2
- package/template/agora-rn-uikit/.git/logs/refs/heads/ab-dev-auto +0 -1
- package/template/agora-rn-uikit/.git/logs/refs/heads/master +0 -1
- package/template/agora-rn-uikit/.git/logs/refs/remotes/origin/HEAD +0 -1
- package/template/agora-rn-uikit/.git/objects/pack/pack-0061d00cd98162a329a32b537488a35d0abeb069.idx +0 -0
- package/template/agora-rn-uikit/.git/objects/pack/pack-0061d00cd98162a329a32b537488a35d0abeb069.pack +0 -0
- package/template/agora-rn-uikit/.git/packed-refs +0 -24
- package/template/agora-rn-uikit/.git/refs/heads/ab-dev-auto +0 -1
- package/template/agora-rn-uikit/.git/refs/heads/master +0 -1
- package/template/agora-rn-uikit/.git/refs/remotes/origin/HEAD +0 -1
- package/template/agora-rn-uikit/.gitignore +0 -63
- package/template/agora-rn-uikit/package-lock.json +0 -7612
- package/template/agora-rn-uikit/src/Contexts/MaxUidContext.tsx +0 -7
- package/template/agora-rn-uikit/src/Contexts/MinUidContext.tsx +0 -8
- package/template/package-lock.json +0 -22923
- package/template/react-native-toast-message/.gitignore +0 -5
- package/template/react-native-toast-message/.npmignore +0 -5
- package/template/react-native-toast-message/package-lock.json +0 -10553
- package/template/src/.DS_Store +0 -0
- package/template/src/components/participants/context/ParticipantContext.tsx +0 -97
- package/template/src/subComponents/.DS_Store +0 -0
- package/template/src/subComponents/ScreenshareButton.tsx +0 -257
- package/template/src/subComponents/SwitchCamera.tsx +0 -35
- package/template/src/utils/hasBrandLogo.tsx +0 -3
- package/template/src/utils/mobileWebTest.native.tsx +0 -5
- package/template/src/utils/shouldAuthenticate.tsx +0 -7
|
@@ -12,16 +12,32 @@
|
|
|
12
12
|
import React, {useContext} from 'react';
|
|
13
13
|
import {View, TouchableOpacity, Text, StyleSheet, Image} from 'react-native';
|
|
14
14
|
import ColorContext from '../components/ColorContext';
|
|
15
|
+
// @ts-ignore
|
|
15
16
|
import google from '../assets/google.png';
|
|
17
|
+
// @ts-ignore
|
|
16
18
|
import apple from '../assets/apple.png';
|
|
19
|
+
// @ts-ignore
|
|
17
20
|
import slack from '../assets/slack.png';
|
|
21
|
+
// @ts-ignore
|
|
18
22
|
import microsoft from '../assets/microsoft.png';
|
|
19
23
|
import Logo from './Logo';
|
|
20
|
-
import hasBrandLogo from '../utils/
|
|
24
|
+
import {hasBrandLogo} from '../utils/common';
|
|
25
|
+
import {useString} from '../utils/useString';
|
|
21
26
|
|
|
22
27
|
const SelectOAuth = ({onSelectOAuth}) => {
|
|
23
28
|
// Linking.openURL(url);
|
|
24
29
|
const {primaryColor} = useContext(ColorContext);
|
|
30
|
+
//commented for v1 release
|
|
31
|
+
// const oauthLoginLabel = useString('oauthLoginLabel')();
|
|
32
|
+
// const googleAuthButton = useString('googleAuthButton')();
|
|
33
|
+
// const microsoftAuthButton = useString('microsoftAuthButton')();
|
|
34
|
+
// const slackAuthButton = useString('slackAuthButton')();
|
|
35
|
+
// const appleAuthButton = useString('appleAuthButton')();
|
|
36
|
+
const oauthLoginLabel = 'Login using OAuth';
|
|
37
|
+
const googleAuthButton = 'Google';
|
|
38
|
+
const microsoftAuthButton = 'Microsoft';
|
|
39
|
+
const slackAuthButton = 'Slack';
|
|
40
|
+
const appleAuthButton = 'Apple';
|
|
25
41
|
return (
|
|
26
42
|
<View style={style.main}>
|
|
27
43
|
<View style={style.nav}>{hasBrandLogo && <Logo />}</View>
|
|
@@ -38,14 +54,16 @@ const SelectOAuth = ({onSelectOAuth}) => {
|
|
|
38
54
|
marginBottom: 20,
|
|
39
55
|
color: $config.PRIMARY_FONT_COLOR,
|
|
40
56
|
}}>
|
|
41
|
-
|
|
57
|
+
{oauthLoginLabel}
|
|
42
58
|
</Text>
|
|
43
59
|
{$config.ENABLE_GOOGLE_OAUTH ? (
|
|
44
60
|
<TouchableOpacity
|
|
45
61
|
style={[style.secondaryBtn, {borderColor: primaryColor}]}
|
|
46
62
|
onPress={() => onSelectOAuth({oAuthSystem: 'google'})}>
|
|
47
63
|
<Image source={google} style={style.logo} />
|
|
48
|
-
<Text style={[style.secondaryBtnText]}>
|
|
64
|
+
<Text style={[style.secondaryBtnText]}>
|
|
65
|
+
{googleAuthButton}
|
|
66
|
+
</Text>
|
|
49
67
|
</TouchableOpacity>
|
|
50
68
|
) : (
|
|
51
69
|
<></>
|
|
@@ -55,7 +73,9 @@ const SelectOAuth = ({onSelectOAuth}) => {
|
|
|
55
73
|
style={[style.secondaryBtn, {borderColor: primaryColor}]}
|
|
56
74
|
onPress={() => onSelectOAuth({oAuthSystem: 'microsoft'})}>
|
|
57
75
|
<Image source={microsoft} style={style.logo} />
|
|
58
|
-
<Text style={[style.secondaryBtnText]}>
|
|
76
|
+
<Text style={[style.secondaryBtnText]}>
|
|
77
|
+
{microsoftAuthButton}
|
|
78
|
+
</Text>
|
|
59
79
|
</TouchableOpacity>
|
|
60
80
|
) : (
|
|
61
81
|
<></>
|
|
@@ -65,7 +85,9 @@ const SelectOAuth = ({onSelectOAuth}) => {
|
|
|
65
85
|
style={[style.secondaryBtn, {borderColor: primaryColor}]}
|
|
66
86
|
onPress={() => onSelectOAuth({oAuthSystem: 'slack'})}>
|
|
67
87
|
<Image source={slack} style={style.logo} />
|
|
68
|
-
<Text style={[style.secondaryBtnText]}>
|
|
88
|
+
<Text style={[style.secondaryBtnText]}>
|
|
89
|
+
{slackAuthButton}
|
|
90
|
+
</Text>
|
|
69
91
|
</TouchableOpacity>
|
|
70
92
|
) : (
|
|
71
93
|
<></>
|
|
@@ -75,7 +97,9 @@ const SelectOAuth = ({onSelectOAuth}) => {
|
|
|
75
97
|
style={[style.secondaryBtn, {borderColor: primaryColor}]}
|
|
76
98
|
onPress={() => onSelectOAuth({oAuthSystem: 'apple'})}>
|
|
77
99
|
<Image source={apple} style={style.logo} />
|
|
78
|
-
<Text style={[style.secondaryBtnText]}>
|
|
100
|
+
<Text style={[style.secondaryBtnText]}>
|
|
101
|
+
{appleAuthButton}
|
|
102
|
+
</Text>
|
|
79
103
|
</TouchableOpacity>
|
|
80
104
|
) : (
|
|
81
105
|
<></>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {ChatSendButton, ChatSendButtonProps} from './ChatInput';
|
|
2
|
+
import {
|
|
3
|
+
RemoteLiveStreamApprovedRequestRecall,
|
|
4
|
+
RemoteLiveStreamRequestApprove,
|
|
5
|
+
RemoteLiveStreamRequestReject,
|
|
6
|
+
RemoteLiveStreamApprovedRequestRecallProps,
|
|
7
|
+
RemoteLiveStreamControlInterface,
|
|
8
|
+
} from './livestream';
|
|
9
|
+
import RemoteAudioMute, {RemoteAudioMuteProps} from './RemoteAudioMute';
|
|
10
|
+
import RemoteVideoMute, {RemoteVideoMuteProps} from './RemoteVideoMute';
|
|
11
|
+
import RemoteEndCall, {RemoteEndCallProps} from './RemoteEndCall';
|
|
12
|
+
import {
|
|
13
|
+
MuteAllAudioButton,
|
|
14
|
+
MuteAllAudioButtonProps,
|
|
15
|
+
MuteAllVideoButton,
|
|
16
|
+
MuteAllVideoButtonProps,
|
|
17
|
+
} from '../components/HostControlView';
|
|
18
|
+
|
|
19
|
+
export const SidePanelButtonsArray: [
|
|
20
|
+
(props: RemoteAudioMuteProps) => JSX.Element,
|
|
21
|
+
(props: RemoteVideoMuteProps) => JSX.Element,
|
|
22
|
+
(props: RemoteEndCallProps) => JSX.Element,
|
|
23
|
+
(props: RemoteLiveStreamApprovedRequestRecallProps) => JSX.Element,
|
|
24
|
+
(props: RemoteLiveStreamControlInterface) => JSX.Element,
|
|
25
|
+
(props: RemoteLiveStreamControlInterface) => JSX.Element,
|
|
26
|
+
(props: ChatSendButtonProps) => JSX.Element,
|
|
27
|
+
(props: MuteAllAudioButtonProps) => JSX.Element,
|
|
28
|
+
(props: MuteAllVideoButtonProps) => JSX.Element,
|
|
29
|
+
] = [
|
|
30
|
+
RemoteAudioMute,
|
|
31
|
+
RemoteVideoMute,
|
|
32
|
+
RemoteEndCall,
|
|
33
|
+
RemoteLiveStreamApprovedRequestRecall,
|
|
34
|
+
RemoteLiveStreamRequestApprove,
|
|
35
|
+
RemoteLiveStreamRequestReject,
|
|
36
|
+
ChatSendButton,
|
|
37
|
+
MuteAllAudioButton,
|
|
38
|
+
MuteAllVideoButton,
|
|
39
|
+
];
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
+
// @ts-nocheck
|
|
12
13
|
import React, {useState, useRef} from 'react';
|
|
13
14
|
import {View, Text, Modal, TouchableOpacity, TouchableWithoutFeedback, StyleSheet, useWindowDimensions} from 'react-native';
|
|
14
15
|
/**
|
|
15
16
|
* Component showing text with tooltip on mobile native
|
|
16
17
|
*/
|
|
17
|
-
const TextWithToolTip = (props:
|
|
18
|
+
const TextWithToolTip = (props: {value: string, style: object, touchable?: boolean}) => {
|
|
18
19
|
const {width:globalWidth, height:globalHeight} = useWindowDimensions();
|
|
19
20
|
const [toolTipVisible, setToolTipVisible] = useState(false);
|
|
20
21
|
const [position, setPosition] = useState({})
|
|
@@ -11,34 +11,29 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import {Text} from 'react-native';
|
|
14
|
-
import
|
|
14
|
+
import isMobileOrTablet from '../utils/isMobileOrTablet';
|
|
15
15
|
import TextWithToolTipNative from './TextWithTooltip.native';
|
|
16
16
|
/**
|
|
17
17
|
* Text with tooltip
|
|
18
18
|
* web - used title attribute to show the tooltip
|
|
19
19
|
*/
|
|
20
|
-
const TextWithToolTip = (props:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
textBreakStrategy='simple'
|
|
29
|
-
style={[props.style]}
|
|
30
|
-
>{props.value}</Text>
|
|
31
|
-
</div>
|
|
32
|
-
)
|
|
20
|
+
const TextWithToolTip = (props: {touchable?: boolean;value: string; style: object}) => {
|
|
21
|
+
return (
|
|
22
|
+
<div style={style.containerStyle} title={props.value}>
|
|
23
|
+
<Text numberOfLines={1} textBreakStrategy="simple" style={[props.style]}>
|
|
24
|
+
{props.value}
|
|
25
|
+
</Text>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
33
28
|
};
|
|
34
29
|
|
|
35
30
|
const style = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
31
|
+
containerStyle: {
|
|
32
|
+
display: 'flex',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
40
35
|
/**
|
|
41
|
-
* Web and Desktop : using the TextWithToolTip - which have the browser tooltip
|
|
36
|
+
* Web and Desktop : using the TextWithToolTip - which have the browser tooltip
|
|
42
37
|
* Mobile and Mobile Web : using the TextWithToolTipNative - which have the custom tooltip using modal
|
|
43
38
|
*/
|
|
44
|
-
export default
|
|
39
|
+
export default isMobileOrTablet() ? TextWithToolTipNative : TextWithToolTip;
|
|
@@ -6,55 +6,50 @@ import {
|
|
|
6
6
|
ScrollView,
|
|
7
7
|
useWindowDimensions,
|
|
8
8
|
StyleSheet,
|
|
9
|
-
Platform,
|
|
10
9
|
} from 'react-native';
|
|
11
10
|
import {RFValue} from 'react-native-responsive-fontsize';
|
|
12
|
-
import {UserType} from '../../components/RTMConfigure';
|
|
13
11
|
import TextWithTooltip from '../TextWithTooltip';
|
|
14
|
-
import
|
|
12
|
+
import {useString} from '../../utils/useString';
|
|
13
|
+
import {isIOS, isWeb} from '../../utils/common';
|
|
14
|
+
import {useChatNotification} from '../../components/chat-notification/useChatNotification';
|
|
15
|
+
import useUserList from '../../utils/useUserList';
|
|
16
|
+
import {UidType, useLocalUid} from '../../../agora-rn-uikit';
|
|
15
17
|
|
|
16
18
|
const ChatParticipants = (props: any) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
lastCheckedPrivateState,
|
|
22
|
-
} = props;
|
|
19
|
+
//commented for v1 release
|
|
20
|
+
//const remoteUserDefaultLabel = useString('remoteUserDefaultLabel')();
|
|
21
|
+
const remoteUserDefaultLabel = 'User';
|
|
22
|
+
const {selectUser} = props;
|
|
23
23
|
const {height, width} = useWindowDimensions();
|
|
24
|
-
const {
|
|
25
|
-
|
|
26
|
-
const
|
|
24
|
+
const {renderList} = useUserList();
|
|
25
|
+
const localUid = useLocalUid();
|
|
26
|
+
const {unreadIndividualMessageCount} = useChatNotification();
|
|
27
|
+
const isChatUser = (userId: UidType, userInfo: any) => {
|
|
27
28
|
return (
|
|
28
|
-
userId !== localUid &&
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
userId !== localUid && //user can't chat with own user
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
userId !== '1' && //user can't chat with pstn user
|
|
32
|
+
userInfo?.type === 'rtc' &&
|
|
31
33
|
!userInfo?.offline
|
|
32
34
|
);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
37
|
return (
|
|
36
38
|
<ScrollView>
|
|
37
|
-
{Object.entries(
|
|
38
|
-
|
|
39
|
+
{Object.entries(renderList).map(([uid, value]) => {
|
|
40
|
+
const uidAsNumber = parseInt(uid);
|
|
41
|
+
if (isChatUser(uidAsNumber, value)) {
|
|
39
42
|
return (
|
|
40
43
|
<TouchableOpacity
|
|
41
44
|
style={style.participantContainer}
|
|
42
45
|
key={uid}
|
|
43
46
|
onPress={() => {
|
|
44
|
-
selectUser(
|
|
45
|
-
setPrivateMessageLastSeen({
|
|
46
|
-
userId: uid,
|
|
47
|
-
lastSeenCount: privateMessageCountMap[uid],
|
|
48
|
-
});
|
|
47
|
+
selectUser(uidAsNumber);
|
|
49
48
|
}}>
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
0 ? (
|
|
49
|
+
{unreadIndividualMessageCount &&
|
|
50
|
+
unreadIndividualMessageCount[uidAsNumber] ? (
|
|
53
51
|
<View style={style.chatNotificationPrivate}>
|
|
54
|
-
<Text>
|
|
55
|
-
{(privateMessageCountMap[uid] || 0) -
|
|
56
|
-
(lastCheckedPrivateState[uid] || 0)}
|
|
57
|
-
</Text>
|
|
52
|
+
<Text>{unreadIndividualMessageCount[uidAsNumber]}</Text>
|
|
58
53
|
</View>
|
|
59
54
|
) : null}
|
|
60
55
|
<View style={{flex: 1}}>
|
|
@@ -66,7 +61,11 @@ const ChatParticipants = (props: any) => {
|
|
|
66
61
|
fontSize: RFValue(16, height > width ? height : width),
|
|
67
62
|
},
|
|
68
63
|
]}
|
|
69
|
-
value={
|
|
64
|
+
value={
|
|
65
|
+
renderList[uidAsNumber]
|
|
66
|
+
? renderList[uidAsNumber].name + ''
|
|
67
|
+
: remoteUserDefaultLabel
|
|
68
|
+
}
|
|
70
69
|
/>
|
|
71
70
|
</View>
|
|
72
71
|
<View>
|
|
@@ -96,7 +95,7 @@ const style = StyleSheet.create({
|
|
|
96
95
|
},
|
|
97
96
|
participantText: {
|
|
98
97
|
flex: 1,
|
|
99
|
-
fontWeight:
|
|
98
|
+
fontWeight: isWeb ? '500' : '700',
|
|
100
99
|
flexDirection: 'row',
|
|
101
100
|
color: $config.PRIMARY_FONT_COLOR,
|
|
102
101
|
textAlign: 'left',
|
|
@@ -111,7 +110,7 @@ const style = StyleSheet.create({
|
|
|
111
110
|
justifyContent: 'center',
|
|
112
111
|
backgroundColor: $config.PRIMARY_COLOR,
|
|
113
112
|
color: $config.SECONDARY_FONT_COLOR,
|
|
114
|
-
fontFamily:
|
|
113
|
+
fontFamily: isIOS ? 'Helvetica' : 'sans-serif',
|
|
115
114
|
borderRadius: 10,
|
|
116
115
|
position: 'absolute',
|
|
117
116
|
right: 20,
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import React, {useContext} from 'react';
|
|
2
2
|
import {View} from 'react-native';
|
|
3
3
|
import RemoteLiveStreamApprovedRequestRecall from './controls/RemoteLiveStreamApprovedRequestRecall';
|
|
4
|
-
import LiveStreamContext, {
|
|
4
|
+
import LiveStreamContext, {RaiseHandValue} from '../../components/livestream';
|
|
5
|
+
import {ClientRole} from '../../../agora-rn-uikit';
|
|
5
6
|
|
|
6
7
|
const ApprovedLiveStreamControlsView = (props: {
|
|
7
8
|
uid: number;
|
|
8
9
|
p_styles: any;
|
|
9
10
|
}) => {
|
|
10
11
|
const {uid, p_styles} = props;
|
|
11
|
-
const {
|
|
12
|
+
const {raiseHandList} = useContext(LiveStreamContext);
|
|
12
13
|
|
|
13
|
-
if (
|
|
14
|
+
if (
|
|
15
|
+
raiseHandList[uid]?.raised === RaiseHandValue.TRUE &&
|
|
16
|
+
raiseHandList[uid]?.role == ClientRole.Broadcaster
|
|
17
|
+
) {
|
|
14
18
|
return (
|
|
15
19
|
<View style={[p_styles.actionBtnIcon, {marginRight: 10}]}>
|
|
16
20
|
<RemoteLiveStreamApprovedRequestRecall uid={uid} />
|
|
@@ -3,13 +3,28 @@ import {View, Text} from 'react-native';
|
|
|
3
3
|
import RemoteLiveStreamRequestApprove from './controls/RemoteLiveStreamRequestApprove';
|
|
4
4
|
import RemoteLiveStreamRequestReject from './controls/RemoteLiveStreamRequestReject';
|
|
5
5
|
import ParticipantName from '../../components/participants/ParticipantName';
|
|
6
|
-
import LiveStreamContext, {
|
|
6
|
+
import LiveStreamContext, {RaiseHandValue} from '../../components/livestream';
|
|
7
7
|
import {filterObject} from '../../utils/index';
|
|
8
8
|
import ParticipantSectionTitle from '../../components/participants/ParticipantSectionTitle';
|
|
9
|
+
import {useString} from '../../utils/useString';
|
|
10
|
+
import useUserList from '../../utils/useUserList';
|
|
11
|
+
import {ClientRole} from '../../../agora-rn-uikit';
|
|
9
12
|
|
|
10
13
|
const CurrentLiveStreamRequestsView = (props: any) => {
|
|
11
|
-
|
|
12
|
-
const
|
|
14
|
+
//commented for v1 release
|
|
15
|
+
// const noLiveStreamingRequestsLabel = useString(
|
|
16
|
+
// 'raisedHandsListPlaceholder',
|
|
17
|
+
// )();
|
|
18
|
+
// const remoteUserDefaultLabel = useString('remoteUserDefaultLabel')();
|
|
19
|
+
// const noUserFoundLabel = useString('noUserFoundLabel')();
|
|
20
|
+
// const raisedHandsListTitleLabel = useString('raisedHandsListTitleLabel')();
|
|
21
|
+
const noLiveStreamingRequestsLabel = 'No streaming request(s)';
|
|
22
|
+
const remoteUserDefaultLabel = 'User';
|
|
23
|
+
const noUserFoundLabel = 'User not found';
|
|
24
|
+
const raisedHandsListTitleLabel = 'Streaming Request';
|
|
25
|
+
const {p_style} = props;
|
|
26
|
+
const {renderList} = useUserList();
|
|
27
|
+
const {raiseHandList, setLastCheckedRequestTimestamp} =
|
|
13
28
|
useContext(LiveStreamContext);
|
|
14
29
|
const [activeLiveStreamRequests, setActiveLiveStreamRequests] =
|
|
15
30
|
React.useState({});
|
|
@@ -17,11 +32,12 @@ const CurrentLiveStreamRequestsView = (props: any) => {
|
|
|
17
32
|
useEffect(() => {
|
|
18
33
|
setActiveLiveStreamRequests(
|
|
19
34
|
filterObject(
|
|
20
|
-
|
|
21
|
-
([k, v]) =>
|
|
35
|
+
raiseHandList,
|
|
36
|
+
([k, v]) =>
|
|
37
|
+
v?.raised === RaiseHandValue.TRUE && v?.role == ClientRole.Audience,
|
|
22
38
|
),
|
|
23
39
|
);
|
|
24
|
-
}, [
|
|
40
|
+
}, [raiseHandList]);
|
|
25
41
|
|
|
26
42
|
React.useEffect(() => {
|
|
27
43
|
// On unmount update the timestamp, if the user was already active in this view
|
|
@@ -33,31 +49,29 @@ const CurrentLiveStreamRequestsView = (props: any) => {
|
|
|
33
49
|
return (
|
|
34
50
|
<>
|
|
35
51
|
<ParticipantSectionTitle
|
|
36
|
-
title=
|
|
52
|
+
title={raisedHandsListTitleLabel + ' '}
|
|
37
53
|
count={Object.keys(activeLiveStreamRequests).length}
|
|
38
54
|
/>
|
|
39
55
|
<View style={p_style.participantContainer}>
|
|
40
|
-
{Object.keys(
|
|
56
|
+
{Object.keys(raiseHandList).length == 0 ||
|
|
41
57
|
Object.keys(activeLiveStreamRequests).length == 0 ? (
|
|
42
|
-
<Text style={p_style.infoText}>
|
|
58
|
+
<Text style={p_style.infoText}>{noLiveStreamingRequestsLabel}</Text>
|
|
43
59
|
) : (
|
|
44
60
|
Object.keys(activeLiveStreamRequests).map(
|
|
45
61
|
(userUID: any, index: number) =>
|
|
46
|
-
|
|
62
|
+
renderList[userUID] ? (
|
|
47
63
|
<View style={p_style.participantRow} key={index}>
|
|
48
|
-
<ParticipantName
|
|
64
|
+
<ParticipantName
|
|
65
|
+
value={renderList[userUID]?.name || remoteUserDefaultLabel}
|
|
66
|
+
/>
|
|
49
67
|
<View style={p_style.participantActionContainer}>
|
|
50
|
-
<RemoteLiveStreamRequestApprove
|
|
51
|
-
|
|
52
|
-
/>
|
|
53
|
-
<RemoteLiveStreamRequestReject
|
|
54
|
-
user={{...userList[userUID], uid: userUID}}
|
|
55
|
-
/>
|
|
68
|
+
<RemoteLiveStreamRequestApprove uid={userUID} />
|
|
69
|
+
<RemoteLiveStreamRequestReject uid={userUID} />
|
|
56
70
|
</View>
|
|
57
71
|
</View>
|
|
58
72
|
) : (
|
|
59
73
|
<View style={p_style.participantRow} key={index}>
|
|
60
|
-
<ParticipantName value={
|
|
74
|
+
<ParticipantName value={noUserFoundLabel} />
|
|
61
75
|
</View>
|
|
62
76
|
),
|
|
63
77
|
)
|
|
@@ -11,34 +11,48 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import React, {useContext} from 'react';
|
|
13
13
|
import {StyleSheet} from 'react-native';
|
|
14
|
-
import LiveStreamContext
|
|
14
|
+
import LiveStreamContext, {
|
|
15
|
+
RaiseHandValue,
|
|
16
|
+
} from '../../../components/livestream';
|
|
15
17
|
import {PropsContext} from '../../../../agora-rn-uikit';
|
|
16
18
|
import {BtnTemplate} from '../../../../agora-rn-uikit';
|
|
17
19
|
import icons from '../../../assets/icons';
|
|
20
|
+
import {useString} from '../../../utils/useString';
|
|
21
|
+
import ChatContext from '../../../components/ChatContext';
|
|
18
22
|
|
|
19
23
|
const LocalRaiseHand = () => {
|
|
20
24
|
const {styleProps} = useContext(PropsContext);
|
|
21
|
-
const {audienceSendsRequest, audienceRecallsRequest,
|
|
25
|
+
const {audienceSendsRequest, audienceRecallsRequest, raiseHandList} =
|
|
22
26
|
useContext(LiveStreamContext);
|
|
27
|
+
const {localUid} = useContext(ChatContext);
|
|
23
28
|
const {localBtnStyles} = styleProps || {};
|
|
24
29
|
const {theme} = styleProps || {};
|
|
25
30
|
const {muteLocalAudio} = localBtnStyles || {};
|
|
26
|
-
|
|
31
|
+
//commented for v1 release
|
|
32
|
+
//const handStatusText = useString<boolean>('raiseHandButton');
|
|
33
|
+
const handStatusText = (toggle: boolean) =>
|
|
34
|
+
toggle ? 'Lower hand' : 'Raise Hand';
|
|
27
35
|
return (
|
|
28
36
|
<BtnTemplate
|
|
29
37
|
icon={icons['raiseHandIcon']}
|
|
30
|
-
btnText={
|
|
31
|
-
|
|
38
|
+
btnText={handStatusText(
|
|
39
|
+
raiseHandList[localUid]?.raised === RaiseHandValue.TRUE,
|
|
40
|
+
)}
|
|
41
|
+
color={
|
|
42
|
+
raiseHandList[localUid]?.raised === RaiseHandValue.TRUE
|
|
43
|
+
? '#FD0845'
|
|
44
|
+
: theme
|
|
45
|
+
}
|
|
32
46
|
style={{
|
|
33
47
|
...style.localBtn,
|
|
34
48
|
...(localBtnStyles as object),
|
|
35
49
|
...(muteLocalAudio as object),
|
|
36
50
|
}}
|
|
37
51
|
onPress={() => {
|
|
38
|
-
if (
|
|
39
|
-
audienceSendsRequest();
|
|
40
|
-
} else {
|
|
52
|
+
if (raiseHandList[localUid]?.raised === RaiseHandValue.TRUE) {
|
|
41
53
|
audienceRecallsRequest();
|
|
54
|
+
} else {
|
|
55
|
+
audienceSendsRequest();
|
|
42
56
|
}
|
|
43
57
|
}}
|
|
44
58
|
/>
|
package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
import {BtnTemplate} from '../../../../agora-rn-uikit';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {BtnTemplate, UidType} from '../../../../agora-rn-uikit';
|
|
4
3
|
import {LiveStreamControlMessageEnum} from '../../../components/livestream';
|
|
5
4
|
import icons from '../../../assets/icons';
|
|
5
|
+
import CustomEvents from '../../../custom-events';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
export interface RemoteLiveStreamApprovedRequestRecallProps {
|
|
8
|
+
uid: UidType;
|
|
9
|
+
}
|
|
10
|
+
const RemoteLiveStreamApprovedRequestRecall = (
|
|
11
|
+
props: RemoteLiveStreamApprovedRequestRecallProps,
|
|
12
|
+
) => {
|
|
9
13
|
return (
|
|
10
14
|
<BtnTemplate
|
|
11
15
|
style={{width: 24, height: 22}}
|
|
12
16
|
onPress={() => {
|
|
13
|
-
|
|
14
|
-
LiveStreamControlMessageEnum.
|
|
17
|
+
CustomEvents.send(
|
|
18
|
+
LiveStreamControlMessageEnum.raiseHandRequestRejected,
|
|
19
|
+
{},
|
|
15
20
|
props.uid,
|
|
16
21
|
);
|
|
17
22
|
}}
|
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
import React, {useContext} from 'react';
|
|
2
2
|
import {View} from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
BtnTemplate,
|
|
5
|
-
PropsContext,
|
|
6
|
-
UidInterface,
|
|
7
|
-
} from '../../../../agora-rn-uikit';
|
|
3
|
+
import {BtnTemplate, PropsContext, UidType} from '../../../../agora-rn-uikit';
|
|
8
4
|
import LiveStreamContext from '../../../components/livestream';
|
|
9
5
|
import icons from '../../../assets/icons';
|
|
10
6
|
|
|
11
|
-
interface RemoteLiveStreamControlInterface {
|
|
12
|
-
|
|
7
|
+
export interface RemoteLiveStreamControlInterface {
|
|
8
|
+
uid: UidType;
|
|
13
9
|
}
|
|
14
10
|
|
|
15
|
-
const RemoteLiveStreamRequestApprove
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
const RemoteLiveStreamRequestApprove = (
|
|
12
|
+
props: RemoteLiveStreamControlInterface,
|
|
13
|
+
) => {
|
|
14
|
+
const {uid} = props;
|
|
15
|
+
const {hostApprovesRequestOfUID} = useContext(LiveStreamContext);
|
|
16
|
+
const {styleProps} = useContext(PropsContext);
|
|
17
|
+
const {remoteBtnStyles} = styleProps || {};
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
const {liveStreamHostControlBtns} = remoteBtnStyles || {};
|
|
23
20
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
return (
|
|
22
|
+
<View style={{...(liveStreamHostControlBtns as object), marginRight: 15}}>
|
|
23
|
+
<BtnTemplate
|
|
24
|
+
disabled={!uid}
|
|
25
|
+
icon={icons['checkCircleIcon']}
|
|
26
|
+
style={{...(liveStreamHostControlBtns as object)}}
|
|
27
|
+
onPress={() => {
|
|
28
|
+
hostApprovesRequestOfUID(uid);
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
37
34
|
|
|
38
35
|
export default RemoteLiveStreamRequestApprove;
|
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import React, {useContext} from 'react';
|
|
2
2
|
import {View} from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
BtnTemplate,
|
|
5
|
-
PropsContext,
|
|
6
|
-
UidInterface,
|
|
7
|
-
} from '../../../../agora-rn-uikit';
|
|
3
|
+
import {BtnTemplate, PropsContext, UidType} from '../../../../agora-rn-uikit';
|
|
8
4
|
import LiveStreamContext from '../../../components/livestream';
|
|
9
5
|
import icons from '../../../assets/icons';
|
|
10
6
|
|
|
11
7
|
interface RemoteLiveStreamControlInterface {
|
|
12
|
-
|
|
8
|
+
uid: UidType;
|
|
13
9
|
}
|
|
14
10
|
|
|
15
|
-
const RemoteLiveStreamRequestReject
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
const RemoteLiveStreamRequestReject = (
|
|
12
|
+
props: RemoteLiveStreamControlInterface,
|
|
13
|
+
) => {
|
|
14
|
+
const {uid} = props;
|
|
15
|
+
const {hostRejectsRequestOfUID} = useContext(LiveStreamContext);
|
|
16
|
+
const {styleProps} = useContext(PropsContext);
|
|
17
|
+
const {remoteBtnStyles} = styleProps || {};
|
|
18
|
+
const {liveStreamHostControlBtns} = remoteBtnStyles || {};
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
return (
|
|
21
|
+
<View style={{...(liveStreamHostControlBtns as object)}}>
|
|
22
|
+
<BtnTemplate
|
|
23
|
+
disabled={!uid}
|
|
24
|
+
icon={icons['crossCircleIcon']}
|
|
25
|
+
style={{...(liveStreamHostControlBtns as object)}}
|
|
26
|
+
onPress={() => {
|
|
27
|
+
hostRejectsRequestOfUID(uid);
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
30
|
+
</View>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
36
33
|
|
|
37
34
|
export default RemoteLiveStreamRequestReject;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Remote controls
|
|
2
|
-
import RemoteLiveStreamApprovedRequestRecall
|
|
3
|
-
|
|
2
|
+
import RemoteLiveStreamApprovedRequestRecall, {
|
|
3
|
+
RemoteLiveStreamApprovedRequestRecallProps,
|
|
4
|
+
} from './controls/RemoteLiveStreamApprovedRequestRecall';
|
|
5
|
+
import RemoteLiveStreamRequestApprove, {
|
|
6
|
+
RemoteLiveStreamControlInterface,
|
|
7
|
+
} from './controls/RemoteLiveStreamRequestApprove';
|
|
4
8
|
import RemoteLiveStreamRequestReject from './controls/RemoteLiveStreamRequestReject';
|
|
5
9
|
// Local controls
|
|
6
10
|
import LocalRaiseHand from './controls/LocalRaiseHand';
|
|
@@ -8,6 +12,10 @@ import LocalRaiseHand from './controls/LocalRaiseHand';
|
|
|
8
12
|
import CurrentLiveStreamRequestsView from './CurrentLiveStreamRequestsView';
|
|
9
13
|
import ApprovedLiveStreamControlsView from './ApprovedLiveStreamControlsView';
|
|
10
14
|
|
|
15
|
+
export type {
|
|
16
|
+
RemoteLiveStreamApprovedRequestRecallProps,
|
|
17
|
+
RemoteLiveStreamControlInterface,
|
|
18
|
+
};
|
|
11
19
|
export {
|
|
12
20
|
RemoteLiveStreamApprovedRequestRecall,
|
|
13
21
|
RemoteLiveStreamRequestApprove,
|