agora-appbuilder-core 3.0.10 → 3.0.11

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