agora-appbuilder-core 4.0.0-beta.56 → 4.0.0-beta.57
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/package.json +1 -1
- package/template/customization-api/types.ts +4 -1
- package/template/src/atoms/ClipboardIconButton.tsx +4 -2
- package/template/src/components/Controls.tsx +31 -24
- package/template/src/components/Navbar.tsx +8 -7
- package/template/src/components/Precall.tsx +6 -2
- package/template/src/components/Settings.tsx +2 -1
- package/template/src/components/Share.tsx +48 -42
- package/template/src/components/meeting-info-invite/MeetingInfoLinks.tsx +32 -33
- package/template/src/components/precall/PermissionHelper.tsx +15 -27
- package/template/src/components/precall/VideoFallback.tsx +8 -2
- package/template/src/components/precall/joinCallBtn.native.tsx +7 -2
- package/template/src/components/precall/joinCallBtn.tsx +7 -2
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +7 -2
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +7 -2
- package/template/src/components/precall/textInput.tsx +10 -21
- package/template/src/components/useShareLink.tsx +12 -5
- package/template/src/components/virtual-background/VBPanel.tsx +6 -2
- package/template/src/components/virtual-background/imagePaths.ts +8 -3
- package/template/src/language/default-labels/commonLabels.ts +2 -15
- package/template/src/language/default-labels/createScreenLabels.ts +93 -43
- package/template/src/language/default-labels/joinScreenLabels.ts +38 -18
- package/template/src/language/default-labels/precallScreenLabels.ts +132 -87
- package/template/src/language/default-labels/shareLinkScreenLabels.ts +86 -30
- package/template/src/language/default-labels/videoCallScreenLabels.ts +116 -203
- package/template/src/pages/Create.tsx +65 -81
- package/template/src/pages/Join.tsx +41 -27
- package/template/src/pages/video-call/SidePanelHeader.tsx +6 -2
- package/template/src/subComponents/CopyJoinInfo.tsx +2 -1
- package/template/src/subComponents/LayoutIconButton.tsx +2 -1
- package/template/src/subComponents/LocalAudioMute.tsx +9 -3
- package/template/src/subComponents/LocalEndCall.tsx +2 -1
- package/template/src/subComponents/LocalSwitchCamera.tsx +2 -1
- package/template/src/subComponents/LocalVideoMute.tsx +9 -3
- package/template/src/subComponents/Recording.tsx +2 -1
- package/template/src/subComponents/SelectDevice.tsx +34 -13
- package/template/src/subComponents/caption/CaptionIcon.tsx +3 -3
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +2 -1
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +2 -1
package/package.json
CHANGED
|
@@ -8,6 +8,8 @@ import Spacer from './Spacer';
|
|
|
8
8
|
import ImageIcon from './ImageIcon';
|
|
9
9
|
import Tooltip from './Tooltip';
|
|
10
10
|
import ThemeConfig from '../theme';
|
|
11
|
+
import {shareRoomCopyBtnTooltipText} from '../language/default-labels/shareLinkScreenLabels';
|
|
12
|
+
import {useString} from '../utils/useString';
|
|
11
13
|
|
|
12
14
|
interface Props {
|
|
13
15
|
text: SHARE_LINK_CONTENT_TYPE;
|
|
@@ -17,7 +19,7 @@ interface Props {
|
|
|
17
19
|
|
|
18
20
|
const ClipboardIconButton = (props: Props) => {
|
|
19
21
|
const {copyShareLinkToClipboard} = useShareLink();
|
|
20
|
-
|
|
22
|
+
const copiedToClipboard = useString(shareRoomCopyBtnTooltipText)();
|
|
21
23
|
const {text, variant = 'primary', size = 26} = props;
|
|
22
24
|
|
|
23
25
|
const getTintColor = () => {
|
|
@@ -43,7 +45,7 @@ const ClipboardIconButton = (props: Props) => {
|
|
|
43
45
|
<Spacer size={8} horizontal={true} />
|
|
44
46
|
</>
|
|
45
47
|
}
|
|
46
|
-
toolTipMessage=
|
|
48
|
+
toolTipMessage={copiedToClipboard}
|
|
47
49
|
renderContent={(isToolTipVisible, setToolTipVisible) => {
|
|
48
50
|
return (
|
|
49
51
|
<TouchableOpacity
|
|
@@ -82,6 +82,21 @@ import LocalEventEmitter, {
|
|
|
82
82
|
} from '../rtm-events-api/LocalEvents';
|
|
83
83
|
import {useSetRoomInfo} from './room-info/useSetRoomInfo';
|
|
84
84
|
import {useString} from '../utils/useString';
|
|
85
|
+
import {
|
|
86
|
+
toolbarItemCaptionText,
|
|
87
|
+
toolbarItemChatText,
|
|
88
|
+
toolbarItemInviteText,
|
|
89
|
+
toolbarItemLayoutText,
|
|
90
|
+
toolbarItemMoreText,
|
|
91
|
+
toolbarItemNoiseCancellationText,
|
|
92
|
+
toolbarItemPeopleText,
|
|
93
|
+
toolbarItemRecordingText,
|
|
94
|
+
toolbarItemSettingText,
|
|
95
|
+
toolbarItemShareText,
|
|
96
|
+
toolbarItemTranscriptText,
|
|
97
|
+
toolbarItemVitrualBackgroundText,
|
|
98
|
+
toolbarItemWhiteboardText,
|
|
99
|
+
} from '../language/default-labels/videoCallScreenLabels';
|
|
85
100
|
|
|
86
101
|
export const useToggleWhiteboard = () => {
|
|
87
102
|
const {
|
|
@@ -225,23 +240,19 @@ export const WhiteboardListener = () => {
|
|
|
225
240
|
};
|
|
226
241
|
|
|
227
242
|
const MoreButton = () => {
|
|
228
|
-
const noiseCancellationLabel = useString(
|
|
229
|
-
const
|
|
230
|
-
const
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
const
|
|
236
|
-
const
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
const chatLabel = useString('chat')();
|
|
242
|
-
const inviteLabel = useString('invite')();
|
|
243
|
-
const peopleLabel = useString('people')();
|
|
244
|
-
const layoutLabel = useString('layout')();
|
|
243
|
+
const noiseCancellationLabel = useString(toolbarItemNoiseCancellationText)();
|
|
244
|
+
const whiteboardLabel = useString<boolean>(toolbarItemWhiteboardText);
|
|
245
|
+
const captionLabel = useString<boolean>(toolbarItemCaptionText);
|
|
246
|
+
const transcriptLabel = useString<boolean>(toolbarItemTranscriptText);
|
|
247
|
+
const settingsLabel = useString(toolbarItemSettingText)();
|
|
248
|
+
const screenShareButton = useString<boolean>(toolbarItemShareText);
|
|
249
|
+
const recordingButton = useString<boolean>(toolbarItemRecordingText);
|
|
250
|
+
const moreButtonLabel = useString(toolbarItemMoreText)();
|
|
251
|
+
const virtualBackgroundLabel = useString(toolbarItemVitrualBackgroundText)();
|
|
252
|
+
const chatLabel = useString(toolbarItemChatText)();
|
|
253
|
+
const inviteLabel = useString(toolbarItemInviteText)();
|
|
254
|
+
const peopleLabel = useString(toolbarItemPeopleText)();
|
|
255
|
+
const layoutLabel = useString(toolbarItemLayoutText)();
|
|
245
256
|
const {dispatch} = useContext(DispatchContext);
|
|
246
257
|
const {rtcProps} = useContext(PropsContext);
|
|
247
258
|
const {setCustomContent} = useContent();
|
|
@@ -425,11 +436,7 @@ const MoreButton = () => {
|
|
|
425
436
|
icon: 'whiteboard-new',
|
|
426
437
|
iconColor: $config.SECONDARY_ACTION_COLOR,
|
|
427
438
|
textColor: $config.FONT_COLOR,
|
|
428
|
-
title: whiteboardActive
|
|
429
|
-
? hideWhiteboardLabel
|
|
430
|
-
: whiteboardStartedFirst
|
|
431
|
-
? showWhiteboardLabel
|
|
432
|
-
: startWhiteboardLabel,
|
|
439
|
+
title: whiteboardLabel(whiteboardActive),
|
|
433
440
|
callback: () => {
|
|
434
441
|
setActionMenuVisible(false);
|
|
435
442
|
toggleWhiteboard(whiteboardActive, true);
|
|
@@ -445,7 +452,7 @@ const MoreButton = () => {
|
|
|
445
452
|
iconColor: $config.SECONDARY_ACTION_COLOR,
|
|
446
453
|
textColor: $config.FONT_COLOR,
|
|
447
454
|
disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
|
|
448
|
-
title:
|
|
455
|
+
title: captionLabel(isCaptionON),
|
|
449
456
|
callback: () => {
|
|
450
457
|
setActionMenuVisible(false);
|
|
451
458
|
STT_clicked.current = !isCaptionON ? 'caption' : null;
|
|
@@ -468,7 +475,7 @@ const MoreButton = () => {
|
|
|
468
475
|
iconColor: $config.SECONDARY_ACTION_COLOR,
|
|
469
476
|
textColor: $config.FONT_COLOR,
|
|
470
477
|
disabled: !($config.ENABLE_STT && (isHost || (!isHost && isSTTActive))),
|
|
471
|
-
title:
|
|
478
|
+
title: transcriptLabel(isTranscriptON),
|
|
472
479
|
callback: () => {
|
|
473
480
|
setActionMenuVisible(false);
|
|
474
481
|
STT_clicked.current = !isTranscriptON ? 'transcript' : null;
|
|
@@ -66,6 +66,10 @@ import {useToolbarMenu} from '../utils/useMenu';
|
|
|
66
66
|
import ToolbarMenuItem from '../atoms/ToolbarMenuItem';
|
|
67
67
|
import {useActionSheet} from '../utils/useActionSheet';
|
|
68
68
|
import {useWaitingRoomContext} from './contexts/WaitingRoomContext';
|
|
69
|
+
import {
|
|
70
|
+
toolbarItemChatText,
|
|
71
|
+
toolbarItemPeopleText,
|
|
72
|
+
} from '../language/default-labels/videoCallScreenLabels';
|
|
69
73
|
|
|
70
74
|
export const ParticipantsCountView = ({
|
|
71
75
|
isMobileView = false,
|
|
@@ -73,7 +77,7 @@ export const ParticipantsCountView = ({
|
|
|
73
77
|
isMobileView?: boolean;
|
|
74
78
|
}) => {
|
|
75
79
|
const {onlineUsersCount} = useContext(ChatContext);
|
|
76
|
-
const peopleLabel = useString(
|
|
80
|
+
const peopleLabel = useString(toolbarItemPeopleText)();
|
|
77
81
|
return isMobileView ? (
|
|
78
82
|
<Text>
|
|
79
83
|
{peopleLabel} {'\n'} ({numFormatter(onlineUsersCount)})
|
|
@@ -118,9 +122,9 @@ export const ParticipantsIconButton = (props: ParticipantsIconButtonProps) => {
|
|
|
118
122
|
const {sidePanel, setSidePanel} = useSidePanel();
|
|
119
123
|
const {isPendingRequestToReview, setLastCheckedRequestTimestamp} =
|
|
120
124
|
useContext(LiveStreamContext);
|
|
121
|
-
|
|
125
|
+
|
|
122
126
|
const {waitingRoomUids} = useWaitingRoomContext();
|
|
123
|
-
const participantsLabel = useString(
|
|
127
|
+
const participantsLabel = useString(toolbarItemPeopleText)();
|
|
124
128
|
const isPanelActive = sidePanel === SidePanelType.Participants;
|
|
125
129
|
const {
|
|
126
130
|
data: {isHost},
|
|
@@ -243,8 +247,7 @@ export const ChatIconButton = (props: ChatIconButtonProps) => {
|
|
|
243
247
|
const {setUnreadGroupMessageCount, totalUnreadCount} = useChatNotification();
|
|
244
248
|
const {setChatType, setPrivateChatUser} = useChatUIControls();
|
|
245
249
|
|
|
246
|
-
|
|
247
|
-
const chatLabel = useString('chat')();
|
|
250
|
+
const chatLabel = useString(toolbarItemChatText)();
|
|
248
251
|
|
|
249
252
|
const isPanelActive = sidePanel === SidePanelType.Chat;
|
|
250
253
|
|
|
@@ -506,8 +509,6 @@ export interface NavbarProps {
|
|
|
506
509
|
includeDefaultItems?: boolean;
|
|
507
510
|
}
|
|
508
511
|
const Navbar = (props: NavbarProps) => {
|
|
509
|
-
//commented for v1 release
|
|
510
|
-
//const recordingLabel = useString('recordingLabel')();
|
|
511
512
|
const {customItems = [], includeDefaultItems = true} = props;
|
|
512
513
|
const {width} = useWindowDimensions();
|
|
513
514
|
|
|
@@ -54,6 +54,10 @@ import Logo from '../components/common/Logo';
|
|
|
54
54
|
import ImageIcon from '../atoms/ImageIcon';
|
|
55
55
|
import {DeviceSelectProps} from './precall/selectDevice';
|
|
56
56
|
import {useString} from '../utils/useString';
|
|
57
|
+
import {
|
|
58
|
+
precallYouAreJoiningAsHeading,
|
|
59
|
+
settingsPanelHeading,
|
|
60
|
+
} from '../language/default-labels/precallScreenLabels';
|
|
57
61
|
|
|
58
62
|
const JoinRoomInputView = ({isDesktop}) => {
|
|
59
63
|
const {rtcProps} = useContext(PropsContext);
|
|
@@ -221,8 +225,8 @@ const JoinRoomButton = () => {
|
|
|
221
225
|
};
|
|
222
226
|
|
|
223
227
|
const Precall = () => {
|
|
224
|
-
const settingsLabel = useString(
|
|
225
|
-
const youAreJoiningAs = useString(
|
|
228
|
+
const settingsLabel = useString(settingsPanelHeading)();
|
|
229
|
+
const youAreJoiningAs = useString(precallYouAreJoiningAsHeading)();
|
|
226
230
|
const {rtcProps} = useContext(PropsContext);
|
|
227
231
|
const {height} = useWindowDimensions();
|
|
228
232
|
// const {isVBActive, setIsVBActive} = useVB();
|
|
@@ -19,6 +19,7 @@ import IconButton, {IconButtonProps} from '../atoms/IconButton';
|
|
|
19
19
|
import {useToolbarMenu} from '../utils/useMenu';
|
|
20
20
|
import ToolbarMenuItem from '../atoms/ToolbarMenuItem';
|
|
21
21
|
import {useActionSheet} from '../utils/useActionSheet';
|
|
22
|
+
import {toolbarItemSettingText} from '../language/default-labels/videoCallScreenLabels';
|
|
22
23
|
|
|
23
24
|
export interface SettingsIconButtonProps {
|
|
24
25
|
render?: (onPress: () => void, isPanelActive: boolean) => JSX.Element;
|
|
@@ -28,7 +29,7 @@ const Settings = (props: SettingsIconButtonProps) => {
|
|
|
28
29
|
const {sidePanel, setSidePanel} = useSidePanel();
|
|
29
30
|
const {isToolbarMenuItem} = useToolbarMenu();
|
|
30
31
|
//commented for v1 release
|
|
31
|
-
const settingsLabel = useString(
|
|
32
|
+
const settingsLabel = useString(toolbarItemSettingText)();
|
|
32
33
|
|
|
33
34
|
const isPanelActive = sidePanel === SidePanelType.Settings;
|
|
34
35
|
const onPress = () => {
|
|
@@ -38,8 +38,19 @@ import ThemeConfig from '../theme';
|
|
|
38
38
|
import Tooltip from '../atoms/Tooltip';
|
|
39
39
|
import IDPLogoutComponent from '../auth/IDPLogoutComponent';
|
|
40
40
|
import Clipboard from '../subComponents/Clipboard';
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
import {
|
|
42
|
+
shareRoomAttendeeLinkLabel,
|
|
43
|
+
shareRoomAttendeeLinkSubText,
|
|
44
|
+
shareRoomCopyBtnText,
|
|
45
|
+
shareRoomCopyBtnTooltipText,
|
|
46
|
+
shareRoomHostLinkLabel,
|
|
47
|
+
shareRoomHostLinkSubText,
|
|
48
|
+
shareRoomPSTNLabel,
|
|
49
|
+
shareRoomPSTNNumberLabel,
|
|
50
|
+
shareRoomPSTNPinLabel,
|
|
51
|
+
shareRoomPSTNSubText,
|
|
52
|
+
shareRoomStartBtnText,
|
|
53
|
+
} from '../language/default-labels/shareLinkScreenLabels';
|
|
43
54
|
|
|
44
55
|
export interface CopyMeetingInfoProps {
|
|
45
56
|
showSubLabel?: boolean;
|
|
@@ -51,39 +62,30 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
51
62
|
} = useRoomInfo();
|
|
52
63
|
const {showSubLabel = true} = props;
|
|
53
64
|
|
|
54
|
-
const meetingUrlText = useString('roomLink')();
|
|
55
|
-
const meetingIdText = useString('roomId')();
|
|
56
|
-
const hostIdText = useString('hostId')();
|
|
57
|
-
const attendeeUrlLabel = useString('attendeeLink')();
|
|
58
|
-
const attendeeIdLabel = useString('attendeeId')();
|
|
59
|
-
const hostUrlLabel = useString('hostLink')();
|
|
60
|
-
const pstnLabel = useString('PSTN')();
|
|
61
|
-
const pstnNumberLabel = useString('number')();
|
|
62
|
-
const pinLabel = useString('pin')();
|
|
63
|
-
const copiedToClipboard = useString('copiedToClipboard')();
|
|
64
|
-
const sharePhoneNumber = useString('sharePhoneNumber')();
|
|
65
|
-
const shareWithAttendee = useString('shareWithAttendee')();
|
|
66
|
-
const shareWithCoHost = useString('shareWithCoHost')();
|
|
67
65
|
const isSDK = isSDKCheck();
|
|
68
66
|
const isWebCheck =
|
|
69
67
|
$config.FRONTEND_ENDPOINT || (platform === 'web' && !isSDK);
|
|
70
68
|
|
|
71
|
-
const
|
|
72
|
-
|
|
69
|
+
const shareRoomHostLink = useString<any>(shareRoomHostLinkLabel)(isWebCheck);
|
|
70
|
+
const shareRoomHostLinkSubTextLocal = useString<any>(
|
|
71
|
+
shareRoomHostLinkSubText,
|
|
72
|
+
)();
|
|
73
|
+
const shareRoomAttendeeLink = useString<any>(shareRoomAttendeeLinkLabel)(
|
|
74
|
+
isWebCheck,
|
|
75
|
+
);
|
|
76
|
+
const shareRoomAttendeeLinkSubTextLocal = useString<any>(
|
|
77
|
+
shareRoomAttendeeLinkSubText,
|
|
78
|
+
)();
|
|
79
|
+
const shareRoomPSTN = useString<any>(shareRoomPSTNLabel)();
|
|
80
|
+
const shareRoomPSTNNumber = useString<any>(shareRoomPSTNNumberLabel)();
|
|
81
|
+
const shareRoomPSTNPin = useString<any>(shareRoomPSTNPinLabel)();
|
|
82
|
+
const shareRoomPSTNSubTextLocal = useString<any>(shareRoomPSTNSubText)();
|
|
73
83
|
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return hostIdText;
|
|
80
|
-
} else {
|
|
81
|
-
if (isWebCheck) {
|
|
82
|
-
return meetingUrlText;
|
|
83
|
-
}
|
|
84
|
-
return meetingIdText;
|
|
85
|
-
}
|
|
86
|
-
};
|
|
84
|
+
const copiedToClipboard = useString(shareRoomCopyBtnTooltipText)();
|
|
85
|
+
|
|
86
|
+
const getAttendeeLabel = () => shareRoomAttendeeLink;
|
|
87
|
+
|
|
88
|
+
const getHostLabel = () => shareRoomHostLink;
|
|
87
89
|
|
|
88
90
|
const clipboardIconButton = (type: SHARE_LINK_CONTENT_TYPE) => {
|
|
89
91
|
return (
|
|
@@ -151,7 +153,9 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
151
153
|
{showSubLabel && (
|
|
152
154
|
<>
|
|
153
155
|
<Spacer size={14} />
|
|
154
|
-
<Text style={style.helpText}>
|
|
156
|
+
<Text style={style.helpText}>
|
|
157
|
+
{shareRoomAttendeeLinkSubTextLocal}
|
|
158
|
+
</Text>
|
|
155
159
|
</>
|
|
156
160
|
)}
|
|
157
161
|
<Spacer size={25} />
|
|
@@ -183,7 +187,9 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
183
187
|
{showSubLabel && (
|
|
184
188
|
<>
|
|
185
189
|
<Spacer size={14} />
|
|
186
|
-
<Text style={style.helpText}>
|
|
190
|
+
<Text style={style.helpText}>
|
|
191
|
+
{shareRoomHostLinkSubTextLocal}
|
|
192
|
+
</Text>
|
|
187
193
|
</>
|
|
188
194
|
)}
|
|
189
195
|
<Spacer size={25} />
|
|
@@ -193,7 +199,7 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
193
199
|
)}
|
|
194
200
|
{$config.PSTN && pstn && pstn?.number && pstn?.pin ? (
|
|
195
201
|
<>
|
|
196
|
-
<Text style={style.urlTitle}>{
|
|
202
|
+
<Text style={style.urlTitle}>{shareRoomPSTN}</Text>
|
|
197
203
|
<Spacer size={11} />
|
|
198
204
|
<View style={style.container}>
|
|
199
205
|
<View style={[style.urlContainer, style.urlPadding]}>
|
|
@@ -204,8 +210,8 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
204
210
|
//@ts-ignore
|
|
205
211
|
isWebCheck ? urlWeb : {opacity: 1},
|
|
206
212
|
]}>
|
|
207
|
-
{
|
|
208
|
-
{pstn?.pin}
|
|
213
|
+
{shareRoomPSTNNumber} - {pstn?.number} {' | '}{' '}
|
|
214
|
+
{shareRoomPSTNPin} - {pstn?.pin}
|
|
209
215
|
</Text>
|
|
210
216
|
</View>
|
|
211
217
|
</View>
|
|
@@ -215,7 +221,7 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
215
221
|
{showSubLabel && (
|
|
216
222
|
<>
|
|
217
223
|
<Spacer size={14} />
|
|
218
|
-
<Text style={style.helpText}>{
|
|
224
|
+
<Text style={style.helpText}>{shareRoomPSTNSubTextLocal}</Text>
|
|
219
225
|
</>
|
|
220
226
|
)}
|
|
221
227
|
{/* <Spacer size={25} /> */}
|
|
@@ -228,7 +234,7 @@ export const CopyMeetingInfo = (props?: CopyMeetingInfoProps) => {
|
|
|
228
234
|
};
|
|
229
235
|
|
|
230
236
|
const ClipboardIconButtonURL = ({url}) => {
|
|
231
|
-
const copiedToClipboard = useString(
|
|
237
|
+
const copiedToClipboard = useString(shareRoomCopyBtnTooltipText)();
|
|
232
238
|
return (
|
|
233
239
|
<View style={style.iconContainer}>
|
|
234
240
|
<Tooltip
|
|
@@ -329,11 +335,11 @@ const Share = () => {
|
|
|
329
335
|
data: {roomId, meetingTitle},
|
|
330
336
|
} = useRoomInfo();
|
|
331
337
|
|
|
332
|
-
const
|
|
333
|
-
|
|
338
|
+
const shareRoomStartBtnTextLocal = useString<any>(shareRoomStartBtnText)({
|
|
339
|
+
eventMode: $config.EVENT_MODE,
|
|
340
|
+
});
|
|
334
341
|
|
|
335
|
-
const
|
|
336
|
-
const copyInviteButton = useString('copyInviteButton')();
|
|
342
|
+
const copyInviteButton = useString(shareRoomCopyBtnText)();
|
|
337
343
|
const history = useHistory();
|
|
338
344
|
const enterMeeting = () => {
|
|
339
345
|
if (roomId?.host) {
|
|
@@ -381,7 +387,7 @@ const Share = () => {
|
|
|
381
387
|
iconName="video-on"
|
|
382
388
|
onPress={() => enterMeeting()}
|
|
383
389
|
containerStyle={isMobileUA() && {width: '100%'}}
|
|
384
|
-
text={
|
|
390
|
+
text={shareRoomStartBtnTextLocal}
|
|
385
391
|
/>
|
|
386
392
|
<Spacer size={16} />
|
|
387
393
|
<LinkButton
|
|
@@ -17,6 +17,16 @@ import {useRoomInfo} from '../room-info/useRoomInfo';
|
|
|
17
17
|
import {FontSizes} from '../../theme';
|
|
18
18
|
import MeetingLink from '../../atoms/MeetingLink';
|
|
19
19
|
import {useString} from '../../utils/useString';
|
|
20
|
+
import {
|
|
21
|
+
shareRoomAttendeeLinkLabel,
|
|
22
|
+
shareRoomAttendeeLinkSubText,
|
|
23
|
+
shareRoomHostLinkLabel,
|
|
24
|
+
shareRoomHostLinkSubText,
|
|
25
|
+
shareRoomPSTNLabel,
|
|
26
|
+
shareRoomPSTNNumberLabel,
|
|
27
|
+
shareRoomPSTNPinLabel,
|
|
28
|
+
shareRoomPSTNSubText,
|
|
29
|
+
} from '../../language/default-labels/shareLinkScreenLabels';
|
|
20
30
|
|
|
21
31
|
export interface MeetingInfoBodyProps {
|
|
22
32
|
showHelperText?: boolean;
|
|
@@ -30,39 +40,28 @@ export const MeetingInfoLinks = (props?: MeetingInfoBodyProps) => {
|
|
|
30
40
|
} = useRoomInfo();
|
|
31
41
|
const {getShareLink} = useShareLink();
|
|
32
42
|
|
|
33
|
-
const meetingUrlText = useString('roomLink')();
|
|
34
|
-
const meetingIdText = useString('roomId')();
|
|
35
|
-
const hostIdText = useString('hostId')();
|
|
36
|
-
const attendeeUrlLabel = useString('attendeeLink')();
|
|
37
|
-
const attendeeIdLabel = useString('attendeeId')();
|
|
38
|
-
const hostUrlLabel = useString('hostLink')();
|
|
39
|
-
const pstnLabel = useString('PSTN')();
|
|
40
|
-
const pstnNumberLabel = useString('number')();
|
|
41
|
-
const pinLabel = useString('pin')();
|
|
42
|
-
const shareWithAttendeeInfo = useString('shareWithAttendee')();
|
|
43
|
-
const shareWithCoHostInfo = useString('shareWithCoHost')();
|
|
44
|
-
const shareWithPhonenumberInfo = useString('sharePhoneNumber')();
|
|
45
|
-
|
|
46
43
|
const isSDK = isSDKCheck();
|
|
47
44
|
const isWebCheck =
|
|
48
45
|
$config.FRONTEND_ENDPOINT || (platform === 'web' && !isSDK);
|
|
49
46
|
|
|
50
|
-
const
|
|
51
|
-
|
|
47
|
+
const shareRoomHostLink = useString<any>(shareRoomHostLinkLabel)(isWebCheck);
|
|
48
|
+
const shareRoomHostLinkSubTextLocal = useString<any>(
|
|
49
|
+
shareRoomHostLinkSubText,
|
|
50
|
+
)();
|
|
51
|
+
const shareRoomAttendeeLink = useString<any>(shareRoomAttendeeLinkLabel)(
|
|
52
|
+
isWebCheck,
|
|
53
|
+
);
|
|
54
|
+
const shareRoomAttendeeLinkSubTextLocal = useString<any>(
|
|
55
|
+
shareRoomAttendeeLinkSubText,
|
|
56
|
+
)();
|
|
57
|
+
const shareRoomPSTN = useString<any>(shareRoomPSTNLabel)();
|
|
58
|
+
const shareRoomPSTNNumber = useString<any>(shareRoomPSTNNumberLabel)();
|
|
59
|
+
const shareRoomPSTNPin = useString<any>(shareRoomPSTNPinLabel)();
|
|
60
|
+
const shareRoomPSTNSubTextLocal = useString<any>(shareRoomPSTNSubText)();
|
|
61
|
+
|
|
62
|
+
const getAttendeeLabel = () => shareRoomAttendeeLink;
|
|
52
63
|
|
|
53
|
-
const getHostLabel = () =>
|
|
54
|
-
if (isSeparateHostLink) {
|
|
55
|
-
if (isWebCheck) {
|
|
56
|
-
return hostUrlLabel;
|
|
57
|
-
}
|
|
58
|
-
return hostIdText;
|
|
59
|
-
} else {
|
|
60
|
-
if (isWebCheck) {
|
|
61
|
-
return meetingUrlText;
|
|
62
|
-
}
|
|
63
|
-
return meetingIdText;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
64
|
+
const getHostLabel = () => shareRoomHostLink;
|
|
66
65
|
|
|
67
66
|
return (
|
|
68
67
|
<>
|
|
@@ -76,7 +75,7 @@ export const MeetingInfoLinks = (props?: MeetingInfoBodyProps) => {
|
|
|
76
75
|
label={getAttendeeLabel()}
|
|
77
76
|
link={getShareLink(SHARE_LINK_CONTENT_TYPE.ATTENDEE)}
|
|
78
77
|
linkToCopy={SHARE_LINK_CONTENT_TYPE.ATTENDEE}
|
|
79
|
-
helperText={showHelperText ?
|
|
78
|
+
helperText={showHelperText ? shareRoomAttendeeLinkSubTextLocal : ''}
|
|
80
79
|
gutterBottom
|
|
81
80
|
/>
|
|
82
81
|
</>
|
|
@@ -93,7 +92,7 @@ export const MeetingInfoLinks = (props?: MeetingInfoBodyProps) => {
|
|
|
93
92
|
label={getHostLabel()}
|
|
94
93
|
link={getShareLink(SHARE_LINK_CONTENT_TYPE.HOST)}
|
|
95
94
|
linkToCopy={SHARE_LINK_CONTENT_TYPE.HOST}
|
|
96
|
-
helperText={showHelperText ?
|
|
95
|
+
helperText={showHelperText ? shareRoomHostLinkSubTextLocal : ''}
|
|
97
96
|
gutterBottom
|
|
98
97
|
/>
|
|
99
98
|
</>
|
|
@@ -107,10 +106,10 @@ export const MeetingInfoLinks = (props?: MeetingInfoBodyProps) => {
|
|
|
107
106
|
size,
|
|
108
107
|
variant,
|
|
109
108
|
}}
|
|
110
|
-
label={
|
|
111
|
-
link={`${
|
|
109
|
+
label={shareRoomPSTN}
|
|
110
|
+
link={`${shareRoomPSTNNumber} - ${pstn?.number} | ${shareRoomPSTNPin} - ${pstn?.pin}`}
|
|
112
111
|
linkToCopy={SHARE_LINK_CONTENT_TYPE.PSTN}
|
|
113
|
-
helperText={showHelperText ?
|
|
112
|
+
helperText={showHelperText ? shareRoomPSTNSubTextLocal : ''}
|
|
114
113
|
gutterBottom
|
|
115
114
|
/>
|
|
116
115
|
</>
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
import {useLocalUserInfo} from 'customization-api';
|
|
2
2
|
import React, {useContext, useEffect, useState} from 'react';
|
|
3
|
-
import {
|
|
4
|
-
View,
|
|
5
|
-
Image,
|
|
6
|
-
Modal,
|
|
7
|
-
TouchableOpacity,
|
|
8
|
-
StyleSheet,
|
|
9
|
-
Text,
|
|
10
|
-
} from 'react-native';
|
|
3
|
+
import {View, Image, TouchableOpacity, StyleSheet, Text} from 'react-native';
|
|
11
4
|
import Popup from '../../atoms/Popup';
|
|
12
5
|
import ThemeConfig from '../../theme';
|
|
13
6
|
//@ts-ignore
|
|
14
7
|
import permissionHelper from '../../assets/permission.png';
|
|
15
8
|
import {DispatchContext, PermissionState} from '../../../agora-rn-uikit';
|
|
16
9
|
import {useString} from '../../utils/useString';
|
|
10
|
+
import {
|
|
11
|
+
permissionPopupDismissBtnText,
|
|
12
|
+
permissionPopupHeading,
|
|
13
|
+
permissionPopupSubHeading,
|
|
14
|
+
} from '../../language/default-labels/precallScreenLabels';
|
|
17
15
|
|
|
18
16
|
const PermissionHelper = () => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
)(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const dismiss = useString(
|
|
26
|
-
const otherToHearYou = useString('otherToHearYou')();
|
|
27
|
-
const otherToSeeAndHearYou = useString('otherToSeeAndHearYou')();
|
|
17
|
+
const heading = useString<any>(permissionPopupHeading)({
|
|
18
|
+
audioRoom: $config.AUDIO_ROOM,
|
|
19
|
+
});
|
|
20
|
+
const subheading = useString<any>(permissionPopupSubHeading)({
|
|
21
|
+
audioRoom: $config.AUDIO_ROOM,
|
|
22
|
+
});
|
|
23
|
+
const dismiss = useString(permissionPopupDismissBtnText)();
|
|
28
24
|
|
|
29
25
|
const {dispatch} = useContext(DispatchContext);
|
|
30
26
|
const {permissionStatus} = useLocalUserInfo();
|
|
@@ -89,16 +85,8 @@ const PermissionHelper = () => {
|
|
|
89
85
|
/>
|
|
90
86
|
</View>
|
|
91
87
|
<View style={styles.modalContent}>
|
|
92
|
-
<Text style={styles.infoMessage1}>
|
|
93
|
-
|
|
94
|
-
? allowMicPermission
|
|
95
|
-
: allowMicAndCameraPermission}
|
|
96
|
-
</Text>
|
|
97
|
-
<Text style={styles.infoMessage2}>
|
|
98
|
-
{select}
|
|
99
|
-
<Text style={styles.infoMessage2Highlight}>{allow}</Text>
|
|
100
|
-
{$config.AUDIO_ROOM ? otherToHearYou : otherToSeeAndHearYou}
|
|
101
|
-
</Text>
|
|
88
|
+
<Text style={styles.infoMessage1}>{heading}</Text>
|
|
89
|
+
<Text style={styles.infoMessage2}>{subheading}</Text>
|
|
102
90
|
<TouchableOpacity
|
|
103
91
|
onPress={() => {
|
|
104
92
|
closePopup();
|
|
@@ -18,10 +18,16 @@ import ImageIcon from '../../atoms/ImageIcon';
|
|
|
18
18
|
import Spacer from '../../atoms/Spacer';
|
|
19
19
|
import Toast from '../../../react-native-toast-message';
|
|
20
20
|
import {useString} from '../../utils/useString';
|
|
21
|
+
import {
|
|
22
|
+
permissionPopupErrorToastHeading,
|
|
23
|
+
permissionPopupErrorToastSubHeading,
|
|
24
|
+
} from '../../language/default-labels/precallScreenLabels';
|
|
21
25
|
|
|
22
26
|
const VideoFallback = () => {
|
|
23
|
-
const toastHeading = useString<boolean>(
|
|
24
|
-
const toastSubHeading = useString<boolean>(
|
|
27
|
+
const toastHeading = useString<boolean>(permissionPopupErrorToastHeading);
|
|
28
|
+
const toastSubHeading = useString<boolean>(
|
|
29
|
+
permissionPopupErrorToastSubHeading,
|
|
30
|
+
);
|
|
25
31
|
|
|
26
32
|
const {isCameraAvailable, isMicAvailable} = usePreCall();
|
|
27
33
|
const toastRef = useRef({isShown: false});
|
|
@@ -15,7 +15,10 @@ import PrimaryButton from '../../atoms/PrimaryButton';
|
|
|
15
15
|
import {usePreCall} from '../../components/precall/usePreCall';
|
|
16
16
|
import {useString} from '../../utils/useString';
|
|
17
17
|
import {ChannelProfile, PropsContext} from '../../../agora-rn-uikit';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
PrecallJoinBtnTextInterface,
|
|
20
|
+
precallJoinBtnText,
|
|
21
|
+
} from '../../language/default-labels/precallScreenLabels';
|
|
19
22
|
import {useRoomInfo} from '../room-info/useRoomInfo';
|
|
20
23
|
import useGetName from '../../utils/useGetName';
|
|
21
24
|
import {useUserPreference} from '../useUserPreference';
|
|
@@ -34,10 +37,11 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
34
37
|
const username = useGetName();
|
|
35
38
|
const {isJoinDataFetched} = useRoomInfo();
|
|
36
39
|
const joinRoomButton =
|
|
37
|
-
useString<
|
|
40
|
+
useString<PrecallJoinBtnTextInterface>(precallJoinBtnText);
|
|
38
41
|
const {saveName} = useUserPreference();
|
|
39
42
|
const [buttonText, setButtonText] = React.useState(
|
|
40
43
|
joinRoomButton({
|
|
44
|
+
waitingRoom: false,
|
|
41
45
|
ready: isJoinDataFetched,
|
|
42
46
|
role: $config.EVENT_MODE ? rtcProps.role : undefined,
|
|
43
47
|
}),
|
|
@@ -46,6 +50,7 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
46
50
|
if (rtcProps?.role) {
|
|
47
51
|
setButtonText(
|
|
48
52
|
joinRoomButton({
|
|
53
|
+
waitingRoom: false,
|
|
49
54
|
ready: isJoinDataFetched,
|
|
50
55
|
role: $config.EVENT_MODE ? rtcProps.role : undefined,
|
|
51
56
|
}),
|
|
@@ -15,7 +15,10 @@ import PrimaryButton from '../../atoms/PrimaryButton';
|
|
|
15
15
|
import {usePreCall} from '../../components/precall/usePreCall';
|
|
16
16
|
import {useString} from '../../utils/useString';
|
|
17
17
|
import {ChannelProfile, PropsContext} from '../../../agora-rn-uikit';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
PrecallJoinBtnTextInterface,
|
|
20
|
+
precallJoinBtnText,
|
|
21
|
+
} from '../../language/default-labels/precallScreenLabels';
|
|
19
22
|
import {useRoomInfo} from '../room-info/useRoomInfo';
|
|
20
23
|
import useGetName from '../../utils/useGetName';
|
|
21
24
|
import {useWakeLock} from '../../components/useWakeLock';
|
|
@@ -45,10 +48,11 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
45
48
|
const {awake, request} = useWakeLock();
|
|
46
49
|
const {saveName} = useUserPreference();
|
|
47
50
|
const joinRoomButton =
|
|
48
|
-
useString<
|
|
51
|
+
useString<PrecallJoinBtnTextInterface>(precallJoinBtnText);
|
|
49
52
|
|
|
50
53
|
const [buttonText, setButtonText] = React.useState(
|
|
51
54
|
joinRoomButton({
|
|
55
|
+
waitingRoom: false,
|
|
52
56
|
ready: isJoinDataFetched,
|
|
53
57
|
role: $config.EVENT_MODE ? rtcProps.role : undefined,
|
|
54
58
|
}),
|
|
@@ -78,6 +82,7 @@ const JoinCallBtn = (props: PreCallJoinCallBtnProps) => {
|
|
|
78
82
|
if (rtcProps?.role) {
|
|
79
83
|
setButtonText(
|
|
80
84
|
joinRoomButton({
|
|
85
|
+
waitingRoom: false,
|
|
81
86
|
ready: isJoinDataFetched,
|
|
82
87
|
role: $config.EVENT_MODE ? rtcProps.role : undefined,
|
|
83
88
|
}),
|