agora-appbuilder-core 4.0.0-beta.60 → 4.0.0-beta.62
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/src/atoms/ParticipantsCount.tsx +12 -2
- package/template/src/components/Controls.tsx +2 -2
- package/template/src/components/DeviceConfigure.tsx +2 -2
- package/template/src/components/RTMConfigure.tsx +3 -1
- package/template/src/components/chat-messages/useChatMessages.tsx +26 -19
- package/template/src/components/livestream/LiveStreamContext.tsx +53 -40
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +11 -3
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +11 -3
- package/template/src/components/useUserPreference.tsx +34 -2
- package/template/src/components/virtual-background/VBButton.tsx +1 -1
- package/template/src/language/default-labels/videoCallScreenLabels.ts +83 -48
- package/template/src/subComponents/RemoveMeetingPopup.tsx +8 -6
- package/template/src/utils/useString.ts +10 -0
package/package.json
CHANGED
|
@@ -7,6 +7,11 @@ import ChatContext from '../components/ChatContext';
|
|
|
7
7
|
import {useLiveStreamDataContext} from '../components/contexts/LiveStreamDataContext';
|
|
8
8
|
import {useVideoMeetingData} from '../components/contexts/VideoMeetingDataContext';
|
|
9
9
|
import {isMobileUA} from '../utils/common';
|
|
10
|
+
import {useString} from '../utils/useString';
|
|
11
|
+
import {
|
|
12
|
+
videoRoomPeopleCountTooltipAttendeeText,
|
|
13
|
+
videoRoomPeopleCountTooltipHostText,
|
|
14
|
+
} from '../language/default-labels/videoCallScreenLabels';
|
|
10
15
|
|
|
11
16
|
const ParticipantsCount = () => {
|
|
12
17
|
const {onlineUsersCount} = useContext(ChatContext);
|
|
@@ -15,17 +20,22 @@ const ParticipantsCount = () => {
|
|
|
15
20
|
const count = $config.EVENT_MODE
|
|
16
21
|
? hostUids.length + audienceUids.length
|
|
17
22
|
: onlineUsersCount;
|
|
23
|
+
|
|
24
|
+
const hostlabel = useString(videoRoomPeopleCountTooltipHostText)();
|
|
25
|
+
const attendeelabel = useString<{eventMode: boolean}>(
|
|
26
|
+
videoRoomPeopleCountTooltipAttendeeText,
|
|
27
|
+
);
|
|
18
28
|
return (
|
|
19
29
|
<IconButton
|
|
20
30
|
placement="right"
|
|
21
31
|
isClickable={isMobileUA() ? true : false}
|
|
22
32
|
toolTipMessage={
|
|
23
33
|
$config.EVENT_MODE
|
|
24
|
-
?
|
|
34
|
+
? `${hostlabel}: ${
|
|
25
35
|
$config.EVENT_MODE
|
|
26
36
|
? hostUids?.length || 0
|
|
27
37
|
: hostUidsVM.length || 0
|
|
28
|
-
}\n${$config.EVENT_MODE
|
|
38
|
+
}\n${attendeelabel({eventMode: $config.EVENT_MODE})}: ${
|
|
29
39
|
$config.EVENT_MODE
|
|
30
40
|
? audienceUids.length || 0
|
|
31
41
|
: attendeeUids?.length || 0
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
toolbarItemSettingText,
|
|
97
97
|
toolbarItemShareText,
|
|
98
98
|
toolbarItemTranscriptText,
|
|
99
|
-
|
|
99
|
+
toolbarItemVirtualBackgroundText,
|
|
100
100
|
toolbarItemWhiteboardText,
|
|
101
101
|
} from '../language/default-labels/videoCallScreenLabels';
|
|
102
102
|
|
|
@@ -250,7 +250,7 @@ const MoreButton = () => {
|
|
|
250
250
|
const screenShareButton = useString<boolean>(toolbarItemShareText);
|
|
251
251
|
const recordingButton = useString<boolean>(toolbarItemRecordingText);
|
|
252
252
|
const moreButtonLabel = useString(toolbarItemMoreText)();
|
|
253
|
-
const virtualBackgroundLabel = useString(
|
|
253
|
+
const virtualBackgroundLabel = useString(toolbarItemVirtualBackgroundText)();
|
|
254
254
|
const chatLabel = useString(toolbarItemChatText)();
|
|
255
255
|
const inviteLabel = useString(toolbarItemInviteText)();
|
|
256
256
|
const peopleLabel = useString(toolbarItemPeopleText)();
|
|
@@ -35,7 +35,7 @@ import LocalEventEmitter, {
|
|
|
35
35
|
} from '../rtm-events-api/LocalEvents';
|
|
36
36
|
import {useString} from '../utils/useString';
|
|
37
37
|
import {
|
|
38
|
-
|
|
38
|
+
deviceDetectionSecondaryBtnText,
|
|
39
39
|
deviceDetectionCheckboxText,
|
|
40
40
|
deviceDetectionPrimaryBtnText,
|
|
41
41
|
deviceDetectionToastHeading,
|
|
@@ -67,7 +67,7 @@ const DeviceConfigure: React.FC<Props> = (props: any) => {
|
|
|
67
67
|
deviceDetectionToastSubHeading,
|
|
68
68
|
);
|
|
69
69
|
const toastPrimaryBtnText = useString(deviceDetectionPrimaryBtnText)();
|
|
70
|
-
const toastCancelBtnText = useString(
|
|
70
|
+
const toastCancelBtnText = useString(deviceDetectionSecondaryBtnText)();
|
|
71
71
|
const toastCheckboxBtnText = useString(deviceDetectionCheckboxText)();
|
|
72
72
|
|
|
73
73
|
const micSelectInProgress = useRef(false);
|
|
@@ -495,7 +495,9 @@ const RtmConfigure = (props: any) => {
|
|
|
495
495
|
waitingRoomStatusRef.current?.waitingRoomStatus !==
|
|
496
496
|
WaitingRoomStatus.APPROVED
|
|
497
497
|
) {
|
|
498
|
-
|
|
498
|
+
//todo: hari/bhupen added important rtm message in the queue and run it later when user join the call
|
|
499
|
+
evt = data.evt;
|
|
500
|
+
value = data.value;
|
|
499
501
|
} else {
|
|
500
502
|
evt = data.evt;
|
|
501
503
|
value = data.value;
|
|
@@ -28,7 +28,7 @@ import {timeNow} from '../../rtm/utils';
|
|
|
28
28
|
import {useSidePanel} from '../../utils/useSidePanel';
|
|
29
29
|
import getUniqueID from '../../utils/getUniqueID';
|
|
30
30
|
import {trimText} from '../../utils/common';
|
|
31
|
-
import {
|
|
31
|
+
import {useStringRef} from '../../utils/useString';
|
|
32
32
|
import {
|
|
33
33
|
publicChatToastHeading,
|
|
34
34
|
multiplePublicChatToastHeading,
|
|
@@ -108,30 +108,33 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
|
|
|
108
108
|
const individualActiveRef = useRef<string | number>();
|
|
109
109
|
|
|
110
110
|
//public single
|
|
111
|
-
const fromText =
|
|
111
|
+
const fromText = useStringRef(publicChatToastHeading);
|
|
112
112
|
|
|
113
113
|
//public multple
|
|
114
|
-
const multiplePublicChatToastHeadingTT =
|
|
114
|
+
const multiplePublicChatToastHeadingTT = useStringRef(
|
|
115
115
|
multiplePublicChatToastHeading,
|
|
116
|
-
)
|
|
117
|
-
|
|
116
|
+
);
|
|
117
|
+
//@ts-ignore
|
|
118
|
+
const multiplePublicChatToastSubHeadingTT = useStringRef<{
|
|
118
119
|
count: number;
|
|
119
120
|
from: string;
|
|
120
121
|
}>(multiplePublicChatToastSubHeading);
|
|
121
122
|
|
|
122
123
|
//private single
|
|
123
|
-
const privateMessageLabel =
|
|
124
|
+
const privateMessageLabel = useStringRef(privateChatToastHeading);
|
|
124
125
|
|
|
125
126
|
//private multiple
|
|
126
|
-
|
|
127
|
+
//@ts-ignore
|
|
128
|
+
const multiplePrivateChatToastHeadingTT = useStringRef<{count: number}>(
|
|
127
129
|
multiplePrivateChatToastHeading,
|
|
128
130
|
);
|
|
129
131
|
|
|
130
132
|
//multiple private and public toast
|
|
131
|
-
const multiplePublicAndPrivateChatToastHeadingTT =
|
|
133
|
+
const multiplePublicAndPrivateChatToastHeadingTT = useStringRef(
|
|
132
134
|
multiplePublicAndPrivateChatToastHeading,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
+
);
|
|
136
|
+
//@ts-ignore
|
|
137
|
+
const multiplePublicAndPrivateChatToastSubHeadingTT = useStringRef<{
|
|
135
138
|
publicChatCount: number;
|
|
136
139
|
privateChatCount: number;
|
|
137
140
|
from: string;
|
|
@@ -261,16 +264,18 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
|
|
|
261
264
|
leadingIconName: 'chat-nav',
|
|
262
265
|
text1:
|
|
263
266
|
privateMessages && privateMessages.length
|
|
264
|
-
? multiplePublicAndPrivateChatToastHeadingTT
|
|
265
|
-
: multiplePublicChatToastHeadingTT,
|
|
267
|
+
? multiplePublicAndPrivateChatToastHeadingTT?.current()
|
|
268
|
+
: multiplePublicChatToastHeadingTT?.current(),
|
|
266
269
|
text2:
|
|
267
270
|
privateMessages && privateMessages.length
|
|
268
|
-
?
|
|
271
|
+
? //@ts-ignore
|
|
272
|
+
multiplePublicAndPrivateChatToastSubHeadingTT?.current({
|
|
269
273
|
publicChatCount: publicMessages.length,
|
|
270
274
|
privateChatCount: privateMessages.length,
|
|
271
275
|
from: fromNames,
|
|
272
276
|
})
|
|
273
|
-
:
|
|
277
|
+
: //@ts-ignore
|
|
278
|
+
multiplePublicChatToastSubHeadingTT?.current({
|
|
274
279
|
count: publicMessages.length,
|
|
275
280
|
from: fromNames,
|
|
276
281
|
}),
|
|
@@ -297,9 +302,11 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
|
|
|
297
302
|
secondaryBtn: null,
|
|
298
303
|
type: 'info',
|
|
299
304
|
leadingIconName: 'chat-nav',
|
|
300
|
-
text1:
|
|
301
|
-
|
|
302
|
-
|
|
305
|
+
text1:
|
|
306
|
+
//@ts-ignore
|
|
307
|
+
multiplePrivateChatToastHeadingTT?.current({
|
|
308
|
+
count: privateMessages.length,
|
|
309
|
+
}),
|
|
303
310
|
text2: ``,
|
|
304
311
|
visibilityTime: 3000,
|
|
305
312
|
onPress: () => {
|
|
@@ -330,10 +337,10 @@ const ChatMessagesProvider = (props: ChatMessagesProviderProps) => {
|
|
|
330
337
|
type: 'info',
|
|
331
338
|
leadingIconName: 'chat-nav',
|
|
332
339
|
text1: isPrivateMessage
|
|
333
|
-
? privateMessageLabel
|
|
340
|
+
? privateMessageLabel?.current()
|
|
334
341
|
: //@ts-ignore
|
|
335
342
|
defaultContentRef.current.defaultContent[uidAsNumber]?.name
|
|
336
|
-
? fromText(
|
|
343
|
+
? fromText?.current(
|
|
337
344
|
trimText(
|
|
338
345
|
//@ts-ignore
|
|
339
346
|
defaultContentRef.current.defaultContent[uidAsNumber]?.name,
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
createContext,
|
|
3
|
+
useContext,
|
|
4
|
+
useState,
|
|
5
|
+
useRef,
|
|
6
|
+
useCallback,
|
|
7
|
+
useEffect,
|
|
8
|
+
} from 'react';
|
|
2
9
|
import {StyleSheet} from 'react-native';
|
|
3
10
|
import ChatContext, {controlMessageEnum} from '../ChatContext';
|
|
4
11
|
import Toast from '../../../react-native-toast-message';
|
|
@@ -21,7 +28,7 @@ import {SidePanelType, useContent, useSidePanel} from 'customization-api';
|
|
|
21
28
|
import TertiaryButton from '../../atoms/TertiaryButton';
|
|
22
29
|
import PrimaryButton from '../../atoms/PrimaryButton';
|
|
23
30
|
import {trimText} from '../../utils/common';
|
|
24
|
-
import {
|
|
31
|
+
import {useStringRef} from '../../utils/useString';
|
|
25
32
|
import {
|
|
26
33
|
livestreamRequestAlreadyProcessed,
|
|
27
34
|
livestreamToastApprovalBtnText,
|
|
@@ -35,50 +42,50 @@ export const LiveStreamContextConsumer = LiveStreamContext.Consumer;
|
|
|
35
42
|
export const LiveStreamContextProvider: React.FC<
|
|
36
43
|
liveStreamPropsInterface
|
|
37
44
|
> = props => {
|
|
38
|
-
const requestAlreadyProcessed =
|
|
45
|
+
const requestAlreadyProcessed = useStringRef(
|
|
39
46
|
livestreamRequestAlreadyProcessed,
|
|
40
|
-
)
|
|
47
|
+
);
|
|
41
48
|
|
|
42
|
-
const raiseHandRequestReceivedToastHeading =
|
|
49
|
+
const raiseHandRequestReceivedToastHeading = useStringRef(
|
|
43
50
|
LSNotificationObject.RAISE_HAND_RECEIVED.text1TranslationKey,
|
|
44
51
|
);
|
|
45
|
-
const raiseHandRequestReceivedToastSubHeading =
|
|
52
|
+
const raiseHandRequestReceivedToastSubHeading = useStringRef(
|
|
46
53
|
LSNotificationObject.RAISE_HAND_RECEIVED.text2TranslationKey,
|
|
47
|
-
)
|
|
54
|
+
);
|
|
48
55
|
|
|
49
|
-
const raiseHandRequestRecallToastHeading =
|
|
56
|
+
const raiseHandRequestRecallToastHeading = useStringRef(
|
|
50
57
|
LSNotificationObject.RAISE_HAND_REQUEST_RECALL.text1TranslationKey,
|
|
51
58
|
);
|
|
52
59
|
|
|
53
|
-
const raiseHandRequestAcceptedToastHeading =
|
|
60
|
+
const raiseHandRequestAcceptedToastHeading = useStringRef(
|
|
54
61
|
LSNotificationObject.RAISE_HAND_ACCEPTED.text1TranslationKey,
|
|
55
|
-
)
|
|
56
|
-
const raiseHandRequestAcceptedToastSubHeading =
|
|
62
|
+
);
|
|
63
|
+
const raiseHandRequestAcceptedToastSubHeading = useStringRef(
|
|
57
64
|
LSNotificationObject.RAISE_HAND_ACCEPTED.text2TranslationKey,
|
|
58
|
-
)
|
|
65
|
+
);
|
|
59
66
|
|
|
60
|
-
const raiseHandRequestRejectedToastHeading =
|
|
67
|
+
const raiseHandRequestRejectedToastHeading = useStringRef(
|
|
61
68
|
LSNotificationObject.RAISE_HAND_REJECTED.text1TranslationKey,
|
|
62
|
-
)
|
|
69
|
+
);
|
|
63
70
|
|
|
64
|
-
const raiseHandApprovedRequestRecallToastHeading =
|
|
71
|
+
const raiseHandApprovedRequestRecallToastHeading = useStringRef(
|
|
65
72
|
LSNotificationObject.RAISE_HAND_APPROVED_REQUEST_RECALL.text1TranslationKey,
|
|
66
|
-
)
|
|
73
|
+
);
|
|
67
74
|
|
|
68
|
-
const promoteAsCoHostToastHeading =
|
|
75
|
+
const promoteAsCoHostToastHeading = useStringRef(
|
|
69
76
|
LSNotificationObject.PROMOTE_AS_CO_HOST.text1TranslationKey,
|
|
70
|
-
)
|
|
77
|
+
);
|
|
71
78
|
|
|
72
|
-
const raiseHandRequestToastHeading =
|
|
79
|
+
const raiseHandRequestToastHeading = useStringRef(
|
|
73
80
|
LSNotificationObject.RAISE_HAND_REQUEST.text1TranslationKey,
|
|
74
|
-
)
|
|
75
|
-
const raiseHandRequestToastSubHeading =
|
|
81
|
+
);
|
|
82
|
+
const raiseHandRequestToastSubHeading = useStringRef(
|
|
76
83
|
LSNotificationObject.RAISE_HAND_REQUEST.text2TranslationKey,
|
|
77
|
-
)
|
|
84
|
+
);
|
|
78
85
|
|
|
79
|
-
const raiseHandRequestRecallLocalToastHeading =
|
|
86
|
+
const raiseHandRequestRecallLocalToastHeading = useStringRef(
|
|
80
87
|
LSNotificationObject.RAISE_HAND_REQUEST_RECALL_LOCAL.text1TranslationKey,
|
|
81
|
-
)
|
|
88
|
+
);
|
|
82
89
|
|
|
83
90
|
const screenshareContextInstance = useScreenshare();
|
|
84
91
|
const screenshareContextInstanceRef = useRef<any>();
|
|
@@ -164,8 +171,8 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
164
171
|
|
|
165
172
|
const [isPendingRequestToReview, setPendingRequestToReview] = useState(false);
|
|
166
173
|
|
|
167
|
-
const allowToBePresenter =
|
|
168
|
-
const deny =
|
|
174
|
+
const allowToBePresenter = useStringRef(livestreamToastApprovalBtnText);
|
|
175
|
+
const deny = useStringRef(livestreamToastDenyBtnText);
|
|
169
176
|
const showToast = (
|
|
170
177
|
text: string,
|
|
171
178
|
text2: string,
|
|
@@ -180,7 +187,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
180
187
|
<PrimaryButton
|
|
181
188
|
containerStyle={style.primaryBtn}
|
|
182
189
|
textStyle={style.primaryBtnText}
|
|
183
|
-
text={allowToBePresenter}
|
|
190
|
+
text={allowToBePresenter?.current()}
|
|
184
191
|
onPress={() => {
|
|
185
192
|
hostApprovesRequestOfUID(uid);
|
|
186
193
|
Toast.hide();
|
|
@@ -190,7 +197,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
190
197
|
btns.secondaryBtn = (
|
|
191
198
|
<TertiaryButton
|
|
192
199
|
containerStyle={style.secondaryBtn}
|
|
193
|
-
text={deny}
|
|
200
|
+
text={deny?.current()}
|
|
194
201
|
onPress={() => {
|
|
195
202
|
hostRejectsRequestOfUID(uid);
|
|
196
203
|
Toast.hide();
|
|
@@ -421,10 +428,10 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
421
428
|
sidePanelRef.current !== SidePanelType.Participants
|
|
422
429
|
) {
|
|
423
430
|
showToast(
|
|
424
|
-
raiseHandRequestReceivedToastHeading(
|
|
431
|
+
raiseHandRequestReceivedToastHeading?.current(
|
|
425
432
|
trimText(getAttendeeName(data.sender)),
|
|
426
433
|
),
|
|
427
|
-
raiseHandRequestReceivedToastSubHeading,
|
|
434
|
+
raiseHandRequestReceivedToastSubHeading?.current(),
|
|
428
435
|
data.sender,
|
|
429
436
|
data.ts,
|
|
430
437
|
);
|
|
@@ -444,7 +451,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
444
451
|
sidePanelRef.current !== SidePanelType.Participants
|
|
445
452
|
) {
|
|
446
453
|
showToast(
|
|
447
|
-
raiseHandRequestRecallToastHeading(
|
|
454
|
+
raiseHandRequestRecallToastHeading?.current(
|
|
448
455
|
trimText(getAttendeeName(data.sender)),
|
|
449
456
|
),
|
|
450
457
|
null,
|
|
@@ -500,8 +507,8 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
500
507
|
if (raiseHandList[localUidRef.current]?.raised === RaiseHandValue.FALSE)
|
|
501
508
|
return;
|
|
502
509
|
showToast(
|
|
503
|
-
raiseHandRequestAcceptedToastHeading,
|
|
504
|
-
raiseHandRequestAcceptedToastSubHeading,
|
|
510
|
+
raiseHandRequestAcceptedToastHeading?.current(),
|
|
511
|
+
raiseHandRequestAcceptedToastSubHeading?.current(),
|
|
505
512
|
);
|
|
506
513
|
// Promote user's privileges to host
|
|
507
514
|
changeClientRoleTo(ClientRole.Broadcaster);
|
|
@@ -521,13 +528,16 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
521
528
|
raiseHandListRef.current[localUidRef.current].role ==
|
|
522
529
|
ClientRole.Audience
|
|
523
530
|
) {
|
|
524
|
-
showToast(raiseHandRequestRejectedToastHeading, null);
|
|
531
|
+
showToast(raiseHandRequestRejectedToastHeading?.current(), null);
|
|
525
532
|
} else if (
|
|
526
533
|
raiseHandListRef.current[localUidRef.current].role ==
|
|
527
534
|
ClientRole.Broadcaster
|
|
528
535
|
) {
|
|
529
536
|
/** 2.b */
|
|
530
|
-
showToast(
|
|
537
|
+
showToast(
|
|
538
|
+
raiseHandApprovedRequestRecallToastHeading?.current(),
|
|
539
|
+
null,
|
|
540
|
+
);
|
|
531
541
|
screenshareContextInstanceRef?.current?.stopUserScreenShare(); // This will not exist on ios
|
|
532
542
|
|
|
533
543
|
// Demote user's privileges to audience
|
|
@@ -546,7 +556,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
546
556
|
const unsubPromoteAsCoHost = events.on(
|
|
547
557
|
LiveStreamControlMessageEnum.promoteAsCoHost,
|
|
548
558
|
data => {
|
|
549
|
-
showToast(promoteAsCoHostToastHeading, null);
|
|
559
|
+
showToast(promoteAsCoHostToastHeading.current(), null);
|
|
550
560
|
// Promote user's privileges to host
|
|
551
561
|
changeClientRoleTo(ClientRole.Broadcaster);
|
|
552
562
|
// Audience updates its local attributes and notfies all host when request is approved
|
|
@@ -618,7 +628,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
618
628
|
} else {
|
|
619
629
|
Toast.hide();
|
|
620
630
|
setTimeout(() => {
|
|
621
|
-
showToast(requestAlreadyProcessed, null);
|
|
631
|
+
showToast(requestAlreadyProcessed?.current(), null);
|
|
622
632
|
});
|
|
623
633
|
}
|
|
624
634
|
};
|
|
@@ -639,7 +649,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
639
649
|
} else {
|
|
640
650
|
Toast.hide();
|
|
641
651
|
setTimeout(() => {
|
|
642
|
-
showToast(requestAlreadyProcessed, null);
|
|
652
|
+
showToast(requestAlreadyProcessed?.current(), null);
|
|
643
653
|
});
|
|
644
654
|
}
|
|
645
655
|
};
|
|
@@ -667,7 +677,10 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
667
677
|
// If hand is already raised, skip the call
|
|
668
678
|
if (raiseHandList[localUidRef.current]?.raised === RaiseHandValue.TRUE)
|
|
669
679
|
return;
|
|
670
|
-
showToast(
|
|
680
|
+
showToast(
|
|
681
|
+
raiseHandRequestToastHeading?.current(),
|
|
682
|
+
raiseHandRequestToastSubHeading?.current(),
|
|
683
|
+
);
|
|
671
684
|
events.send(
|
|
672
685
|
EventNames.RAISED_ATTRIBUTE,
|
|
673
686
|
JSON.stringify({
|
|
@@ -713,7 +726,7 @@ export const LiveStreamContextProvider: React.FC<
|
|
|
713
726
|
PersistanceLevel.Sender,
|
|
714
727
|
);
|
|
715
728
|
UpdtLocStateAndBCastAttr(ClientRole.Audience, new Date().getTime());
|
|
716
|
-
showToast(raiseHandRequestRecallLocalToastHeading, null);
|
|
729
|
+
showToast(raiseHandRequestRecallLocalToastHeading?.current(), null);
|
|
717
730
|
};
|
|
718
731
|
|
|
719
732
|
/** ******* AUDIENCE CONTROLS SECTION ENDS ******* */
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import React, {useContext, useEffect} from 'react';
|
|
14
14
|
import PrimaryButton from '../../atoms/PrimaryButton';
|
|
15
15
|
import {usePreCall} from './usePreCall';
|
|
16
|
-
import {useString} from '../../utils/useString';
|
|
16
|
+
import {useString, useStringRef} from '../../utils/useString';
|
|
17
17
|
import {
|
|
18
18
|
ChannelProfile,
|
|
19
19
|
DispatchContext,
|
|
@@ -34,6 +34,10 @@ import {EventNames} from '../../rtm-events';
|
|
|
34
34
|
import useWaitingRoomAPI from '../../subComponents/waiting-rooms/useWaitingRoomAPI';
|
|
35
35
|
import {useContent} from 'customization-api';
|
|
36
36
|
import EventsConfigure from '../EventsConfigure';
|
|
37
|
+
import {
|
|
38
|
+
waitingRoomApprovalRejectionToastHeading,
|
|
39
|
+
waitingRoomApprovalRejectionToastSubHeading,
|
|
40
|
+
} from '../../language/default-labels/videoCallScreenLabels';
|
|
37
41
|
|
|
38
42
|
export interface PreCallJoinWaitingRoomBtnProps {
|
|
39
43
|
render?: (
|
|
@@ -45,6 +49,10 @@ export interface PreCallJoinWaitingRoomBtnProps {
|
|
|
45
49
|
|
|
46
50
|
let shouldWaitingRoomPoll = null;
|
|
47
51
|
const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
52
|
+
const headinglabel = useStringRef(waitingRoomApprovalRejectionToastHeading);
|
|
53
|
+
const subheadinglabel = useStringRef(
|
|
54
|
+
waitingRoomApprovalRejectionToastSubHeading,
|
|
55
|
+
);
|
|
48
56
|
let pollingTimeout = React.useRef(null);
|
|
49
57
|
const {rtcProps} = useContext(PropsContext);
|
|
50
58
|
const {setCallActive, callActive} = usePreCall();
|
|
@@ -132,9 +140,9 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
132
140
|
});
|
|
133
141
|
// inform user that entry was denied by the host
|
|
134
142
|
Toast.show({
|
|
135
|
-
text1: `Approval Required`,
|
|
136
143
|
leadingIconName: 'info',
|
|
137
|
-
|
|
144
|
+
text1: headinglabel?.current(),
|
|
145
|
+
text2: subheadinglabel?.current(),
|
|
138
146
|
visibilityTime: 3000,
|
|
139
147
|
type: 'error',
|
|
140
148
|
primaryBtn: null,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import React, {useContext, useEffect} from 'react';
|
|
14
14
|
import PrimaryButton from '../../atoms/PrimaryButton';
|
|
15
15
|
import {usePreCall} from './usePreCall';
|
|
16
|
-
import {useString} from '../../utils/useString';
|
|
16
|
+
import {useString, useStringRef} from '../../utils/useString';
|
|
17
17
|
import {
|
|
18
18
|
ChannelProfile,
|
|
19
19
|
DispatchContext,
|
|
@@ -40,6 +40,10 @@ import events from '../../rtm-events-api';
|
|
|
40
40
|
import useWaitingRoomAPI from '../../subComponents/waiting-rooms/useWaitingRoomAPI';
|
|
41
41
|
import {UserType} from '../RTMConfigure';
|
|
42
42
|
import {useContent} from 'customization-api';
|
|
43
|
+
import {
|
|
44
|
+
waitingRoomApprovalRejectionToastHeading,
|
|
45
|
+
waitingRoomApprovalRejectionToastSubHeading,
|
|
46
|
+
} from '../../language/default-labels/videoCallScreenLabels';
|
|
43
47
|
|
|
44
48
|
const audio = new Audio(
|
|
45
49
|
'https://dl.dropboxusercontent.com/s/1cdwpm3gca9mlo0/kick.mp3',
|
|
@@ -55,6 +59,10 @@ export interface PreCallJoinWaitingRoomBtnProps {
|
|
|
55
59
|
|
|
56
60
|
let shouldWaitingRoomPoll = null;
|
|
57
61
|
const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
62
|
+
const headinglabel = useStringRef(waitingRoomApprovalRejectionToastHeading);
|
|
63
|
+
const subheadinglabel = useStringRef(
|
|
64
|
+
waitingRoomApprovalRejectionToastSubHeading,
|
|
65
|
+
);
|
|
58
66
|
let pollingTimeout = React.useRef(null);
|
|
59
67
|
const {rtcProps} = useContext(PropsContext);
|
|
60
68
|
const {setCallActive, callActive} = usePreCall();
|
|
@@ -139,8 +147,8 @@ const JoinWaitingRoomBtn = (props: PreCallJoinWaitingRoomBtnProps) => {
|
|
|
139
147
|
// inform user that entry was denied by the host
|
|
140
148
|
Toast.show({
|
|
141
149
|
leadingIconName: 'info',
|
|
142
|
-
text1:
|
|
143
|
-
text2:
|
|
150
|
+
text1: headinglabel?.current(),
|
|
151
|
+
text2: subheadinglabel?.current(),
|
|
144
152
|
visibilityTime: 3000,
|
|
145
153
|
type: 'error',
|
|
146
154
|
primaryBtn: null,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
information visit https://appbuilder.agora.io.
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
|
-
import React, {useState, useContext, useEffect} from 'react';
|
|
12
|
+
import React, {useState, useContext, useEffect, useRef} from 'react';
|
|
13
13
|
import {
|
|
14
14
|
DispatchContext,
|
|
15
15
|
ContentInterface,
|
|
@@ -22,13 +22,15 @@ import {EventNames} from '../rtm-events';
|
|
|
22
22
|
import useLocalScreenShareUid from '../utils/useLocalShareScreenUid';
|
|
23
23
|
import {createHook} from 'customization-implementation';
|
|
24
24
|
import ChatContext from './ChatContext';
|
|
25
|
-
import {useRtc} from 'customization-api';
|
|
25
|
+
import {filterObject, useContent, useRtc} from 'customization-api';
|
|
26
26
|
import {gql, useMutation} from '@apollo/client';
|
|
27
27
|
import {
|
|
28
28
|
PSTNUserLabel,
|
|
29
29
|
videoRoomScreenshareText,
|
|
30
30
|
videoRoomUserFallbackText,
|
|
31
31
|
} from '../language/default-labels/videoCallScreenLabels';
|
|
32
|
+
import {useLanguage} from '../language/useLanguage';
|
|
33
|
+
import {useScreenContext} from '../components/contexts/ScreenShareContext';
|
|
32
34
|
|
|
33
35
|
interface UserPreferenceContextInterface {
|
|
34
36
|
displayName: string;
|
|
@@ -64,6 +66,36 @@ const UserPreferenceProvider = (props: {children: React.ReactNode}) => {
|
|
|
64
66
|
const [displayName, setDisplayName] = useState(getInitialUsername());
|
|
65
67
|
const [updateUserName] = useMutation(UPDATE_USER_NAME_MUTATION);
|
|
66
68
|
|
|
69
|
+
const {languageCode} = useLanguage();
|
|
70
|
+
const {screenShareData} = useScreenContext();
|
|
71
|
+
const {defaultContent} = useContent();
|
|
72
|
+
const screenShareDataRef = useRef({screenShareData});
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
screenShareDataRef.current.screenShareData = screenShareData;
|
|
75
|
+
}, [screenShareData]);
|
|
76
|
+
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
try {
|
|
79
|
+
if (languageCode) {
|
|
80
|
+
Object.keys(screenShareDataRef.current.screenShareData).map(i => {
|
|
81
|
+
let screenShareUidToUpdate = parseInt(i);
|
|
82
|
+
const users = filterObject(
|
|
83
|
+
defaultContent,
|
|
84
|
+
([k, v]) => v?.screenUid === screenShareUidToUpdate,
|
|
85
|
+
);
|
|
86
|
+
const keys = Object.keys(users);
|
|
87
|
+
if (users && keys && keys?.length) {
|
|
88
|
+
updateRenderListState(screenShareUidToUpdate, {
|
|
89
|
+
name: getScreenShareName(
|
|
90
|
+
users[parseInt(keys[0])]?.name || userText,
|
|
91
|
+
),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
} catch (error) {}
|
|
97
|
+
}, [languageCode, screenShareData]);
|
|
98
|
+
|
|
67
99
|
const saveName = (name: string) => {
|
|
68
100
|
if (name && name?.trim() !== '') {
|
|
69
101
|
try {
|
|
@@ -18,7 +18,7 @@ const VBButton = (props: VBButtonProps) => {
|
|
|
18
18
|
const {isVBOpen, setIsVBOpen, showLabel = false} = props;
|
|
19
19
|
const {isToolbarMenuItem} = useToolbarMenu();
|
|
20
20
|
const {isOnActionSheet} = useActionSheet();
|
|
21
|
-
const vbLabel = useString('
|
|
21
|
+
const vbLabel = useString('toolbarItemVirtualBackgroundText')();
|
|
22
22
|
|
|
23
23
|
const onPress = () => {
|
|
24
24
|
setIsVBOpen(prev => !prev);
|
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
import {I18nBaseType, I18nConditionalType, I18nDynamicType} from '../i18nTypes';
|
|
2
2
|
import {room} from './createScreenLabels';
|
|
3
|
+
|
|
4
|
+
export interface deviceDetectionToastSubHeadingDataInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type sttSpokenLanguageToastHeadingDataType = 'Set' | 'Changed';
|
|
10
|
+
export interface sttSpokenLanguageToastSubHeadingDataInterface {
|
|
11
|
+
action: sttSpokenLanguageToastHeadingDataType;
|
|
12
|
+
newLanguage: string;
|
|
13
|
+
oldLanguage: string;
|
|
14
|
+
username: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type whiteboardFileUploadToastDataType = 'File' | 'Image';
|
|
18
|
+
export interface publicChatToastSubHeadingDataInterface {
|
|
19
|
+
count: number;
|
|
20
|
+
from: string;
|
|
21
|
+
}
|
|
22
|
+
export interface privateChatToastHeadingDataInterface {
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface publicAndPrivateChatToastSubHeadingDataInterface {
|
|
27
|
+
publicChatCount: number;
|
|
28
|
+
privateChatCount: number;
|
|
29
|
+
from: string;
|
|
30
|
+
}
|
|
3
31
|
interface NetworkQualityStatusInterface {
|
|
4
32
|
unknown?: 'Unknown';
|
|
5
33
|
excellent?: 'Excellent';
|
|
@@ -75,8 +103,8 @@ export const toolbarItemNoiseCancellationText =
|
|
|
75
103
|
export const toolbarItemWhiteboardText = 'toolbarItemWhiteboardText';
|
|
76
104
|
export const toolbarItemCaptionText = 'toolbarItemCaptionText';
|
|
77
105
|
export const toolbarItemTranscriptText = 'toolbarItemTranscriptText';
|
|
78
|
-
export const
|
|
79
|
-
'
|
|
106
|
+
export const toolbarItemVirtualBackgroundText =
|
|
107
|
+
'toolbarItemVirtualBackgroundText';
|
|
80
108
|
|
|
81
109
|
export const toolbarItemRaiseHandText = 'toolbarItemRaiseHandText';
|
|
82
110
|
|
|
@@ -128,9 +156,9 @@ export const leavePopupHeading = `leave${room}PopupHeading`;
|
|
|
128
156
|
export const leavePopupSubHeading = `leave${room}PopupSubHeading`;
|
|
129
157
|
export const leavePopupPrimaryBtnText = `leave${room}PopupPrimaryBtnText`;
|
|
130
158
|
|
|
131
|
-
export const
|
|
132
|
-
export const
|
|
133
|
-
export const
|
|
159
|
+
export const removeUserFromRoomPopupHeading = `removeUserFrom${room}PopupHeading`;
|
|
160
|
+
export const removeUserFromRoomPopupSubHeading = `removeUserFrom${room}PopupSubHeading`;
|
|
161
|
+
export const removeUserFromRoomPopupPrimaryBtnText = `removeUserFrom${room}PopupPrimaryBtnText`;
|
|
134
162
|
|
|
135
163
|
export const removeScreenshareFromRoomPopupHeading = `removeScreenshareFrom${room}PopupHeading`;
|
|
136
164
|
export const removeScreenshareFromRoomPopupSubHeading = `removeScreenshareFrom${room}PopupSubHeading`;
|
|
@@ -358,7 +386,8 @@ export const sttSpokenLanguageToastSubHeading = `${stt}SpokenLanguageToastSubHea
|
|
|
358
386
|
export const deviceDetectionToastHeading = 'deviceDetectionToastHeading';
|
|
359
387
|
export const deviceDetectionToastSubHeading = 'deviceDetectionToastSubHeading';
|
|
360
388
|
export const deviceDetectionPrimaryBtnText = 'deviceDetectionPrimaryBtnText';
|
|
361
|
-
export const
|
|
389
|
+
export const deviceDetectionSecondaryBtnText =
|
|
390
|
+
'deviceDetectionSecondaryBtnText';
|
|
362
391
|
export const deviceDetectionCheckboxText = 'deviceDetectionCheckboxText';
|
|
363
392
|
|
|
364
393
|
export const hostMutedUserToastHeading = 'hostMutedUserToastHeading';
|
|
@@ -379,6 +408,11 @@ export const waitingRoomApprovalRequiredPrimaryBtnText =
|
|
|
379
408
|
export const waitingRoomApprovalRequiredSecondaryBtnText =
|
|
380
409
|
'waitingRoomApprovalRequiredSecondaryBtnText';
|
|
381
410
|
|
|
411
|
+
export const waitingRoomApprovalRejectionToastHeading =
|
|
412
|
+
'waitingRoomApprovalRejectionToastHeading';
|
|
413
|
+
export const waitingRoomApprovalRejectionToastSubHeading =
|
|
414
|
+
'waitingRoomApprovalRejectionToastSubHeading';
|
|
415
|
+
|
|
382
416
|
export const videoRoomRecordingText = `video${room}RecordingText`;
|
|
383
417
|
export const videoRoomGoToActiveSpeakerText = `video${room}GoToActiveSpeakerText`;
|
|
384
418
|
export const videoRoomScreenshareText = `video${room}ScreenshareText`;
|
|
@@ -416,6 +450,10 @@ export const peoplePanelLivestreamingDenyBtnText =
|
|
|
416
450
|
export const sttTranscriptPanelSearchText = `${stt}TranscriptPanelSearchText`;
|
|
417
451
|
export const sttTranscriptPanelNoSearchResultsFoundText = `${stt}TranscriptPanelNoSearchResultsFoundText`;
|
|
418
452
|
export const sttTranscriptPanelViewLatestText = `${stt}TranscriptPanelViewLatestText`;
|
|
453
|
+
|
|
454
|
+
export const videoRoomPeopleCountTooltipHostText = `video${room}PeopleCountTooltipHostText`;
|
|
455
|
+
export const videoRoomPeopleCountTooltipAttendeeText = `video${room}PeopleCountTooltipAttendeeText`;
|
|
456
|
+
|
|
419
457
|
export interface I18nVideoCallScreenLabelsInterface {
|
|
420
458
|
[toolbarItemPeopleText]?: I18nBaseType;
|
|
421
459
|
[toolbarItemChatText]?: I18nBaseType;
|
|
@@ -440,7 +478,7 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
440
478
|
[toolbarItemWhiteboardText]?: I18nConditionalType;
|
|
441
479
|
[toolbarItemCaptionText]?: I18nConditionalType;
|
|
442
480
|
[toolbarItemTranscriptText]?: I18nConditionalType;
|
|
443
|
-
[
|
|
481
|
+
[toolbarItemVirtualBackgroundText]?: I18nBaseType;
|
|
444
482
|
|
|
445
483
|
[toolbarItemRaiseHandText]?: I18nConditionalType;
|
|
446
484
|
|
|
@@ -485,12 +523,12 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
485
523
|
[leavePopupSubHeading]?: I18nConditionalType;
|
|
486
524
|
[leavePopupPrimaryBtnText]?: I18nBaseType;
|
|
487
525
|
|
|
488
|
-
[
|
|
489
|
-
[
|
|
490
|
-
[
|
|
526
|
+
[removeUserFromRoomPopupHeading]?: I18nDynamicType;
|
|
527
|
+
[removeUserFromRoomPopupSubHeading]?: I18nDynamicType;
|
|
528
|
+
[removeUserFromRoomPopupPrimaryBtnText]?: I18nBaseType;
|
|
491
529
|
|
|
492
530
|
[removeScreenshareFromRoomPopupHeading]?: I18nBaseType;
|
|
493
|
-
[removeScreenshareFromRoomPopupSubHeading]?:
|
|
531
|
+
[removeScreenshareFromRoomPopupSubHeading]?: I18nDynamicType;
|
|
494
532
|
[removeScreenshareFromRoomPopupPrimaryBtnText]?: I18nBaseType;
|
|
495
533
|
|
|
496
534
|
[sttChangeLanguagePopupHeading]?: I18nConditionalType;
|
|
@@ -568,20 +606,13 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
568
606
|
|
|
569
607
|
[publicChatToastHeading]?: I18nBaseType;
|
|
570
608
|
[multiplePublicChatToastHeading]?: I18nBaseType;
|
|
571
|
-
[multiplePublicChatToastSubHeading]?: I18nBaseType<
|
|
572
|
-
count: number;
|
|
573
|
-
from: string;
|
|
574
|
-
}>;
|
|
609
|
+
[multiplePublicChatToastSubHeading]?: I18nBaseType<publicChatToastSubHeadingDataInterface>;
|
|
575
610
|
|
|
576
611
|
[privateChatToastHeading]?: I18nBaseType;
|
|
577
|
-
[multiplePrivateChatToastHeading]?: I18nBaseType<
|
|
612
|
+
[multiplePrivateChatToastHeading]?: I18nBaseType<privateChatToastHeadingDataInterface>;
|
|
578
613
|
|
|
579
614
|
[multiplePublicAndPrivateChatToastHeading]?: I18nBaseType;
|
|
580
|
-
[multiplePublicAndPrivateChatToastSubHeading]?: I18nBaseType<
|
|
581
|
-
publicChatCount: number;
|
|
582
|
-
privateChatCount: number;
|
|
583
|
-
from: string;
|
|
584
|
-
}>;
|
|
615
|
+
[multiplePublicAndPrivateChatToastSubHeading]?: I18nBaseType<publicAndPrivateChatToastSubHeadingDataInterface>;
|
|
585
616
|
|
|
586
617
|
[livestreamToastApprovalBtnText]?: I18nBaseType;
|
|
587
618
|
[livestreamToastDenyBtnText]?: I18nBaseType;
|
|
@@ -610,7 +641,7 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
610
641
|
|
|
611
642
|
[peoplePanelMeText]?: I18nBaseType;
|
|
612
643
|
[peoplePanelPresenterText]?: I18nBaseType;
|
|
613
|
-
[userRemovedFromTheRoomToastHeading]?:
|
|
644
|
+
[userRemovedFromTheRoomToastHeading]?: I18nDynamicType;
|
|
614
645
|
|
|
615
646
|
[vbPanelImageUploadErrorToastHeading]?: I18nBaseType;
|
|
616
647
|
[vbPanelImageUploadErrorToastSubHeading]?: I18nBaseType;
|
|
@@ -644,28 +675,18 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
644
675
|
[whiteboardToolboxUploadText]?: I18nBaseType;
|
|
645
676
|
[whiteboardToolboxClearAllText]?: I18nBaseType;
|
|
646
677
|
|
|
647
|
-
[whiteboardFileUploadErrorToastHeading]?: I18nBaseType<
|
|
648
|
-
[whiteboardFileUploadInfoToastHeading]?: I18nBaseType<
|
|
649
|
-
[whiteboardFileUploadTypeErrorToastHeading]?: I18nBaseType<
|
|
650
|
-
[whiteboardFileUploadTypeErrorToastSubHeading]?: I18nBaseType<
|
|
651
|
-
|
|
652
|
-
>;
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
[
|
|
656
|
-
|
|
657
|
-
newLanguage: string;
|
|
658
|
-
oldLanguage: string;
|
|
659
|
-
username: string;
|
|
660
|
-
}>;
|
|
661
|
-
|
|
662
|
-
[deviceDetectionToastHeading]?: I18nBaseType<string>;
|
|
663
|
-
[deviceDetectionToastSubHeading]?: I18nBaseType<{
|
|
664
|
-
name: string;
|
|
665
|
-
label: string;
|
|
666
|
-
}>;
|
|
678
|
+
[whiteboardFileUploadErrorToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
679
|
+
[whiteboardFileUploadInfoToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
680
|
+
[whiteboardFileUploadTypeErrorToastHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
681
|
+
[whiteboardFileUploadTypeErrorToastSubHeading]?: I18nBaseType<whiteboardFileUploadToastDataType>;
|
|
682
|
+
|
|
683
|
+
[sttSpokenLanguageToastHeading]?: I18nBaseType<sttSpokenLanguageToastHeadingDataType>;
|
|
684
|
+
[sttSpokenLanguageToastSubHeading]?: I18nBaseType<sttSpokenLanguageToastSubHeadingDataInterface>;
|
|
685
|
+
|
|
686
|
+
[deviceDetectionToastHeading]?: I18nDynamicType;
|
|
687
|
+
[deviceDetectionToastSubHeading]?: I18nBaseType<deviceDetectionToastSubHeadingDataInterface>;
|
|
667
688
|
[deviceDetectionPrimaryBtnText]?: I18nBaseType;
|
|
668
|
-
[
|
|
689
|
+
[deviceDetectionSecondaryBtnText]?: I18nBaseType;
|
|
669
690
|
[deviceDetectionCheckboxText]?: I18nBaseType;
|
|
670
691
|
|
|
671
692
|
[hostMutedUserToastHeading]?: I18nBaseType<I18nMuteType>;
|
|
@@ -679,6 +700,9 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
679
700
|
[waitingRoomApprovalRequiredPrimaryBtnText]?: I18nBaseType;
|
|
680
701
|
[waitingRoomApprovalRequiredSecondaryBtnText]?: I18nBaseType;
|
|
681
702
|
|
|
703
|
+
[waitingRoomApprovalRejectionToastHeading]?: I18nBaseType;
|
|
704
|
+
[waitingRoomApprovalRejectionToastSubHeading]?: I18nBaseType;
|
|
705
|
+
|
|
682
706
|
[videoRoomRecordingText]?: I18nBaseType;
|
|
683
707
|
[videoRoomGoToActiveSpeakerText]?: I18nBaseType;
|
|
684
708
|
[videoRoomScreenshareText]?: I18nDynamicType;
|
|
@@ -708,6 +732,9 @@ export interface I18nVideoCallScreenLabelsInterface {
|
|
|
708
732
|
[sttTranscriptPanelSearchText]?: I18nBaseType;
|
|
709
733
|
[sttTranscriptPanelNoSearchResultsFoundText]?: I18nBaseType;
|
|
710
734
|
[sttTranscriptPanelViewLatestText]?: I18nBaseType;
|
|
735
|
+
|
|
736
|
+
[videoRoomPeopleCountTooltipHostText]?: I18nBaseType;
|
|
737
|
+
[videoRoomPeopleCountTooltipAttendeeText]?: I18nBaseType;
|
|
711
738
|
}
|
|
712
739
|
|
|
713
740
|
export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
@@ -771,7 +798,7 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
|
771
798
|
[toolbarItemMoreText]: 'More',
|
|
772
799
|
|
|
773
800
|
[toolbarItemNoiseCancellationText]: 'Noise Cancellation',
|
|
774
|
-
[
|
|
801
|
+
[toolbarItemVirtualBackgroundText]: 'Virtual Background',
|
|
775
802
|
[toolbarItemWhiteboardText]: active =>
|
|
776
803
|
active ? 'Hide Whiteboard' : 'Show Whiteboard',
|
|
777
804
|
[toolbarItemCaptionText]: active =>
|
|
@@ -848,10 +875,10 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
|
848
875
|
: 'Are you sure you want to leave this meeting?',
|
|
849
876
|
[leavePopupPrimaryBtnText]: 'LEAVE',
|
|
850
877
|
|
|
851
|
-
[
|
|
852
|
-
[
|
|
878
|
+
[removeUserFromRoomPopupHeading]: name => `Remove ${name}?`,
|
|
879
|
+
[removeUserFromRoomPopupSubHeading]: name =>
|
|
853
880
|
`Once removed, ${name} will still be able to rejoin the room later.`,
|
|
854
|
-
[
|
|
881
|
+
[removeUserFromRoomPopupPrimaryBtnText]: 'REMOVE',
|
|
855
882
|
|
|
856
883
|
[removeScreenshareFromRoomPopupHeading]: 'Remove Screenshare?',
|
|
857
884
|
[removeScreenshareFromRoomPopupSubHeading]: name =>
|
|
@@ -1069,7 +1096,7 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
|
1069
1096
|
[deviceDetectionToastSubHeading]: ({name, label}) =>
|
|
1070
1097
|
`New ${name} named ${label} detected. Do you want to switch?`,
|
|
1071
1098
|
[deviceDetectionPrimaryBtnText]: 'SWITCH DEVICE',
|
|
1072
|
-
[
|
|
1099
|
+
[deviceDetectionSecondaryBtnText]: 'IGNORE',
|
|
1073
1100
|
[deviceDetectionCheckboxText]: 'Remember my choice',
|
|
1074
1101
|
|
|
1075
1102
|
[hostMutedUserToastHeading]: type =>
|
|
@@ -1090,6 +1117,10 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
|
1090
1117
|
[waitingRoomApprovalRequiredPrimaryBtnText]: 'Admit',
|
|
1091
1118
|
[waitingRoomApprovalRequiredSecondaryBtnText]: 'Deny',
|
|
1092
1119
|
|
|
1120
|
+
[waitingRoomApprovalRejectionToastHeading]: 'Approval Required',
|
|
1121
|
+
[waitingRoomApprovalRejectionToastSubHeading]:
|
|
1122
|
+
'Permission to enter the meeting was denied by the host',
|
|
1123
|
+
|
|
1093
1124
|
[videoRoomRecordingText]: 'Recording',
|
|
1094
1125
|
[videoRoomGoToActiveSpeakerText]: 'Go To Active Speaker',
|
|
1095
1126
|
[videoRoomScreenshareText]: username => `${username}'s screenshare`,
|
|
@@ -1131,4 +1162,8 @@ export const VideoCallScreenLabels: I18nVideoCallScreenLabelsInterface = {
|
|
|
1131
1162
|
[sttTranscriptPanelSearchText]: 'Search',
|
|
1132
1163
|
[sttTranscriptPanelNoSearchResultsFoundText]: 'No search results found',
|
|
1133
1164
|
[sttTranscriptPanelViewLatestText]: 'View Latest',
|
|
1165
|
+
|
|
1166
|
+
[videoRoomPeopleCountTooltipHostText]: 'Host',
|
|
1167
|
+
[videoRoomPeopleCountTooltipAttendeeText]: ({eventMode}) =>
|
|
1168
|
+
eventMode ? 'Audience' : 'Attendee',
|
|
1134
1169
|
};
|
|
@@ -8,9 +8,9 @@ import ThemeConfig from '../theme';
|
|
|
8
8
|
import {useIsDesktop} from '../utils/common';
|
|
9
9
|
import {useString} from '../utils/useString';
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
removeUserFromRoomPopupHeading,
|
|
12
|
+
removeUserFromRoomPopupPrimaryBtnText,
|
|
13
|
+
removeUserFromRoomPopupSubHeading,
|
|
14
14
|
} from '../language/default-labels/videoCallScreenLabels';
|
|
15
15
|
import {cancelText} from '../language/default-labels/commonLabels';
|
|
16
16
|
|
|
@@ -22,11 +22,13 @@ interface RemoveMeetingPopupProps {
|
|
|
22
22
|
}
|
|
23
23
|
const RemoveMeetingPopup = (props: RemoveMeetingPopupProps) => {
|
|
24
24
|
const isDesktop = useIsDesktop()('popup');
|
|
25
|
-
const removeMeetingLabelHeading = useString(
|
|
26
|
-
const removeMeetingLabelSubHeading = useString(
|
|
25
|
+
const removeMeetingLabelHeading = useString(removeUserFromRoomPopupHeading);
|
|
26
|
+
const removeMeetingLabelSubHeading = useString(
|
|
27
|
+
removeUserFromRoomPopupSubHeading,
|
|
28
|
+
);
|
|
27
29
|
|
|
28
30
|
const cancelBtnLabel = useString(cancelText)();
|
|
29
|
-
const removeBtnLabel = useString(
|
|
31
|
+
const removeBtnLabel = useString(removeUserFromRoomPopupPrimaryBtnText)();
|
|
30
32
|
return (
|
|
31
33
|
<Popup
|
|
32
34
|
modalVisible={props.modalVisible}
|
|
@@ -13,6 +13,7 @@ import {useCustomization} from 'customization-implementation';
|
|
|
13
13
|
import {useLanguage} from '../language/useLanguage';
|
|
14
14
|
import {DEFAULT_I18_DATA} from '../language';
|
|
15
15
|
import {TextDataInterface} from '../language/default-labels/index';
|
|
16
|
+
import {useEffect, useRef} from 'react';
|
|
16
17
|
|
|
17
18
|
export function usei18nData(
|
|
18
19
|
selectedLanguageCode: string = DEFAULT_I18_DATA.locale,
|
|
@@ -59,3 +60,12 @@ export function useString<T = string>(
|
|
|
59
60
|
};
|
|
60
61
|
return getString;
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
export const useStringRef = (key: keyof TextDataInterface) => {
|
|
65
|
+
const fn = useString(key);
|
|
66
|
+
const refFn = useRef(fn);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
refFn.current = fn;
|
|
69
|
+
}, [fn]);
|
|
70
|
+
return refFn;
|
|
71
|
+
};
|