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.
Files changed (249) hide show
  1. package/Readme.md +0 -6
  2. package/package.json +2 -2
  3. package/template/_package-lock.json +4979 -7086
  4. package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +0 -4
  5. package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +0 -18
  6. package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +0 -2
  7. package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +26 -30
  8. package/template/agora-rn-uikit/src/Controls/Icons.ts +83 -30
  9. package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +6 -6
  10. package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +0 -1
  11. package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +0 -1
  12. package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +0 -1
  13. package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +0 -1
  14. package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +0 -1
  15. package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +0 -2
  16. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +0 -1
  17. package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +0 -1
  18. package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +0 -1
  19. package/template/agora-rn-uikit/src/Reducer/index.ts +0 -3
  20. package/template/agora-rn-uikit/src/Rtc/Create.tsx +1 -89
  21. package/template/agora-rn-uikit/src/RtcConfigure.tsx +2 -39
  22. package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +5 -15
  23. package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +9 -15
  24. package/template/agora-rn-uikit/src/index.ts +1 -3
  25. package/template/android/app/build.gradle +0 -1
  26. package/template/android/app/src/main/AndroidManifest.xml +15 -22
  27. package/template/android/app/src/main/java/com/helloworld/MainActivity.java +0 -50
  28. package/template/android/build.gradle +3 -3
  29. package/template/babel.config.js +0 -1
  30. package/template/bridge/rtc/webNg/RtcEngine.ts +17 -110
  31. package/template/customization-api/sub-components.ts +1 -1
  32. package/template/customization-api/typeDefinition.ts +1 -2
  33. package/template/electron/index.html +27 -27
  34. package/template/electron/renderer/index.js +0 -1
  35. package/template/global.d.ts +4 -26
  36. package/template/index.js +0 -4
  37. package/template/index.rsdk.tsx +0 -1
  38. package/template/index.web.js +1 -7
  39. package/template/index.wsdk.tsx +1 -1
  40. package/template/ios/HelloWorld/Info.plist +1 -14
  41. package/template/ios/HelloWorld.xcodeproj/project.pbxproj +0 -17
  42. package/template/metro.config.js +1 -1
  43. package/template/package.json +7 -21
  44. package/template/react-native-toast-message/index.d.ts +43 -43
  45. package/template/react-native-toast-message/src/colors/index.js +2 -3
  46. package/template/react-native-toast-message/src/components/base/index.js +59 -46
  47. package/template/react-native-toast-message/src/components/base/styles.js +32 -16
  48. package/template/react-native-toast-message/src/components/error.js +2 -3
  49. package/template/react-native-toast-message/src/components/info.js +2 -3
  50. package/template/react-native-toast-message/src/components/success.js +2 -3
  51. package/template/react-native-toast-message/src/index.js +31 -122
  52. package/template/react-native-toast-message/src/index.sdk.tsx +35 -125
  53. package/template/react-native-toast-message/src/styles.js +4 -3
  54. package/template/react-native-toast-message/src/styles.sdk.ts +4 -3
  55. package/template/src/App.tsx +0 -6
  56. package/template/src/AppWrapper.tsx +28 -63
  57. package/template/src/assets/icons.ts +102 -0
  58. package/template/src/atoms/HorizontalRule.tsx +1 -3
  59. package/template/src/atoms/PrimaryButton.tsx +26 -51
  60. package/template/src/atoms/SecondaryButton.tsx +5 -8
  61. package/template/src/atoms/TextInput.tsx +14 -12
  62. package/template/src/components/Chat.tsx +214 -86
  63. package/template/src/components/ChatContext.ts +1 -8
  64. package/template/src/components/ColorConfigure.tsx +1 -1
  65. package/template/src/components/ColorContext.ts +1 -1
  66. package/template/src/components/{Controls1.native.tsx → Controls.native.tsx} +4 -6
  67. package/template/src/components/Controls.tsx +42 -342
  68. package/template/src/components/DeviceConfigure.tsx +101 -461
  69. package/template/src/components/DeviceContext.tsx +4 -8
  70. package/template/src/components/EventsConfigure.tsx +7 -144
  71. package/template/src/components/GraphQLProvider.tsx +1 -1
  72. package/template/src/components/GridVideo.tsx +44 -59
  73. package/template/src/components/HostControlView.tsx +35 -114
  74. package/template/src/components/Navbar.tsx +398 -216
  75. package/template/src/components/NetworkQualityContext.tsx +20 -20
  76. package/template/src/components/ParticipantsView.tsx +154 -177
  77. package/template/src/components/PinnedVideo.tsx +120 -207
  78. package/template/src/components/Precall.native.tsx +119 -358
  79. package/template/src/components/Precall.tsx +135 -269
  80. package/template/src/components/RTMConfigure.tsx +4 -27
  81. package/template/src/components/Router.electron.ts +0 -1
  82. package/template/src/components/Router.native.ts +0 -1
  83. package/template/src/components/Router.sdk.ts +0 -1
  84. package/template/src/components/Router.ts +0 -1
  85. package/template/src/components/Settings.tsx +95 -26
  86. package/template/src/components/SettingsView.tsx +56 -251
  87. package/template/src/components/Share.tsx +273 -302
  88. package/template/src/components/StorageContext.tsx +3 -30
  89. package/template/src/components/chat-messages/useChatMessages.tsx +23 -69
  90. package/template/src/components/chat-ui/useChatUIControl.tsx +0 -7
  91. package/template/src/components/common/Error.tsx +6 -20
  92. package/template/src/components/common/Logo.tsx +15 -16
  93. package/template/src/components/contexts/LiveStreamDataContext.tsx +5 -10
  94. package/template/src/components/contexts/VideoMeetingDataContext.tsx +7 -37
  95. package/template/src/components/livestream/LiveStreamContext.tsx +36 -270
  96. package/template/src/components/livestream/Types.ts +14 -39
  97. package/template/src/components/livestream/index.ts +0 -1
  98. package/template/src/components/livestream/views/LiveStreamControls.tsx +4 -12
  99. package/template/src/components/participants/AllAudienceParticipants.tsx +30 -101
  100. package/template/src/components/participants/AllHostParticipants.tsx +34 -103
  101. package/template/src/components/participants/MeParticipant.tsx +38 -0
  102. package/template/src/components/participants/ParticipantName.tsx +7 -13
  103. package/template/src/components/participants/ParticipantSectionTitle.tsx +10 -35
  104. package/template/src/components/participants/RemoteParticipants.tsx +71 -0
  105. package/template/src/components/participants/ScreenshareParticipants.tsx +12 -144
  106. package/template/src/components/precall/{LocalMute1.native.tsx → LocalMute.native.tsx} +5 -21
  107. package/template/src/components/precall/LocalMute.tsx +14 -84
  108. package/template/src/components/precall/VideoPreview.native.tsx +3 -48
  109. package/template/src/components/precall/VideoPreview.tsx +7 -163
  110. package/template/src/components/precall/joinCallBtn.tsx +2 -15
  111. package/template/src/components/precall/meetingTitle.tsx +12 -15
  112. package/template/src/components/precall/selectDevice.tsx +21 -1
  113. package/template/src/components/precall/textInput.tsx +4 -32
  114. package/template/src/components/precall/usePreCall.tsx +0 -16
  115. package/template/src/components/styles.ts +21 -42
  116. package/template/src/components/useShareLink.tsx +14 -12
  117. package/template/src/language/default-labels/precallScreenLabels.ts +3 -3
  118. package/template/src/pages/Authenticate.tsx +15 -5
  119. package/template/src/pages/Create.tsx +165 -293
  120. package/template/src/pages/Join.tsx +67 -93
  121. package/template/src/pages/VideoCall.tsx +64 -89
  122. package/template/src/pages/video-call/DefaultLayouts.ts +4 -4
  123. package/template/src/pages/video-call/NameWithMicIcon.tsx +44 -120
  124. package/template/src/pages/video-call/RenderComponent.tsx +2 -3
  125. package/template/src/pages/video-call/VideoCallScreen.tsx +9 -45
  126. package/template/src/pages/video-call/VideoComponent.tsx +3 -18
  127. package/template/src/pages/video-call/VideoRenderer.tsx +60 -218
  128. package/template/src/rtm-events/constants.ts +0 -2
  129. package/template/src/subComponents/ChatBubble.tsx +83 -123
  130. package/template/src/subComponents/ChatContainer.tsx +84 -257
  131. package/template/src/subComponents/ChatInput.tsx +46 -61
  132. package/template/src/subComponents/Checkbox.native.tsx +5 -16
  133. package/template/src/subComponents/Checkbox.tsx +2 -2
  134. package/template/src/subComponents/CopyJoinInfo.tsx +58 -36
  135. package/template/src/subComponents/FallbackLogo.tsx +40 -122
  136. package/template/src/subComponents/LanguageSelector.tsx +1 -1
  137. package/template/src/subComponents/{LayoutIconDropdown1.native.tsx → LayoutIconDropdown.native.tsx} +18 -4
  138. package/template/src/subComponents/LayoutIconDropdown.tsx +134 -131
  139. package/template/src/subComponents/LocalAudioMute.tsx +27 -119
  140. package/template/src/subComponents/LocalEndCall.tsx +33 -71
  141. package/template/src/subComponents/LocalSwitchCamera.tsx +30 -17
  142. package/template/src/subComponents/LocalVideoMute.tsx +27 -117
  143. package/template/src/subComponents/Logo.tsx +4 -3
  144. package/template/src/subComponents/LogoutButton.tsx +1 -1
  145. package/template/src/subComponents/NetworkQualityPill.tsx +63 -60
  146. package/template/src/subComponents/OpenInNativeButton.tsx +3 -3
  147. package/template/src/subComponents/Recording.tsx +29 -28
  148. package/template/src/subComponents/RemoteAudioMute.tsx +29 -83
  149. package/template/src/subComponents/RemoteEndCall.tsx +5 -8
  150. package/template/src/subComponents/RemoteVideoMute.tsx +21 -74
  151. package/template/src/subComponents/ScreenShareNotice.tsx +8 -83
  152. package/template/src/subComponents/SelectDevice.tsx +61 -404
  153. package/template/src/subComponents/SelectOAuth.tsx +8 -9
  154. package/template/src/subComponents/ToastConfig.tsx +10 -150
  155. package/template/src/subComponents/chat/ChatParticipants.tsx +78 -187
  156. package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +32 -95
  157. package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +33 -29
  158. package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +6 -6
  159. package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +11 -24
  160. package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +10 -17
  161. package/template/src/subComponents/recording/useRecording.tsx +27 -79
  162. package/template/src/subComponents/screenshare/ScreenshareButton.tsx +70 -52
  163. package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +2 -11
  164. package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +4 -26
  165. package/template/src/utils/common.tsx +1 -155
  166. package/template/src/utils/index.tsx +0 -19
  167. package/template/src/utils/isMobileOrTablet.ts +2 -7
  168. package/template/src/utils/useButtonTemplate.tsx +0 -1
  169. package/template/src/utils/useMuteToggleLocal.ts +3 -54
  170. package/template/web/index.html +0 -5
  171. package/template/webpack.commons.js +8 -13
  172. package/template/webpack.web.config.js +0 -1
  173. package/template/agora-rn-uikit/src/Reducer/ActiveSpeakerDetected.ts +0 -11
  174. package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +0 -24
  175. package/template/agora-rn-uikit/src/Reducer/UserPin.ts +0 -11
  176. package/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf +0 -0
  177. package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
  178. package/template/android/app/src/main/res/values/colors.xml +0 -7
  179. package/template/react-native-toast-message/src/components/checkbox.js +0 -178
  180. package/template/react-native.config.js +0 -7
  181. package/template/src/assets/font-styles.css +0 -329
  182. package/template/src/assets/fonts/SourceSansPro-Regular.ttf +0 -0
  183. package/template/src/assets/fonts/icomoon.ttf +0 -0
  184. package/template/src/assets/permission.png +0 -0
  185. package/template/src/assets/selection.json +0 -1
  186. package/template/src/atoms/ActionMenu.tsx +0 -236
  187. package/template/src/atoms/AnimatedActiveSpeaker.native.tsx +0 -71
  188. package/template/src/atoms/AnimatedActiveSpeaker.tsx +0 -84
  189. package/template/src/atoms/AnimatedRings.native.tsx +0 -68
  190. package/template/src/atoms/AnimatedRings.tsx +0 -70
  191. package/template/src/atoms/Card.tsx +0 -61
  192. package/template/src/atoms/CircularProgress.native.tsx +0 -121
  193. package/template/src/atoms/CircularProgress.tsx +0 -102
  194. package/template/src/atoms/CustomIcon.tsx +0 -88
  195. package/template/src/atoms/CustomSwitch.tsx +0 -287
  196. package/template/src/atoms/Dropdown.tsx +0 -306
  197. package/template/src/atoms/IconButton.tsx +0 -162
  198. package/template/src/atoms/ImageIcon.tsx +0 -98
  199. package/template/src/atoms/InfoBubble.tsx +0 -291
  200. package/template/src/atoms/Input.tsx +0 -87
  201. package/template/src/atoms/InviteInfo.tsx +0 -166
  202. package/template/src/atoms/LinkButton.tsx +0 -28
  203. package/template/src/atoms/OutlineButton.tsx +0 -61
  204. package/template/src/atoms/ParticipantsCount.tsx +0 -73
  205. package/template/src/atoms/Popup.tsx +0 -147
  206. package/template/src/atoms/RecordingInfo.tsx +0 -49
  207. package/template/src/atoms/Spacer.tsx +0 -22
  208. package/template/src/atoms/TertiaryButton.tsx +0 -78
  209. package/template/src/atoms/Toggle.tsx +0 -47
  210. package/template/src/atoms/Tooltip.native.tsx +0 -65
  211. package/template/src/atoms/Tooltip.tsx +0 -94
  212. package/template/src/atoms/UserAvatar.tsx +0 -60
  213. package/template/src/components/CommonStyles.ts +0 -44
  214. package/template/src/components/ToastComponent.tsx +0 -8
  215. package/template/src/components/participants/Participant.tsx +0 -302
  216. package/template/src/components/participants/UserActionMenuOptions.tsx +0 -398
  217. package/template/src/components/popups/InvitePopup.tsx +0 -115
  218. package/template/src/components/popups/StopRecordingPopup.tsx +0 -114
  219. package/template/src/components/precall/PermissionHelper.native.tsx +0 -5
  220. package/template/src/components/precall/PermissionHelper.tsx +0 -126
  221. package/template/src/components/precall/PreCallSettings.tsx +0 -52
  222. package/template/src/components/useToast.tsx +0 -41
  223. package/template/src/components/useVideoCall.tsx +0 -65
  224. package/template/src/pages/Endcall.tsx +0 -148
  225. package/template/src/pages/video-call/ActionSheet.native.tsx +0 -215
  226. package/template/src/pages/video-call/ActionSheet.tsx +0 -226
  227. package/template/src/pages/video-call/ActionSheetContent.tsx +0 -479
  228. package/template/src/pages/video-call/ActionSheetHandle.tsx +0 -38
  229. package/template/src/pages/video-call/ActionSheetStyles.css +0 -138
  230. package/template/src/pages/video-call/SidePanelHeader.tsx +0 -190
  231. package/template/src/pages/video-call/VideoCallMobileView.tsx +0 -139
  232. package/template/src/pages/video-call/VideoCallScreen.native.tsx +0 -37
  233. package/template/src/subComponents/ChatInput.ios.tsx +0 -237
  234. package/template/src/subComponents/EndcallPopup.tsx +0 -107
  235. package/template/src/subComponents/LayoutIconButton.tsx +0 -201
  236. package/template/src/subComponents/RemoteMutePopup.tsx +0 -193
  237. package/template/src/subComponents/RemoveMeetingPopup.tsx +0 -109
  238. package/template/src/subComponents/RemoveScreensharePopup.tsx +0 -109
  239. package/template/src/subComponents/SelectDeviceSettings.backup.tsx +0 -207
  240. package/template/src/subComponents/SidePanelHeader.tsx +0 -112
  241. package/template/src/theme/index.ts +0 -46
  242. package/template/src/utils/PlatformWrapper.tsx +0 -21
  243. package/template/src/utils/hexadecimalTransparency.ts +0 -108
  244. package/template/src/utils/pendingStateUpdateHelper.ts +0 -19
  245. package/template/src/utils/useFocus.tsx +0 -46
  246. package/template/src/utils/useIsActiveSpeaker.ts +0 -27
  247. package/template/src/utils/useIsHandRaised.ts +0 -13
  248. package/template/src/utils/useRemoteEndScreenshare.ts +0 -26
  249. package/template/src/utils/useRemoteRequest.ts +0 -84
