agora-appbuilder-core 2.3.0-beta.2 → 2.3.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +11 -6
- package/package.json +2 -2
- package/template/Gulpfile.js +112 -13
- package/template/_package-lock.json +13011 -13288
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +2 -0
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +4 -5
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +3 -1
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +3 -1
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +64 -33
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +11 -2
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +23 -4
- package/template/agora-rn-uikit/src/Utils/permission.ts +17 -6
- package/template/bridge/rtc/webNg/RtcEngine.ts +51 -26
- package/template/esbuild.rsdk.go +20 -6
- package/template/fpe-api/components.ts +15 -0
- package/template/fpe-api/context.ts +2 -3
- package/template/fpe-api/install.ts +19 -9
- package/template/fpe-api/typeDefinition.ts +7 -6
- package/template/fpe-api/utils.ts +32 -25
- package/template/global.d.ts +3 -2
- package/template/index.rsdk.tsx +15 -4
- package/template/index.wsdk.tsx +13 -3
- package/template/package.json +4 -2
- package/template/react-native-toast-message/src/index.js +3 -7
- package/template/react-native-toast-message/src/{index.wsdk.js → index.sdk.tsx} +1 -1
- package/template/react-native-toast-message/src/styles.sdk.ts +17 -0
- package/template/src/SDKAppWrapper.tsx +1 -1
- package/template/src/components/Chat.tsx +23 -5
- package/template/src/components/ChatContext.ts +15 -4
- package/template/src/components/Controls.native.tsx +10 -6
- package/template/src/components/Controls.tsx +6 -4
- package/template/src/components/HostControlView.tsx +5 -3
- package/template/src/components/Navbar.tsx +15 -13
- package/template/src/components/RTMConfigure.tsx +20 -50
- package/template/src/components/chat-messages/useChatMessages.tsx +369 -70
- package/template/src/components/contexts/LiveStreamDataContext.tsx +3 -3
- package/template/src/components/contexts/ScreenShareContext.tsx +2 -0
- package/template/src/components/livestream/LiveStreamContext.tsx +9 -6
- package/template/src/components/participants/MeParticipant.tsx +5 -3
- package/template/src/components/participants/RemoteParticipants.tsx +9 -7
- package/template/src/components/precall/LocalMute.native.tsx +12 -8
- package/template/src/components/precall/LocalMute.tsx +5 -3
- package/template/src/components/precall/textInput.tsx +1 -1
- package/template/src/components/useShareLink.tsx +37 -39
- package/template/src/components/useUserPreference.tsx +125 -0
- package/template/src/custom-events/CustomEvents.ts +39 -23
- package/template/src/custom-events/types.ts +3 -3
- package/template/src/language/default-labels/videoCallScreenLabels.ts +4 -2
- package/template/src/pages/Create.tsx +10 -3
- package/template/src/pages/Join.tsx +4 -1
- package/template/src/pages/VideoCall.tsx +61 -56
- package/template/src/pages/video-call/CustomUserContextHolder.tsx +13 -5
- package/template/src/pages/video-call/VideoCallScreen.tsx +18 -15
- package/template/src/rtm/RTMEngine.ts +13 -0
- package/template/src/rtm/utils.ts +1 -1
- package/template/src/rtm-events/EventUtils.ts +3 -0
- package/template/src/rtm-events/EventsQueue.ts +9 -3
- package/template/src/rtm-events/constants.ts +3 -1
- package/template/src/subComponents/ChatBubble.tsx +22 -4
- package/template/src/subComponents/ChatContainer.tsx +30 -19
- package/template/src/subComponents/ChatInput.tsx +38 -26
- package/template/src/subComponents/SelectDevice.tsx +1 -1
- package/template/src/subComponents/recording/useRecording.tsx +15 -4
- package/template/src/subComponents/recording/useRecordingLayoutQuery.tsx +11 -5
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +35 -26
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +83 -33
- package/template/src/utils/SdkEvents.ts +3 -3
- package/template/src/utils/getMeetingInvite.ts +38 -15
- package/template/src/utils/getUniqueID.ts +5 -0
- package/template/src/utils/useDeleteMessage.ts +36 -0
- package/template/src/utils/useEditMessage.ts +41 -0
- package/template/src/utils/useGetName.ts +2 -3
- package/template/src/utils/useJoinMeeting.ts +22 -14
- package/template/src/utils/useLocalShareScreenUid.ts +19 -0
- package/template/src/utils/useSendMessage.ts +4 -5
- package/template/src/utils/useSetName.ts +2 -4
- package/template/webpack.rsdk.config.js +3 -2
- package/template/webpack.wsdk.config.js +0 -1
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
} from '../agora-rn-uikit';
|
|
20
20
|
import {i18nInterface} from '../src/language/i18nTypes';
|
|
21
21
|
import {IconsInterface} from '../agora-rn-uikit/src/Controls/Icons';
|
|
22
|
+
export type {RenderInterface, RenderStateInterface, UidType};
|
|
22
23
|
export type {
|
|
23
24
|
ChatTextInputProps,
|
|
24
25
|
ChatSendButtonProps,
|
|
@@ -45,7 +46,9 @@ export interface PreCallInterface extends BeforeAndAfterInterface {
|
|
|
45
46
|
joinButton?: React.ComponentType;
|
|
46
47
|
textBox?: React.ComponentType;
|
|
47
48
|
}
|
|
48
|
-
export interface ChatCmpInterface
|
|
49
|
+
export interface ChatCmpInterface {
|
|
50
|
+
//commented for v1 release
|
|
51
|
+
//extends BeforeAndAfterInterface
|
|
49
52
|
chatBubble?: React.ComponentType<ChatBubbleProps>;
|
|
50
53
|
chatInput?: React.ComponentType<ChatTextInputProps>;
|
|
51
54
|
chatSentButton?: React.ComponentType<ChatSendButtonProps>;
|
|
@@ -81,14 +84,14 @@ export type layoutObjectType = layoutObjectWithIcon | layoutObjectWithIconName;
|
|
|
81
84
|
|
|
82
85
|
export interface VideoCallInterface extends BeforeAndAfterInterface {
|
|
83
86
|
// commented for v1 release
|
|
84
|
-
|
|
87
|
+
topBar?: React.ComponentType;
|
|
85
88
|
//settingsPanel?: React.ComponentType;
|
|
86
89
|
participantsPanel?: React.ComponentType;
|
|
87
90
|
bottomBar?: React.ComponentType;
|
|
88
|
-
|
|
89
|
-
//chat?: ChatCmpInterface;
|
|
91
|
+
chat?: ChatCmpInterface;
|
|
90
92
|
customContent?: renderComponentObjectInterface;
|
|
91
93
|
customLayout?: (layouts: layoutObjectType[]) => layoutObjectType[];
|
|
94
|
+
useUserContext?: () => void;
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
export type ComponentsInterface = {
|
|
@@ -138,6 +141,4 @@ export interface FpeApiInterface {
|
|
|
138
141
|
// useBeforeJoin?: CustomHookType;
|
|
139
142
|
// useBeforeCreate?: CustomHookType;
|
|
140
143
|
// };
|
|
141
|
-
// commented for v1 release
|
|
142
|
-
//customUserContext?: () => any;
|
|
143
144
|
}
|
|
@@ -15,38 +15,36 @@ export {default as useIsHost} from '../src/utils/isHostUser';
|
|
|
15
15
|
export {default as useIsAttendee} from '../src/utils/IsAttendeeUser';
|
|
16
16
|
export {default as useIsPSTN} from '../src/utils/isPSTNUser';
|
|
17
17
|
export {default as useUserList} from '../src/utils/useUserList';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//export {default as usePrivateMessages} from '../src/utils/usePrivateMessages';
|
|
18
|
+
export {default as useGroupMessages} from '../src/utils/useGroupMessages';
|
|
19
|
+
export {default as usePrivateMessages} from '../src/utils/usePrivateMessages';
|
|
21
20
|
export {default as useIsAudioEnabled} from '../src/utils/isAudioEnabled';
|
|
22
21
|
export {default as useIsVideoEnabled} from '../src/utils/isVideoEnabled';
|
|
23
22
|
export {default as useSetName} from '../src/utils/useSetName';
|
|
24
23
|
export {default as useGetName} from '../src/utils/useGetName';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// SET_UNREAD_MESSAGE_COUNT_TYPE,
|
|
35
|
-
// } from '../src/utils/useSetUnreadMessageCount';
|
|
24
|
+
export {useSidePanel} from '../src/utils/useSidePanel';
|
|
25
|
+
export {
|
|
26
|
+
default as useUnreadMessageCount,
|
|
27
|
+
UNREAD_MESSAGE_COUNT_TYPE,
|
|
28
|
+
} from '../src/utils/useUnreadMessageCount';
|
|
29
|
+
export {
|
|
30
|
+
default as useSetUnreadMessageCount,
|
|
31
|
+
SET_UNREAD_MESSAGE_COUNT_TYPE,
|
|
32
|
+
} from '../src/utils/useSetUnreadMessageCount';
|
|
36
33
|
export {default as useNavigateTo} from '../src/utils/useNavigateTo';
|
|
37
34
|
export {default as useNavParams} from '../src/utils/useNavParams';
|
|
38
35
|
export {default as useCreateMeeting} from '../src/utils/useCreateMeeting';
|
|
39
36
|
export {default as useJoinMeeting} from '../src/utils/useJoinMeeting';
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
export {
|
|
38
|
+
default as useSendMessage,
|
|
39
|
+
MESSAGE_TYPE,
|
|
40
|
+
} from '../src/utils/useSendMessage';
|
|
41
|
+
export {default as useEditMessage} from '../src/utils/useEditMessage';
|
|
42
|
+
export {default as useDeleteMessage} from '../src/utils/useDeleteMessage';
|
|
43
|
+
export {controlMessageEnum} from '../src/components/ChatContext';
|
|
44
|
+
export {
|
|
45
|
+
default as useSendControlMessage,
|
|
46
|
+
CONTROL_MESSAGE_TYPE,
|
|
47
|
+
} from '../src/utils/useSendControlMessage';
|
|
50
48
|
export {
|
|
51
49
|
MUTE_LOCAL_TYPE,
|
|
52
50
|
default as useMuteToggleLocal,
|
|
@@ -59,4 +57,13 @@ export {
|
|
|
59
57
|
export {ToggleState} from '../agora-rn-uikit/src/Contexts/PropsContext';
|
|
60
58
|
|
|
61
59
|
//export common function
|
|
62
|
-
export
|
|
60
|
+
export {
|
|
61
|
+
hasBrandLogo,
|
|
62
|
+
isAndroid,
|
|
63
|
+
isArray,
|
|
64
|
+
isIOS,
|
|
65
|
+
isValidReactComponent,
|
|
66
|
+
isWeb,
|
|
67
|
+
shouldAuthenticate,
|
|
68
|
+
} from '../src/utils/common';
|
|
69
|
+
export {useLocalUid} from '../agora-rn-uikit';
|
package/template/global.d.ts
CHANGED
|
@@ -75,9 +75,10 @@ interface ConfigInterface {
|
|
|
75
75
|
RAISE_HAND: boolean;
|
|
76
76
|
GEO_FENCING: boolean;
|
|
77
77
|
LOG_ENABLED: boolean;
|
|
78
|
+
AUDIO_ROOM: boolean;
|
|
78
79
|
}
|
|
79
80
|
declare var $config: ConfigInterface;
|
|
80
|
-
declare module 'test-fpe'{
|
|
81
|
-
const data:{}
|
|
81
|
+
declare module 'test-fpe' {
|
|
82
|
+
const data: {};
|
|
82
83
|
export default data;
|
|
83
84
|
}
|
package/template/index.rsdk.tsx
CHANGED
|
@@ -12,16 +12,27 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* @format
|
|
14
14
|
*/
|
|
15
|
-
import SDKAppWrapper,{
|
|
15
|
+
import SDKAppWrapper, {
|
|
16
|
+
AppBuilderSdkApi,
|
|
17
|
+
AppBuilderSdkApiInterface,
|
|
18
|
+
} from './src/SDKAppWrapper';
|
|
16
19
|
import React from 'react';
|
|
20
|
+
import * as RN from 'react-native-web';
|
|
21
|
+
import jsonFile from './config.json';
|
|
22
|
+
|
|
17
23
|
export * from 'fpe-api';
|
|
24
|
+
export * from 'fpe-implementation';
|
|
18
25
|
|
|
19
26
|
interface AppBuilderReactSdkInterface extends AppBuilderSdkApiInterface {
|
|
20
27
|
View: React.FC;
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
const AppBuilderReactSdkApi: AppBuilderReactSdkInterface = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
31
|
+
...AppBuilderSdkApi,
|
|
32
|
+
View: SDKAppWrapper,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
let config: ConfigInterface = jsonFile as unknown as ConfigInterface;
|
|
36
|
+
|
|
37
|
+
export {React, RN, config};
|
|
27
38
|
export default AppBuilderReactSdkApi;
|
package/template/index.wsdk.tsx
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import {AppRegistry} from 'react-native';
|
|
2
|
-
import SDKAppWrapper,{
|
|
2
|
+
import SDKAppWrapper, {
|
|
3
|
+
AppBuilderSdkApi,
|
|
4
|
+
AppBuilderSdkApiInterface,
|
|
5
|
+
} from './src/SDKAppWrapper';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import * as RN from 'react-native-web';
|
|
8
|
+
import jsonFile from './config.json';
|
|
9
|
+
|
|
3
10
|
export * from 'fpe-api';
|
|
11
|
+
export * from 'fpe-implementation';
|
|
4
12
|
|
|
5
|
-
interface AppBuilderWebSdkInterface extends AppBuilderSdkApiInterface {
|
|
6
|
-
}
|
|
13
|
+
interface AppBuilderWebSdkInterface extends AppBuilderSdkApiInterface {}
|
|
7
14
|
|
|
8
15
|
const AppBuilderWebSdkApi: AppBuilderWebSdkInterface = AppBuilderSdkApi;
|
|
9
16
|
|
|
@@ -24,4 +31,7 @@ class AppBuilder extends HTMLElement {
|
|
|
24
31
|
|
|
25
32
|
customElements.define('app-builder', AppBuilder);
|
|
26
33
|
|
|
34
|
+
let config: ConfigInterface = jsonFile as unknown as ConfigInterface;
|
|
35
|
+
|
|
36
|
+
export {React, RN, config};
|
|
27
37
|
export default AppBuilderWebSdkApi;
|
package/template/package.json
CHANGED
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"web-sdk:build": "cross-env TARGET=wsdk NODE_ENV=production gulp webSdk",
|
|
19
19
|
"react-sdk": "cross-env TARGET=rsdk NODE_ENV=development gulp reactSdk",
|
|
20
20
|
"react-sdk:build": "cross-env TARGET=rsdk NODE_ENV=production gulp reactSdk",
|
|
21
|
-
"react-sdk-esbuild": "cross-env TARGET=rsdk NODE_ENV=production gulp reactSdkEsbuild",
|
|
22
21
|
"electron:start": "cross-env NODE_ENV=development gulp electron_development",
|
|
23
22
|
"electron:build": "cross-env NODE_ENV=production gulp electron_build",
|
|
24
23
|
"windows": "cross-env TARGET=windows npm run electron:start",
|
|
@@ -32,7 +31,9 @@
|
|
|
32
31
|
"icons:android": "react-native set-icon --path ./build/icon.png",
|
|
33
32
|
"icons:ios": "react-native set-icon --path ./build/icon.png",
|
|
34
33
|
"package:mac": "npm run mac:build && electron-builder --publish=always",
|
|
35
|
-
"release": "electron-builder --mac --windows --linux --publish always --config ./electron-builder.js "
|
|
34
|
+
"release": "electron-builder --mac --windows --linux --publish always --config ./electron-builder.js ",
|
|
35
|
+
"make-rsdk-ts-defs": "cross-env TARGET=rsdk NODE_ENV=production gulp makeRsdkTsDefs",
|
|
36
|
+
"make-wsdk-ts-defs": "cross-env TARGET=wsdk NODE_ENV=production gulp makeWsdkTsDefs"
|
|
36
37
|
},
|
|
37
38
|
"publish": [
|
|
38
39
|
{
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"electron-updater": "4.3.9",
|
|
62
63
|
"exponential-backoff": "3.1.0",
|
|
63
64
|
"graphql": "15.5.0",
|
|
65
|
+
"nanoid": "4.0.0",
|
|
64
66
|
"nosleep.js": "0.12.0",
|
|
65
67
|
"react": "16.13.1",
|
|
66
68
|
"react-dom": "16.13.1",
|
|
@@ -353,14 +353,14 @@ class Toast extends Component {
|
|
|
353
353
|
|
|
354
354
|
const translateY = animation.interpolate({
|
|
355
355
|
inputRange: [0, 1, 2],
|
|
356
|
-
outputRange
|
|
356
|
+
outputRange
|
|
357
357
|
});
|
|
358
358
|
|
|
359
359
|
return [
|
|
360
360
|
styles.base,
|
|
361
361
|
styles[position],
|
|
362
362
|
{
|
|
363
|
-
|
|
363
|
+
transform: [{ translateY }]
|
|
364
364
|
}
|
|
365
365
|
];
|
|
366
366
|
}
|
|
@@ -378,11 +378,7 @@ class Toast extends Component {
|
|
|
378
378
|
<Animated.View
|
|
379
379
|
testID='animatedView'
|
|
380
380
|
onLayout={this.onLayout}
|
|
381
|
-
style={[
|
|
382
|
-
baseStyle,
|
|
383
|
-
style,
|
|
384
|
-
{ zIndex: 100, display: this.state.isVisible || this.state.inProgress ? 'flex' : 'none' }
|
|
385
|
-
]} //added zindex
|
|
381
|
+
style={[baseStyle, style, { zIndex: 100 }]} //added zindex
|
|
386
382
|
{...this.panResponder.panHandlers}>
|
|
387
383
|
{this.renderContent(this.props)}
|
|
388
384
|
</Animated.View>
|
|
@@ -381,7 +381,7 @@ class Toast extends Component {
|
|
|
381
381
|
style={[
|
|
382
382
|
baseStyle,
|
|
383
383
|
style,
|
|
384
|
-
{ zIndex: 100, display: this.state.isVisible ? 'flex' : 'none'
|
|
384
|
+
{ zIndex: 100, display: this.state.isVisible ? 'flex' : 'none' }
|
|
385
385
|
]} //added zindex
|
|
386
386
|
{...this.panResponder.panHandlers}>
|
|
387
387
|
{this.renderContent(this.props)}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export default StyleSheet.create({
|
|
4
|
+
base: {
|
|
5
|
+
position: 'absolute',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
justifyContent: 'center',
|
|
8
|
+
left: 0,
|
|
9
|
+
right: 0
|
|
10
|
+
},
|
|
11
|
+
top: {
|
|
12
|
+
top: 30
|
|
13
|
+
},
|
|
14
|
+
bottom: {
|
|
15
|
+
bottom: 0
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -50,7 +50,7 @@ const SDKAppWrapper = () => {
|
|
|
50
50
|
const [fpe, setFpe] = useState(fpeConfig);
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
SDKEvents.on('addFpe', (sdkFpeConfig) => {
|
|
53
|
-
console.log('
|
|
53
|
+
console.log('SDKEvents: addFpe event called');
|
|
54
54
|
setFpe(sdkFpeConfig);
|
|
55
55
|
});
|
|
56
56
|
// Join event consumed in Create.tsx
|
|
@@ -27,8 +27,17 @@ import {isIOS, isValidReactComponent, isWeb} from '../utils/common';
|
|
|
27
27
|
import {useChatUIControl} from './chat-ui/useChatUIControl';
|
|
28
28
|
import {useFpe} from 'fpe-api';
|
|
29
29
|
import {UidType} from '../../agora-rn-uikit';
|
|
30
|
+
import {ChatBubbleProps} from './ChatContext';
|
|
31
|
+
import {
|
|
32
|
+
ChatTextInputProps,
|
|
33
|
+
ChatSendButtonProps,
|
|
34
|
+
} from '../subComponents/ChatInput';
|
|
30
35
|
|
|
31
|
-
const Chat = (
|
|
36
|
+
const Chat = (props?: {
|
|
37
|
+
chatBubble?: React.ComponentType<ChatBubbleProps>;
|
|
38
|
+
chatInput?: React.ComponentType<ChatTextInputProps>;
|
|
39
|
+
chatSendButton?: React.ComponentType<ChatSendButtonProps>;
|
|
40
|
+
}) => {
|
|
32
41
|
// commented for v1 release
|
|
33
42
|
// const groupChatLabel = useString('groupChatLabel')();
|
|
34
43
|
// const privateChatLabel = useString('privateChatLabel')();
|
|
@@ -59,6 +68,15 @@ const Chat = () => {
|
|
|
59
68
|
|
|
60
69
|
const {primaryColor} = useContext(ColorContext);
|
|
61
70
|
|
|
71
|
+
React.useEffect(() => {
|
|
72
|
+
return () => {
|
|
73
|
+
// reset both the active tabs
|
|
74
|
+
setGroupActive(false);
|
|
75
|
+
setPrivateActive(false);
|
|
76
|
+
setSelectedUser(0);
|
|
77
|
+
};
|
|
78
|
+
}, []);
|
|
79
|
+
|
|
62
80
|
const selectGroup = () => {
|
|
63
81
|
setPrivateActive(false);
|
|
64
82
|
setGroupActive(true);
|
|
@@ -181,12 +199,12 @@ const Chat = () => {
|
|
|
181
199
|
</View>
|
|
182
200
|
{groupActive ? (
|
|
183
201
|
<>
|
|
184
|
-
<ChatContainer
|
|
202
|
+
<ChatContainer {...props} />
|
|
185
203
|
<View style={[style.chatInputLineSeparator, {marginBottom: 0}]} />
|
|
186
204
|
<View>
|
|
187
205
|
<View style={style.chatInputContainer}>
|
|
188
206
|
<View style={[style.chatInputLineSeparator, {opacity: 0.3}]} />
|
|
189
|
-
<ChatInput />
|
|
207
|
+
<ChatInput {...props} />
|
|
190
208
|
</View>
|
|
191
209
|
</View>
|
|
192
210
|
</>
|
|
@@ -196,7 +214,7 @@ const Chat = () => {
|
|
|
196
214
|
<ChatParticipants selectUser={selectUser} />
|
|
197
215
|
) : (
|
|
198
216
|
<>
|
|
199
|
-
<ChatContainer
|
|
217
|
+
<ChatContainer {...props} />
|
|
200
218
|
<View
|
|
201
219
|
style={[style.chatInputLineSeparator, {marginBottom: 0}]}
|
|
202
220
|
/>
|
|
@@ -205,7 +223,7 @@ const Chat = () => {
|
|
|
205
223
|
<View
|
|
206
224
|
style={[style.chatInputLineSeparator, {opacity: 0.3}]}
|
|
207
225
|
/>
|
|
208
|
-
<ChatInput />
|
|
226
|
+
<ChatInput {...props} />
|
|
209
227
|
</View>
|
|
210
228
|
</View>
|
|
211
229
|
</>
|
|
@@ -16,12 +16,25 @@ import {createContext, SetStateAction} from 'react';
|
|
|
16
16
|
export interface ChatBubbleProps {
|
|
17
17
|
isLocal: boolean;
|
|
18
18
|
message: string;
|
|
19
|
-
|
|
19
|
+
createdTimestamp: string;
|
|
20
|
+
updatedTimestamp?: string;
|
|
20
21
|
uid: UidType;
|
|
22
|
+
msgId: string;
|
|
23
|
+
isDeleted: boolean;
|
|
24
|
+
render?: (
|
|
25
|
+
isLocal: boolean,
|
|
26
|
+
message: string,
|
|
27
|
+
createdTimestamp: string,
|
|
28
|
+
uid: UidType,
|
|
29
|
+
msgId: string,
|
|
30
|
+
isDeleted: boolean,
|
|
31
|
+
updatedTimestamp?: string,
|
|
32
|
+
) => JSX.Element;
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
export interface messageStoreInterface {
|
|
24
|
-
|
|
36
|
+
createdTimestamp: string;
|
|
37
|
+
updatedTimestamp?: string;
|
|
25
38
|
uid: UidType;
|
|
26
39
|
msg: string;
|
|
27
40
|
}
|
|
@@ -58,8 +71,6 @@ export interface chatContext {
|
|
|
58
71
|
engine: RtmEngine;
|
|
59
72
|
localUid: UidType;
|
|
60
73
|
onlineUsersCount: number;
|
|
61
|
-
displayName: string;
|
|
62
|
-
setDisplayName: React.Dispatch<SetStateAction<string>>;
|
|
63
74
|
}
|
|
64
75
|
|
|
65
76
|
export enum controlMessageEnum {
|
|
@@ -54,17 +54,21 @@ const Controls = () => {
|
|
|
54
54
|
<View style={{alignSelf: 'center'}}>
|
|
55
55
|
<LocalAudioMute />
|
|
56
56
|
</View>
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
57
|
+
{!$config.AUDIO_ROOM && (
|
|
58
|
+
<View style={{alignSelf: 'center'}}>
|
|
59
|
+
<LocalVideoMute />
|
|
60
|
+
</View>
|
|
61
|
+
)}
|
|
60
62
|
{isHost && $config.CLOUD_RECORDING && (
|
|
61
63
|
<View style={{alignSelf: 'baseline'}}>
|
|
62
64
|
<Recording />
|
|
63
65
|
</View>
|
|
64
66
|
)}
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
67
|
+
{!$config.AUDIO_ROOM && (
|
|
68
|
+
<View style={{alignSelf: 'center'}}>
|
|
69
|
+
<LocalSwitchCamera />
|
|
70
|
+
</View>
|
|
71
|
+
)}
|
|
68
72
|
</>
|
|
69
73
|
)}
|
|
70
74
|
<View style={{alignSelf: 'center'}}>
|
|
@@ -76,10 +76,12 @@ const Controls = () => {
|
|
|
76
76
|
<View style={{alignSelf: 'center'}}>
|
|
77
77
|
<LocalAudioMute />
|
|
78
78
|
</View>
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
{!$config.AUDIO_ROOM && (
|
|
80
|
+
<View style={{alignSelf: 'center'}}>
|
|
81
|
+
<LocalVideoMute />
|
|
82
|
+
</View>
|
|
83
|
+
)}
|
|
84
|
+
{!$config.AUDIO_ROOM && isMobileOrTablet() && (
|
|
83
85
|
<View style={{alignSelf: 'center'}}>
|
|
84
86
|
<LocalSwitchCamera />
|
|
85
87
|
</View>
|
|
@@ -70,9 +70,11 @@ const HostControlView = () => {
|
|
|
70
70
|
<View style={style.btnContainer}>
|
|
71
71
|
<MuteAllAudioButton />
|
|
72
72
|
</View>
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
73
|
+
{!$config.AUDIO_ROOM && (
|
|
74
|
+
<View style={style.btnContainer}>
|
|
75
|
+
<MuteAllVideoButton />
|
|
76
|
+
</View>
|
|
77
|
+
)}
|
|
76
78
|
</View>
|
|
77
79
|
</>
|
|
78
80
|
);
|
|
@@ -364,7 +364,7 @@ const Navbar = () => {
|
|
|
364
364
|
}
|
|
365
365
|
: {},
|
|
366
366
|
]}>
|
|
367
|
-
{isRecordingActive
|
|
367
|
+
{isRecordingActive ? (
|
|
368
368
|
<View
|
|
369
369
|
style={[
|
|
370
370
|
style.recordingView,
|
|
@@ -379,17 +379,19 @@ const Navbar = () => {
|
|
|
379
379
|
}}
|
|
380
380
|
color="#FD0845"
|
|
381
381
|
/>
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
382
|
+
{!isMobileOrTablet() && (
|
|
383
|
+
<Text
|
|
384
|
+
style={{
|
|
385
|
+
fontSize: isWeb ? 16 : 12,
|
|
386
|
+
color: '#FD0845',
|
|
387
|
+
fontWeight: '400',
|
|
388
|
+
alignSelf: 'center',
|
|
389
|
+
textAlign: 'center',
|
|
390
|
+
flex: 1,
|
|
391
|
+
}}>
|
|
392
|
+
{recordingLabel}
|
|
393
|
+
</Text>
|
|
394
|
+
)}
|
|
393
395
|
</View>
|
|
394
396
|
) : (
|
|
395
397
|
<></>
|
|
@@ -517,7 +519,7 @@ const style = StyleSheet.create({
|
|
|
517
519
|
height: 35,
|
|
518
520
|
maxHeight: 30,
|
|
519
521
|
position: 'absolute',
|
|
520
|
-
left: 10,
|
|
522
|
+
left: isMobileOrTablet() ? '50%' : 10,
|
|
521
523
|
paddingHorizontal: 5,
|
|
522
524
|
flexDirection: 'row',
|
|
523
525
|
alignItems: 'center',
|