@@ -1,115 +0,0 @@
1
- /*
2
- ********************************************
3
- Copyright © 2021 Agora Lab, Inc., all rights reserved.
4
- AppBuilder and all associated components, source code, APIs, services, and documentation
5
- (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
- accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
- Use without a license or in violation of any license terms and conditions (including use for
8
- any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9
- information visit https://appbuilder.agora.io.
10
- *********************************************
11
- */
12
- import React, {useEffect} from 'react';
13
- import {StyleSheet, View} from 'react-native';
14
- import {
15
- SHARE_LINK_CONTENT_TYPE,
16
- useShareLink,
17
- } from '../../components/useShareLink';
18
- import Popup from '../../atoms/Popup';
19
- import Spacer from '../../atoms/Spacer';
20
- import PrimaryButton from '../../atoms/PrimaryButton';
21
- import TertiaryButton from '../../atoms/TertiaryButton';
22
- import ThemeConfig from '../../theme';
23
- import {CopyMeetingInfo} from '../../components/Share';
24
- import {isMobileUA, useIsDesktop} from '../../utils/common';
25
- import {useVideoCall} from '../useVideoCall';
26
- import {useParams} from '../Router';
27
- import useGetMeetingPhrase from '../../utils/useGetMeetingPhrase';
28
-
29
- const InvitePopup = () => {
30
- const {setShowInvitePopup, showInvitePopup} = useVideoCall();
31
- const isDesktop = useIsDesktop();
32
- const {copyShareLinkToClipboard} = useShareLink();
33
- const {phrase} = useParams<{phrase: string}>();
34
- const getMeeting = useGetMeetingPhrase();
35
- useEffect(() => {
36
- getMeeting(phrase);
37
- }, [phrase]);
38
- return (
39
- <Popup
40
- modalVisible={showInvitePopup}
41
- setModalVisible={setShowInvitePopup}
42
- title="Invite others to join this meeting"
43
- showCloseIcon={true}
44
- containerStyle={{alignItems: isDesktop('popup') ? 'center' : 'stretch'}}
45
- contentContainerStyle={style.contentContainer}>
46
- <CopyMeetingInfo showSubLabel={false} />
47
- <View
48
- style={
49
- isDesktop('popup') ? style.btnContainer : style.btnContainerMobile
50
- }>
51
- {isDesktop('popup') ? (
52
- <View style={{flex: 1}}>
53
- <TertiaryButton
54
- text={'CANCEL'}
55
- textStyle={style.btnText}
56
- containerStyle={{
57
- width: '100%',
58
- height: 48,
59
- paddingVertical: 12,
60
- paddingHorizontal: 12,
61
- borderRadius: ThemeConfig.BorderRadius.medium,
62
- }}
63
- onPress={() => {
64
- setShowInvitePopup(false);
65
- }}
66
- />
67
- </View>
68
- ) : null}
69
- {isDesktop('popup') ? <Spacer size={10} horizontal={true} /> : <></>}
70
- <View style={{flex: 1}}>
71
- <PrimaryButton
72
- textStyle={style.btnText}
73
- containerStyle={{
74
- minWidth: 'auto',
75
- width: '100%',
76
- borderRadius: ThemeConfig.BorderRadius.medium,
77
- height: 48,
78
- paddingVertical: 12,
79
- paddingHorizontal: 12,
80
- }}
81
- onPress={() => {
82
- copyShareLinkToClipboard(SHARE_LINK_CONTENT_TYPE.MEETING_INVITE);
83
- }}
84
- text={'COPY INVITATION'}
85
- />
86
- </View>
87
- </View>
88
- </Popup>
89
- );
90
- };
91
-
92
- export default InvitePopup;
93
-
94
- const style = StyleSheet.create({
95
- btnContainer: {
96
- flex: 1,
97
- flexDirection: 'row',
98
- justifyContent: 'center',
99
- alignItems: 'center',
100
- marginTop: 48,
101
- },
102
- btnContainerMobile: {
103
- flexDirection: 'row',
104
- justifyContent: 'center',
105
- marginTop: 30,
106
- },
107
- btnText: {
108
- fontWeight: '600',
109
- fontSize: 16,
110
- },
111
- contentContainer: {
112
- padding: isMobileUA() ? 24 : 40,
113
- minWidth: 342,
114
- },
115
- });
@@ -1,114 +0,0 @@
1
- import React from 'react';
2
- import {StyleSheet, Text, View} from 'react-native';
3
- import Spacer from '../../atoms/Spacer';
4
- import Popup from '../../atoms/Popup';
5
- import TertiaryButton from '../../atoms/TertiaryButton';
6
- import PrimaryButton from '../../atoms/PrimaryButton';
7
- import ThemeConfig from '../../theme';
8
- import {useIsDesktop} from '../../utils/common';
9
- import {useRecording} from 'customization-api';
10
- import {useVideoCall} from '../useVideoCall';
11
-
12
- const StopRecordingPopup = () => {
13
- const {showStopRecordingPopup, setShowStopRecordingPopup} = useVideoCall();
14
- const {stopRecording, isRecordingActive} = useRecording();
15
- const isDesktop = useIsDesktop()('popup');
16
- const recordingLabelHeading = 'Stop Recording?';
17
- const recordingLabelSubHeading =
18
- 'Are you sure you want to stop recording? You can’t undo this action.';
19
-
20
- const cancelBtnLabel = 'CANCEL';
21
- const stopRecordingBtnLabel = 'END RECORDING';
22
-
23
- const doStopRecording = () => {
24
- if (isRecordingActive) {
25
- stopRecording && stopRecording();
26
- setShowStopRecordingPopup(false);
27
- }
28
- };
29
- return (
30
- <Popup
31
- modalVisible={showStopRecordingPopup}
32
- setModalVisible={setShowStopRecordingPopup}
33
- showCloseIcon={false}
34
- contentContainerStyle={styles.contentContainer}>
35
- <Text style={styles.heading}>{recordingLabelHeading}</Text>
36
- <Spacer size={8} />
37
- <Text style={styles.subHeading}>{recordingLabelSubHeading}</Text>
38
- <Spacer size={32} />
39
- <View style={isDesktop ? styles.btnContainer : styles.btnContainerMobile}>
40
- <View style={isDesktop && {flex: 1}}>
41
- <TertiaryButton
42
- containerStyle={{
43
- minWidth: 'auto',
44
- width: isDesktop ? 90 : '100%',
45
- height: 48,
46
- paddingVertical: 12,
47
- paddingHorizontal: 12,
48
- borderRadius: ThemeConfig.BorderRadius.medium,
49
- }}
50
- textStyle={styles.btnText}
51
- text={cancelBtnLabel}
52
- onPress={() => setShowStopRecordingPopup(false)}
53
- />
54
- </View>
55
- <Spacer
56
- size={isDesktop ? 10 : 20}
57
- horizontal={isDesktop ? true : false}
58
- />
59
- <View style={isDesktop && {flex: 2}}>
60
- <PrimaryButton
61
- containerStyle={{
62
- minWidth: 'auto',
63
- width: '100%',
64
- borderRadius: ThemeConfig.BorderRadius.medium,
65
- height: 48,
66
- backgroundColor: $config.SEMANTIC_ERROR,
67
- paddingVertical: 12,
68
- paddingHorizontal: 12,
69
- }}
70
- textStyle={styles.btnText}
71
- text={stopRecordingBtnLabel}
72
- onPress={doStopRecording}
73
- />
74
- </View>
75
- </View>
76
- </Popup>
77
- );
78
- };
79
-
80
- export default StopRecordingPopup;
81
-
82
- const styles = StyleSheet.create({
83
- btnContainer: {
84
- flex: 1,
85
- flexDirection: 'row',
86
- justifyContent: 'center',
87
- alignItems: 'center',
88
- },
89
- btnText: {
90
- fontWeight: '600',
91
- fontSize: 16,
92
- lineHeight: 24,
93
- },
94
-
95
- btnContainerMobile: {
96
- flexDirection: 'column-reverse',
97
- },
98
- contentContainer: {
99
- padding: 24,
100
- maxWidth: 342,
101
- },
102
- heading: {
103
- fontFamily: ThemeConfig.FontFamily.sansPro,
104
- fontWeight: '600',
105
- fontSize: 22,
106
- color: $config.SEMANTIC_ERROR,
107
- },
108
- subHeading: {
109
- fontFamily: ThemeConfig.FontFamily.sansPro,
110
- fontWeight: '400',
111
- fontSize: ThemeConfig.FontSize.small,
112
- color: $config.FONT_COLOR,
113
- },
114
- });
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- const PermissionHelper = () => {
3
- return <></>;
4
- };
5
- export default PermissionHelper;
@@ -1,126 +0,0 @@
1
- import {useLocalUserInfo, useRender, useRtc} from 'customization-api';
2
- import React, {useEffect, useState} from 'react';
3
- import {
4
- View,
5
- Image,
6
- Modal,
7
- TouchableOpacity,
8
- StyleSheet,
9
- Text,
10
- } from 'react-native';
11
- import Popup from '../../atoms/Popup';
12
- import ThemeConfig from '../../theme';
13
- //@ts-ignore
14
- import permissionHelper from '../../assets/permission.png';
15
- import {PermissionState} from '../../../agora-rn-uikit';
16
-
17
- const PermissionHelper = () => {
18
- const {dispatch} = useRtc();
19
- const {permissionStatus} = useLocalUserInfo();
20
- const [showPopup, setShowPopup] = useState(false);
21
-
22
- const closePopup = () => {
23
- dispatch({
24
- type: 'LocalPermissionState',
25
- value: [PermissionState.CANCELLED],
26
- });
27
- };
28
- useEffect(() => {
29
- //If permission already given it will take few milliseconds to resolve the promise. it will show the popup which not required. so added timeout
30
- setTimeout(() => {
31
- setShowPopup(true);
32
- }, 500);
33
- }, []);
34
- //todo hari update the modal message based the veritical
35
- return (
36
- showPopup && (
37
- <Popup
38
- modalVisible={permissionStatus === PermissionState.REQUESTED}
39
- setModalVisible={closePopup}
40
- showCloseIcon={false}
41
- contentContainerStyle={styles.modal}>
42
- <View style={styles.modalImageContainer}>
43
- <Image
44
- style={styles.modalImage}
45
- resizeMode={'contain'}
46
- source={{uri: permissionHelper}}
47
- />
48
- </View>
49
- <View style={styles.modalContent}>
50
- <Text style={styles.infoMessage1}>
51
- {$config.AUDIO_ROOM
52
- ? 'Allow access to microphone'
53
- : 'Allow access to camera and microphone'}
54
- </Text>
55
- <Text style={styles.infoMessage2}>
56
- Select
57
- <Text style={styles.infoMessage2Highlight}>{` “Allow” `}</Text>
58
- {$config.AUDIO_ROOM
59
- ? 'for others to hear you'
60
- : 'for others to see and hear you'}
61
- </Text>
62
- <TouchableOpacity
63
- onPress={() => {
64
- closePopup();
65
- }}>
66
- <Text style={styles.dismissBtn}>Dismiss</Text>
67
- </TouchableOpacity>
68
- </View>
69
- </Popup>
70
- )
71
- );
72
- };
73
-
74
- const styles = StyleSheet.create({
75
- dismissBtn: {
76
- fontFamily: ThemeConfig.FontFamily.sansPro,
77
- fontWeight: '600',
78
- fontSize: ThemeConfig.FontSize.normal,
79
- color: $config.PRIMARY_ACTION_BRAND_COLOR,
80
- paddingVertical: 32,
81
- },
82
- infoMessage1: {
83
- paddingHorizontal: 76,
84
- paddingTop: 32,
85
- paddingBottom: 12,
86
- fontFamily: ThemeConfig.FontFamily.sansPro,
87
- fontWeight: '700',
88
- fontSize: ThemeConfig.FontSize.large,
89
- textAlign: 'center',
90
- color: $config.FONT_COLOR,
91
- },
92
- infoMessage2: {
93
- fontFamily: ThemeConfig.FontFamily.sansPro,
94
- fontWeight: '400',
95
- fontSize: ThemeConfig.FontSize.small,
96
- color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.medium,
97
- },
98
- infoMessage2Highlight: {
99
- fontWeight: '700',
100
- fontFamily: ThemeConfig.FontFamily.sansPro,
101
- fontSize: ThemeConfig.FontSize.small,
102
- },
103
- modal: {
104
- flex: 1,
105
- flexDirection: 'column',
106
- maxHeight: 386,
107
- width: 441,
108
- borderRadius: 20,
109
- paddingHorizontal: 0,
110
- paddingVertical: 0,
111
- borderWidth: 0,
112
- },
113
- modalImageContainer: {
114
- minHeight: 190,
115
- },
116
- modalImage: {width: '100%', height: '100%'},
117
- modalContent: {
118
- flex: 1,
119
- justifyContent: 'center',
120
- alignItems: 'center',
121
- backgroundColor: $config.CARD_LAYER_1_COLOR,
122
- borderBottomLeftRadius: 20,
123
- borderBottomRightRadius: 20,
124
- },
125
- });
126
- export default PermissionHelper;
@@ -1,52 +0,0 @@
1
- import {StyleSheet, Text, TouchableOpacity} from 'react-native';
2
- import React, {useState} from 'react';
3
- import SettingsView from '../SettingsView';
4
- import Popup from '../../atoms/Popup';
5
- import ImageIcon from '../../atoms/ImageIcon';
6
-
7
- interface PreCallSettingsProps {
8
- isMobileView?: boolean;
9
- }
10
-
11
- const PreCallSettings = (props: PreCallSettingsProps) => {
12
- const [isSettingsVisible, setIsSettingsVisible] = useState(false);
13
- const {isMobileView = true} = props;
14
-
15
- return (
16
- <>
17
- <Popup
18
- modalVisible={isSettingsVisible}
19
- setModalVisible={setIsSettingsVisible}
20
- title=""
21
- containerStyle={styles.containerStyle}
22
- contentContainerStyle={styles.contentContainer}
23
- showCloseIcon={false}>
24
- <SettingsView
25
- hideName={true}
26
- handleClose={() => setIsSettingsVisible(false)}
27
- />
28
- </Popup>
29
-
30
- <TouchableOpacity onPress={() => setIsSettingsVisible(true)}>
31
- <ImageIcon
32
- name={'settings'}
33
- tintColor={$config.SECONDARY_ACTION_COLOR}
34
- />
35
- </TouchableOpacity>
36
- </>
37
- );
38
- };
39
-
40
- export default PreCallSettings;
41
-
42
- const styles = StyleSheet.create({
43
- contentContainer: {
44
- backgroundColor: $config.CARD_LAYER_1_COLOR,
45
- borderWidth: 1,
46
- borderColor: $config.CARD_LAYER_3_COLOR,
47
- borderRadius: 4,
48
- padding: 0,
49
- width: '100%',
50
- },
51
- containerStyle: {},
52
- });
@@ -1,41 +0,0 @@
1
- /*
2
- ********************************************
3
- Copyright © 2021 Agora Lab, Inc., all rights reserved.
4
- AppBuilder and all associated components, source code, APIs, services, and documentation
5
- (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
- accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
- Use without a license or in violation of any license terms and conditions (including use for
8
- any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9
- information visit https://appbuilder.agora.io.
10
- *********************************************
11
- */
12
- import React, {useState} from 'react';
13
- import {createHook} from 'customization-implementation';
14
-
15
- interface ToastContextInterface {
16
- isActionSheetVisible: boolean;
17
- setActionSheetVisible: React.Dispatch<React.SetStateAction<boolean>>;
18
- }
19
-
20
- const ToastContext = React.createContext<ToastContextInterface>({
21
- isActionSheetVisible: false,
22
- setActionSheetVisible: () => {},
23
- });
24
-
25
- const ToastProvider = (props: {children: React.ReactNode}) => {
26
- const [isActionSheetVisible, setActionSheetVisible] = useState(false);
27
-
28
- return (
29
- <ToastContext.Provider
30
- value={{
31
- isActionSheetVisible,
32
- setActionSheetVisible,
33
- }}>
34
- {props.children}
35
- </ToastContext.Provider>
36
- );
37
- };
38
-
39
- const useToast = createHook(ToastContext);
40
-
41
- export {useToast, ToastContext, ToastProvider};
@@ -1,65 +0,0 @@
1
- /*
2
- ********************************************
3
- Copyright © 2021 Agora Lab, Inc., all rights reserved.
4
- AppBuilder and all associated components, source code, APIs, services, and documentation
5
- (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
- accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
- Use without a license or in violation of any license terms and conditions (including use for
8
- any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9
- information visit https://appbuilder.agora.io.
10
- *********************************************
11
- */
12
-
13
- import React, {SetStateAction, useState} from 'react';
14
- import {createHook} from 'customization-implementation';
15
- import InvitePopup from './popups/InvitePopup';
16
- import StopRecordingPopup from './popups/StopRecordingPopup';
17
-
18
- export interface VideoCallContextInterface {
19
- showInvitePopup: boolean;
20
- setShowInvitePopup: React.Dispatch<SetStateAction<boolean>>;
21
- showStopRecordingPopup: boolean;
22
- setShowStopRecordingPopup: React.Dispatch<SetStateAction<boolean>>;
23
- showLayoutOption: boolean;
24
- setShowLayoutOption: React.Dispatch<SetStateAction<boolean>>;
25
- }
26
-
27
- const VideoCallContext = React.createContext<VideoCallContextInterface>({
28
- showInvitePopup: false,
29
- setShowInvitePopup: () => {},
30
- showStopRecordingPopup: false,
31
- setShowStopRecordingPopup: () => {},
32
- showLayoutOption: false,
33
- setShowLayoutOption: () => {},
34
- });
35
-
36
- interface VideoCallProviderProps {
37
- children: React.ReactNode;
38
- }
39
- const VideoCallProvider = (props: VideoCallProviderProps) => {
40
- const [showLayoutOption, setShowLayoutOption] = useState(false);
41
- const [showInvitePopup, setShowInvitePopup] = useState(false);
42
- const [showStopRecordingPopup, setShowStopRecordingPopup] = useState(false);
43
- return (
44
- <VideoCallContext.Provider
45
- value={{
46
- showInvitePopup,
47
- setShowInvitePopup,
48
- showStopRecordingPopup,
49
- setShowStopRecordingPopup,
50
- showLayoutOption,
51
- setShowLayoutOption,
52
- }}>
53
- <StopRecordingPopup />
54
- <InvitePopup />
55
- {props.children}
56
- </VideoCallContext.Provider>
57
- );
58
- };
59
-
60
- /**
61
- *
62
- */
63
- const useVideoCall = createHook(VideoCallContext);
64
-
65
- export {VideoCallProvider, useVideoCall};
@@ -1,148 +0,0 @@
1
- import React, {useContext, useEffect, useState} from 'react';
2
- import {StyleSheet, View, Text, Platform} from 'react-native';
3
- import PrimaryButton from '../atoms/PrimaryButton';
4
- import TertiaryButton from '../atoms/TertiaryButton';
5
- import Spacer from '../atoms/Spacer';
6
- import {Logo} from '../components/common';
7
- import {useHistory} from '../components/Router';
8
- import StorageContext from '../components/StorageContext';
9
- import ThemeConfig from '../theme';
10
- import ReactNativeForegroundService from '@supersami/rn-foreground-service';
11
- import CircularProgress from '../atoms/CircularProgress';
12
- import {useIsDesktop} from '../utils/common';
13
-
14
- /* For android only, bg audio */
15
- const StopForegroundService = () => {
16
- if (Platform.OS === 'android') {
17
- ReactNativeForegroundService.stop();
18
- console.log('stopping foreground service');
19
- }
20
- };
21
-
22
- const Endcall = () => {
23
- const leftMeetingLabel = 'You have left the meeting.';
24
- const rejoinBtnLabel = 'REJOIN';
25
- const createMeetingLabel = 'START NEW MEETING';
26
- const returnToHomeLabel = 'Returning to the home screen';
27
- const {store} = useContext(StorageContext);
28
- const history = useHistory();
29
-
30
- const onComplete = React.useCallback(() => {
31
- history.push('/');
32
- StopForegroundService();
33
- }, []);
34
-
35
- const isDesktop = useIsDesktop();
36
-
37
- const reJoin = () => {
38
- StopForegroundService();
39
- };
40
- const goToCreate = () => {
41
- history.push('/');
42
- StopForegroundService();
43
- };
44
- return (
45
- <View style={styles.main}>
46
- <View
47
- style={[
48
- styles.contentContainer,
49
- isDesktop() && {alignItems: 'center'},
50
- ]}>
51
- <View style={{alignSelf: 'center'}}>
52
- <Logo />
53
- </View>
54
- <Spacer size={20} />
55
- <Text
56
- style={[
57
- styles.heading,
58
- !isDesktop() && {fontSize: 20, lineHeight: 25},
59
- ]}>
60
- {leftMeetingLabel}
61
- </Text>
62
- <Spacer size={40} />
63
- <View
64
- style={isDesktop() ? styles.btnContainer : styles.btnContainerMobile}>
65
- <TertiaryButton
66
- containerStyle={{
67
- height: 60,
68
- paddingHorizontal: 34,
69
- paddingVertical: 20,
70
- borderRadius: 8,
71
- minWidth: isDesktop() ? 'auto' : '100%',
72
- marginRight: isDesktop() ? 12 : 0,
73
- }}
74
- textStyle={styles.btnText}
75
- text={rejoinBtnLabel}
76
- onPress={() => {
77
- reJoin();
78
- }}
79
- />
80
-
81
- <PrimaryButton
82
- containerStyle={{
83
- height: 60,
84
- minWidth: isDesktop() ? 'auto' : '100%',
85
- marginBottom: isDesktop() ? 0 : 20,
86
- paddingHorizontal: 30,
87
- paddingVertical: 20,
88
- }}
89
- text={createMeetingLabel}
90
- textStyle={styles.btnText}
91
- onPress={() => {
92
- goToCreate();
93
- }}
94
- />
95
- </View>
96
- </View>
97
- <View style={styles.bottomContainer}>
98
- <CircularProgress onComplete={onComplete} timer={60} />
99
- <Spacer size={10} />
100
- <Text style={styles.returnHomeText}>{returnToHomeLabel}</Text>
101
- </View>
102
- </View>
103
- );
104
- };
105
-
106
- export default Endcall;
107
-
108
- const styles = StyleSheet.create({
109
- returnHomeText: {
110
- fontFamily: ThemeConfig.FontFamily.sansPro,
111
- fontWeight: '400',
112
- fontSize: ThemeConfig.FontSize.small,
113
- lineHeight: 18,
114
- color: $config.FONT_COLOR,
115
- textAlign: 'center',
116
- },
117
- bottomContainer: {
118
- marginBottom: 28,
119
- },
120
- main: {
121
- flex: 1,
122
- paddingHorizontal: 40,
123
- },
124
- contentContainer: {
125
- flex: 1,
126
- justifyContent: 'center',
127
- },
128
- btnContainer: {
129
- flexDirection: 'row',
130
- justifyContent: 'space-between',
131
- },
132
- btnText: {
133
- fontWeight: '600',
134
- fontSize: 16,
135
- lineHeight: 24,
136
- },
137
- btnContainerMobile: {
138
- flexDirection: 'column-reverse',
139
- },
140
- heading: {
141
- fontFamily: ThemeConfig.FontFamily.sansPro,
142
- fontWeight: '600',
143
- fontSize: 40,
144
- lineHeight: 40,
145
- color: $config.FONT_COLOR,
146
- alignSelf: 'center',
147
- },
148
- });