@100mslive/react-native-room-kit 1.1.7 → 1.1.8
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/lib/commonjs/HMSRoomSetup.js +8 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Pencil/assets/pencil-board.png +0 -0
- package/lib/commonjs/Icons/Pencil/assets/pencil-board@2x.png +0 -0
- package/lib/commonjs/Icons/Pencil/assets/pencil-board@3x.png +0 -0
- package/lib/commonjs/Icons/Pencil/index.js +2 -1
- package/lib/commonjs/Icons/Pencil/index.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +2 -1
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/Footer.js +1 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/FullScreenWhiteboard.js +58 -0
- package/lib/commonjs/components/FullScreenWhiteboard.js.map +1 -0
- package/lib/commonjs/components/GridView.js +6 -4
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSChatView.js +7 -2
- package/lib/commonjs/components/HLSChatView.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerContainer.js +4 -1
- package/lib/commonjs/components/HLSPlayerContainer.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +22 -2
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +63 -6
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js +4 -4
- package/lib/commonjs/components/TilesContainer.js.map +1 -1
- package/lib/commonjs/components/WebrtcView.js +2 -2
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/components/Whiteboard.js +72 -0
- package/lib/commonjs/components/Whiteboard.js.map +1 -0
- package/lib/commonjs/components/WhiteboardContainer.js +35 -0
- package/lib/commonjs/components/WhiteboardContainer.js.map +1 -0
- package/lib/commonjs/components/WhiteboardFullScreenButton.js +42 -0
- package/lib/commonjs/components/WhiteboardFullScreenButton.js.map +1 -0
- package/lib/commonjs/hooks-util.js +36 -6
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +3 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +14 -2
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +8 -0
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js +7 -1
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +10 -2
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Pencil/assets/pencil-board.png +0 -0
- package/lib/module/Icons/Pencil/assets/pencil-board@2x.png +0 -0
- package/lib/module/Icons/Pencil/assets/pencil-board@3x.png +0 -0
- package/lib/module/Icons/Pencil/index.js +2 -1
- package/lib/module/Icons/Pencil/index.js.map +1 -1
- package/lib/module/components/DisplayView.js +2 -1
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/Footer.js +1 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/FullScreenWhiteboard.js +48 -0
- package/lib/module/components/FullScreenWhiteboard.js.map +1 -0
- package/lib/module/components/GridView.js +6 -4
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSChatView.js +7 -2
- package/lib/module/components/HLSChatView.js.map +1 -1
- package/lib/module/components/HLSPlayerContainer.js +4 -1
- package/lib/module/components/HLSPlayerContainer.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +23 -3
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +65 -8
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/TilesContainer.js +4 -4
- package/lib/module/components/TilesContainer.js.map +1 -1
- package/lib/module/components/WebrtcView.js +2 -2
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/components/Whiteboard.js +64 -0
- package/lib/module/components/Whiteboard.js.map +1 -0
- package/lib/module/components/WhiteboardContainer.js +27 -0
- package/lib/module/components/WhiteboardContainer.js.map +1 -0
- package/lib/module/components/WhiteboardFullScreenButton.js +33 -0
- package/lib/module/components/WhiteboardFullScreenButton.js.map +1 -0
- package/lib/module/hooks-util.js +36 -6
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +3 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +10 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +8 -0
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js +7 -1
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Pencil/index.d.ts +1 -0
- package/lib/typescript/Icons/Pencil/index.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/FullScreenWhiteboard.d.ts +3 -0
- package/lib/typescript/components/FullScreenWhiteboard.d.ts.map +1 -0
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HLSChatView.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerContainer.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/TilesContainer.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/components/Whiteboard.d.ts +6 -0
- package/lib/typescript/components/Whiteboard.d.ts.map +1 -0
- package/lib/typescript/components/WhiteboardContainer.d.ts +6 -0
- package/lib/typescript/components/WhiteboardContainer.d.ts.map +1 -0
- package/lib/typescript/components/WhiteboardFullScreenButton.d.ts +5 -0
- package/lib/typescript/components/WhiteboardFullScreenButton.d.ts.map +1 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +2 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +11 -1
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +2 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +1 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts +7 -2
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +2 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/HMSRoomSetup.tsx +21 -0
- package/src/Icons/Pencil/assets/pencil-board.png +0 -0
- package/src/Icons/Pencil/assets/pencil-board@2x.png +0 -0
- package/src/Icons/Pencil/assets/pencil-board@3x.png +0 -0
- package/src/Icons/Pencil/index.tsx +9 -2
- package/src/components/DisplayView.tsx +3 -0
- package/src/components/Footer.tsx +5 -2
- package/src/components/FullScreenWhiteboard.tsx +59 -0
- package/src/components/GridView.tsx +14 -5
- package/src/components/HLSChatView.tsx +7 -4
- package/src/components/HLSPlayerContainer.tsx +15 -7
- package/src/components/MeetingScreenContent.tsx +28 -2
- package/src/components/RoomSettingsModalContent.tsx +77 -2
- package/src/components/TilesContainer.tsx +7 -5
- package/src/components/WebrtcView.tsx +11 -4
- package/src/components/Whiteboard.tsx +101 -0
- package/src/components/WhiteboardContainer.tsx +35 -0
- package/src/components/WhiteboardFullScreenButton.tsx +52 -0
- package/src/hooks-util.ts +41 -9
- package/src/redux/actionTypes.ts +4 -0
- package/src/redux/actions/index.ts +11 -0
- package/src/redux/reducers/appState.ts +8 -0
- package/src/redux/reducers/hmsStates.ts +15 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { HMSLocalPeer, HMSNoiseCancellationPlugin, HMSPeer, HMSRole, HMSRoleChangeRequest, HMSRoom, HMSSpeaker } from '@100mslive/react-native-hms';
|
|
1
|
+
import type { HMSLocalPeer, HMSNoiseCancellationPlugin, HMSPeer, HMSRole, HMSRoleChangeRequest, HMSRoom, HMSSpeaker, HMSWhiteboard } from '@100mslive/react-native-hms';
|
|
2
2
|
import type { Layout } from '@100mslive/types-prebuilt';
|
|
3
3
|
import { HmsStateActionTypes } from '../actionTypes';
|
|
4
|
-
type ActionType = SetRoomAction | SetLocalPeerAction | SetRolesAction | SetIsLocalAudioMutedAction | SetIsLocalVideoMutedAction | SetIsLocalScreenSharedAction | SetRoomLocallyMutedAction | ResetAction | AddToPreviewPeersList | RemoveFromPreviewPeersList | SetLayoutConfig | SetRoleChangeRequest | AddParticipant | AddParticipants | RemoveParticipant | RemoveParticipants | AddUpdateParticipant | ReplaceParticipantsList | SetActiveSpeakers | SetReconnecting | SetNoiseCancellationPlugin;
|
|
4
|
+
type ActionType = SetRoomAction | SetLocalPeerAction | SetRolesAction | SetIsLocalAudioMutedAction | SetIsLocalVideoMutedAction | SetIsLocalScreenSharedAction | SetRoomLocallyMutedAction | ResetAction | AddToPreviewPeersList | RemoveFromPreviewPeersList | SetLayoutConfig | SetRoleChangeRequest | AddParticipant | AddParticipants | RemoveParticipant | RemoveParticipants | AddUpdateParticipant | ReplaceParticipantsList | SetActiveSpeakers | SetReconnecting | SetNoiseCancellationPlugin | SetWhiteboard;
|
|
5
5
|
type SetRoomAction = {
|
|
6
6
|
type: HmsStateActionTypes.SET_ROOM_STATE;
|
|
7
7
|
room: HMSRoom | null;
|
|
@@ -86,6 +86,10 @@ type SetNoiseCancellationPlugin = {
|
|
|
86
86
|
type: HmsStateActionTypes.SET_NOISE_CANCELLATION_PLUGIN;
|
|
87
87
|
noiseCancellationPlugin: HMSNoiseCancellationPlugin;
|
|
88
88
|
};
|
|
89
|
+
type SetWhiteboard = {
|
|
90
|
+
type: HmsStateActionTypes.SET_WHITEBOARD;
|
|
91
|
+
whiteboard: HMSWhiteboard | null;
|
|
92
|
+
};
|
|
89
93
|
type IntialStateType = {
|
|
90
94
|
isLocalAudioMuted: boolean | undefined;
|
|
91
95
|
isLocalVideoMuted: boolean | undefined;
|
|
@@ -101,6 +105,7 @@ type IntialStateType = {
|
|
|
101
105
|
layoutConfig: Layout[] | null;
|
|
102
106
|
roleChangeRequest: HMSRoleChangeRequest | null;
|
|
103
107
|
noiseCancellationPlugin: HMSNoiseCancellationPlugin | null;
|
|
108
|
+
whiteboard: HMSWhiteboard | null;
|
|
104
109
|
};
|
|
105
110
|
declare const hmsStatesReducer: (state: IntialStateType | undefined, action: ActionType) => IntialStateType;
|
|
106
111
|
export default hmsStatesReducer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmsStates.d.ts","sourceRoot":"","sources":["../../../../src/redux/reducers/hmsStates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,0BAA0B,EAC1B,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,OAAO,EACP,UAAU,
|
|
1
|
+
{"version":3,"file":"hmsStates.d.ts","sourceRoot":"","sources":["../../../../src/redux/reducers/hmsStates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,0BAA0B,EAC1B,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,OAAO,EACP,UAAU,EACV,aAAa,EACd,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,KAAK,UAAU,GACX,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,0BAA0B,GAC1B,0BAA0B,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AAgB,CAAC"}
|
|
@@ -29,6 +29,7 @@ declare const _default: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
29
29
|
gridViewActivePage: number;
|
|
30
30
|
startingOrStoppingRecording: boolean;
|
|
31
31
|
fullScreenPeerTrackNode: import("../../utils/types").PeerTrackNode | null;
|
|
32
|
+
fullScreenWhiteboard: boolean;
|
|
32
33
|
screensharePeerTrackNodes: import("../../utils/types").PeerTrackNode[];
|
|
33
34
|
notifications: import("../../types").Notification[];
|
|
34
35
|
activeChatBottomSheetTab: "Chat" | "Participants";
|
|
@@ -80,6 +81,7 @@ declare const _default: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
80
81
|
layoutConfig: import("@100mslive/types-prebuilt").Layout[] | null;
|
|
81
82
|
roleChangeRequest: import("@100mslive/react-native-hms").HMSRoleChangeRequest | null;
|
|
82
83
|
noiseCancellationPlugin: import("@100mslive/react-native-hms").HMSNoiseCancellationPlugin | null;
|
|
84
|
+
whiteboard: import("@100mslive/react-native-hms").HMSWhiteboard | null;
|
|
83
85
|
};
|
|
84
86
|
chatWindow: {
|
|
85
87
|
showChatView: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/reducers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/redux/reducers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAOG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@100mslive/react-native-room-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "100ms Room Kit provides simple & easy to use UI components to build Live Streaming & Video Conferencing experiences in your apps.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"typescript": "^5.0.2"
|
|
141
141
|
},
|
|
142
142
|
"peerDependencies": {
|
|
143
|
-
"@100mslive/react-native-hms": "1.10.
|
|
143
|
+
"@100mslive/react-native-hms": "1.10.5",
|
|
144
144
|
"@react-native-community/blur": "^4.3.2",
|
|
145
145
|
"@react-native-masked-view/masked-view": "^0.2.9",
|
|
146
146
|
"@shopify/flash-list": "^1.4.3",
|
|
@@ -152,7 +152,8 @@
|
|
|
152
152
|
"react-native-modal": "^12.1.0",
|
|
153
153
|
"react-native-reanimated": ">=2.17.0",
|
|
154
154
|
"react-native-safe-area-context": "^3.3.0",
|
|
155
|
-
"react-native-simple-toast": "^1.1.3"
|
|
155
|
+
"react-native-simple-toast": "^1.1.3",
|
|
156
|
+
"react-native-webview": "^13.8.7"
|
|
156
157
|
},
|
|
157
158
|
"resolutions": {
|
|
158
159
|
"@types/react": "17.0.21"
|
package/src/HMSRoomSetup.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
HMSRoom,
|
|
5
5
|
HMSTrack,
|
|
6
6
|
HMSUpdateListenerActions,
|
|
7
|
+
HMSWhiteboardUpdateType,
|
|
7
8
|
} from '@100mslive/react-native-hms';
|
|
8
9
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
9
10
|
import { Alert, Keyboard, StatusBar, StyleSheet, View } from 'react-native';
|
|
@@ -22,6 +23,7 @@ import {
|
|
|
22
23
|
setInitialRole,
|
|
23
24
|
setLocalPeerTrackNode,
|
|
24
25
|
setMiniViewPeerTrackNode,
|
|
26
|
+
setWhiteboard,
|
|
25
27
|
updateLocalPeerTrackNode,
|
|
26
28
|
} from './redux/actions';
|
|
27
29
|
import { createPeerTrackNode, getRandomUserId } from './utils/functions';
|
|
@@ -482,6 +484,25 @@ export const HMSRoomSetup = () => {
|
|
|
482
484
|
};
|
|
483
485
|
}, [isHLSViewer]);
|
|
484
486
|
|
|
487
|
+
useEffect(() => {
|
|
488
|
+
const subscription =
|
|
489
|
+
hmsInstance.interactivityCenter.addWhiteboardUpdateListener(
|
|
490
|
+
async (hmsWhiteboard, updateType) => {
|
|
491
|
+
dispatch(
|
|
492
|
+
setWhiteboard(
|
|
493
|
+
updateType === HMSWhiteboardUpdateType.STARTED
|
|
494
|
+
? hmsWhiteboard
|
|
495
|
+
: null
|
|
496
|
+
)
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
);
|
|
500
|
+
|
|
501
|
+
return () => {
|
|
502
|
+
subscription.remove();
|
|
503
|
+
};
|
|
504
|
+
}, []);
|
|
505
|
+
|
|
485
506
|
// Syncs showing Polls with HLS Player onCue event
|
|
486
507
|
useHLSCuedPolls();
|
|
487
508
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -4,10 +4,13 @@ import type { ImageProps } from 'react-native';
|
|
|
4
4
|
|
|
5
5
|
import { useHMSRoomStyle } from '../../hooks-util';
|
|
6
6
|
|
|
7
|
-
interface PencilIconProps extends Omit<ImageProps, 'source'> {
|
|
7
|
+
interface PencilIconProps extends Omit<ImageProps, 'source'> {
|
|
8
|
+
type?: 'normal' | 'board';
|
|
9
|
+
}
|
|
8
10
|
|
|
9
11
|
export const PencilIcon: React.FC<PencilIconProps> = ({
|
|
10
12
|
style,
|
|
13
|
+
type = 'normal',
|
|
11
14
|
...restProps
|
|
12
15
|
}) => {
|
|
13
16
|
const iconStyles = useHMSRoomStyle((theme) => ({
|
|
@@ -16,7 +19,11 @@ export const PencilIcon: React.FC<PencilIconProps> = ({
|
|
|
16
19
|
|
|
17
20
|
return (
|
|
18
21
|
<Image
|
|
19
|
-
source={
|
|
22
|
+
source={
|
|
23
|
+
type === 'board'
|
|
24
|
+
? require('./assets/pencil-board.png')
|
|
25
|
+
: require('./assets/pencil.png')
|
|
26
|
+
}
|
|
20
27
|
style={[styles.icon, iconStyles, style]}
|
|
21
28
|
{...restProps}
|
|
22
29
|
/>
|
|
@@ -31,6 +31,7 @@ import { PreviewForRoleChangeModal } from './PreviewForRoleChangeModal';
|
|
|
31
31
|
import { ChatAndParticipantsBottomSheet } from './ChatAndParticipants';
|
|
32
32
|
import { LeaveRoomBottomSheet } from './LeaveRoomBottomSheet';
|
|
33
33
|
import { EndRoomModal } from './EndRoomModal';
|
|
34
|
+
import { FullScreenWhiteboard } from './FullScreenWhiteboard';
|
|
34
35
|
|
|
35
36
|
type CapturedImagePath = { uri: string } | null;
|
|
36
37
|
|
|
@@ -143,6 +144,8 @@ export const DisplayView: React.FC<DisplayViewProps> = ({
|
|
|
143
144
|
|
|
144
145
|
<FullScreenVideoView />
|
|
145
146
|
|
|
147
|
+
<FullScreenWhiteboard />
|
|
148
|
+
|
|
146
149
|
<ChatAndParticipantsBottomSheet />
|
|
147
150
|
|
|
148
151
|
<BottomSheet
|
|
@@ -118,8 +118,11 @@ export const useFooterHeight = (excludeSafeArea: boolean = false) => {
|
|
|
118
118
|
const { bottom } = useSafeAreaInsets();
|
|
119
119
|
|
|
120
120
|
return (
|
|
121
|
-
(excludeSafeArea ? 0 : bottom) +
|
|
122
|
-
|
|
121
|
+
(excludeSafeArea ? 0 : bottom) +
|
|
122
|
+
(Platform.OS === 'android' ? 16 : 0) +
|
|
123
|
+
42 +
|
|
124
|
+
16
|
|
125
|
+
); // bottomSafeArea + marginBottom + content + contentTopPadding
|
|
123
126
|
};
|
|
124
127
|
|
|
125
128
|
const styles = StyleSheet.create({
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Modal from 'react-native-modal';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
5
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
6
|
+
|
|
7
|
+
import type { RootState } from '../redux';
|
|
8
|
+
import { useHMSRoomColorPalette, useHMSRoomStyle } from '../hooks-util';
|
|
9
|
+
import { setFullScreenWhiteboard } from '../redux/actions';
|
|
10
|
+
import { Whiteboard } from './Whiteboard';
|
|
11
|
+
|
|
12
|
+
export const FullScreenWhiteboard = () => {
|
|
13
|
+
const dispatch = useDispatch();
|
|
14
|
+
const fullScreenWhiteboard = useSelector(
|
|
15
|
+
(state: RootState) => state.app.fullScreenWhiteboard
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const { background_dim: backgroundDimColor } = useHMSRoomColorPalette();
|
|
19
|
+
|
|
20
|
+
const contentContainerStyles = useHMSRoomStyle((theme) => ({
|
|
21
|
+
backgroundColor: theme.palette.background_dim,
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
const handleClosingFullScreenView = () => {
|
|
25
|
+
dispatch(setFullScreenWhiteboard(false));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Modal
|
|
30
|
+
isVisible={fullScreenWhiteboard}
|
|
31
|
+
animationIn={'fadeInUp'}
|
|
32
|
+
animationInTiming={100}
|
|
33
|
+
animationOutTiming={100}
|
|
34
|
+
animationOut={'fadeOutDown'}
|
|
35
|
+
backdropColor={backgroundDimColor}
|
|
36
|
+
backdropOpacity={0.3}
|
|
37
|
+
onBackButtonPress={handleClosingFullScreenView}
|
|
38
|
+
onBackdropPress={handleClosingFullScreenView}
|
|
39
|
+
useNativeDriver={true}
|
|
40
|
+
useNativeDriverForBackdrop={true}
|
|
41
|
+
hideModalContentWhileAnimating={true}
|
|
42
|
+
style={styles.modal}
|
|
43
|
+
supportedOrientations={['portrait', 'landscape']}
|
|
44
|
+
>
|
|
45
|
+
<SafeAreaView style={[contentContainerStyles, styles.container]}>
|
|
46
|
+
<Whiteboard />
|
|
47
|
+
</SafeAreaView>
|
|
48
|
+
</Modal>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
modal: {
|
|
54
|
+
margin: 0,
|
|
55
|
+
},
|
|
56
|
+
container: {
|
|
57
|
+
flexGrow: 1,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -16,6 +16,7 @@ import { PaginationDots } from './PaginationDots';
|
|
|
16
16
|
import { setGridViewActivePage } from '../redux/actions';
|
|
17
17
|
import { Tile } from './Tile';
|
|
18
18
|
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
19
|
+
import { WhiteboardContainer } from './WhiteboardContainer';
|
|
19
20
|
|
|
20
21
|
export type GridViewProps = {
|
|
21
22
|
onPeerTileMorePress(peerTrackNode: PeerTrackNode): void;
|
|
@@ -52,6 +53,9 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
52
53
|
const screenshareTilesAvailable = useSelector(
|
|
53
54
|
(state: RootState) => state.app.screensharePeerTrackNodes.length > 0
|
|
54
55
|
);
|
|
56
|
+
const whiteboardActive = useSelector(
|
|
57
|
+
(state: RootState) => !!state.hmsStates.whiteboard
|
|
58
|
+
);
|
|
55
59
|
const regularTilesAvailable = pairedPeers.length > 0;
|
|
56
60
|
|
|
57
61
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
@@ -147,9 +151,12 @@ export const GridView = React.forwardRef<GridViewRefAttrs, GridViewProps>(
|
|
|
147
151
|
setHmsViewRefs={setHmsViewRefs}
|
|
148
152
|
onPeerTileMorePress={onPeerTileMorePress}
|
|
149
153
|
/>
|
|
154
|
+
) : whiteboardActive ? (
|
|
155
|
+
<WhiteboardContainer />
|
|
150
156
|
) : null}
|
|
151
157
|
|
|
152
|
-
{screenshareTilesAvailable &&
|
|
158
|
+
{(whiteboardActive || screenshareTilesAvailable) &&
|
|
159
|
+
isLandscapeOrientation ? null : (
|
|
153
160
|
<RegularTiles
|
|
154
161
|
ref={regularTilesFlatlistRef}
|
|
155
162
|
pairedPeers={pairedPeers}
|
|
@@ -209,8 +216,10 @@ const RegularTiles = React.forwardRef<
|
|
|
209
216
|
const dispatch = useDispatch();
|
|
210
217
|
const { height: safeHeight } = useSafeAreaFrame();
|
|
211
218
|
|
|
212
|
-
const
|
|
213
|
-
(state: RootState) =>
|
|
219
|
+
const screenshareTilesOrWhiteboardActive = useSelector(
|
|
220
|
+
(state: RootState) =>
|
|
221
|
+
state.app.screensharePeerTrackNodes.length > 0 ||
|
|
222
|
+
!!state.hmsStates.whiteboard
|
|
214
223
|
);
|
|
215
224
|
const activeIndex = useSelector(
|
|
216
225
|
(state: RootState) => state.app.gridViewActivePage
|
|
@@ -248,7 +257,7 @@ const RegularTiles = React.forwardRef<
|
|
|
248
257
|
);
|
|
249
258
|
|
|
250
259
|
return (
|
|
251
|
-
<View style={{ flex:
|
|
260
|
+
<View style={{ flex: screenshareTilesOrWhiteboardActive ? undefined : 1 }}>
|
|
252
261
|
<FlatList
|
|
253
262
|
ref={flatlistRef}
|
|
254
263
|
horizontal={true}
|
|
@@ -275,7 +284,7 @@ const RegularTiles = React.forwardRef<
|
|
|
275
284
|
list={pairedPeers}
|
|
276
285
|
activeIndex={activeIndex}
|
|
277
286
|
style={
|
|
278
|
-
|
|
287
|
+
screenshareTilesOrWhiteboardActive || isLandscapeOrientation
|
|
279
288
|
? { marginVertical: isLandscapeOrientation ? 4 : 8 }
|
|
280
289
|
: null
|
|
281
290
|
}
|
|
@@ -10,13 +10,16 @@ import { HLSDescriptionPane } from './HLSDescriptionPane';
|
|
|
10
10
|
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
11
11
|
import type { RootState } from '../redux';
|
|
12
12
|
import { HLSNotifications } from './HLSNotifications';
|
|
13
|
+
import { PipModes } from '../utils/types';
|
|
13
14
|
|
|
14
15
|
export const HLSChatView = () => {
|
|
15
16
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
16
17
|
const { chatWrapperConstraints } = useHLSViewsConstraints();
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const fullScreenMode = useSelector((state: RootState) => {
|
|
19
|
+
const hlsFullScreen = state.app.hlsFullScreen;
|
|
20
|
+
const isPipModeActive = state.app.pipModeStatus === PipModes.ACTIVE;
|
|
21
|
+
return hlsFullScreen || isPipModeActive;
|
|
22
|
+
});
|
|
20
23
|
|
|
21
24
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme) => ({
|
|
22
25
|
wrapper: {
|
|
@@ -24,7 +27,7 @@ export const HLSChatView = () => {
|
|
|
24
27
|
},
|
|
25
28
|
}));
|
|
26
29
|
|
|
27
|
-
if (
|
|
30
|
+
if (fullScreenMode) {
|
|
28
31
|
return null;
|
|
29
32
|
}
|
|
30
33
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
3
4
|
import type { HMSHLSPlayer } from '@100mslive/react-native-hms';
|
|
4
5
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
5
6
|
import {
|
|
@@ -13,11 +14,16 @@ import {
|
|
|
13
14
|
import { useHLSViewsConstraints } from '../hooks-util';
|
|
14
15
|
import { HLSPlayer } from './HLSPlayer';
|
|
15
16
|
import { HLSPlayerControls } from './HLSPlayerControls';
|
|
17
|
+
import { PipModes } from '../utils/types';
|
|
18
|
+
import type { RootState } from '../redux';
|
|
16
19
|
|
|
17
20
|
export const _HLSPlayerContainer: React.FC = () => {
|
|
18
21
|
const hlsPlayerRef =
|
|
19
22
|
React.useRef<React.ElementRef<typeof HMSHLSPlayer>>(null);
|
|
20
23
|
const { playerWrapperConstraints } = useHLSViewsConstraints();
|
|
24
|
+
const isPipModeActive = useSelector(
|
|
25
|
+
(state: RootState) => state.app.pipModeStatus === PipModes.ACTIVE
|
|
26
|
+
);
|
|
21
27
|
|
|
22
28
|
const animatedValue = useSharedValue(1);
|
|
23
29
|
|
|
@@ -82,13 +88,15 @@ export const _HLSPlayerContainer: React.FC = () => {
|
|
|
82
88
|
>
|
|
83
89
|
<HLSPlayer ref={hlsPlayerRef} />
|
|
84
90
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
{isPipModeActive ? null : (
|
|
92
|
+
<HLSPlayerControls
|
|
93
|
+
playerRef={hlsPlayerRef}
|
|
94
|
+
animatedValue={animatedValue}
|
|
95
|
+
cancelCurrentControlAnimation={cancelCurrentControlAnimation}
|
|
96
|
+
hideControlsAfterDelay={hideControlsAfterDelay}
|
|
97
|
+
resetHideControlAnimation={resetHideControlAnimation}
|
|
98
|
+
/>
|
|
99
|
+
)}
|
|
92
100
|
</View>
|
|
93
101
|
</GestureDetector>
|
|
94
102
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState, useEffect } from 'react';
|
|
2
|
-
import { StyleSheet, View, Keyboard } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, Keyboard, Platform } from 'react-native';
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
4
|
import {
|
|
5
5
|
Easing,
|
|
@@ -21,6 +21,7 @@ import { useKeyboardState } from '../hooks-util';
|
|
|
21
21
|
import { HMSStatusBar } from './StatusBar';
|
|
22
22
|
import { AnimatedFooter } from './AnimatedFooter';
|
|
23
23
|
import { AnimatedHeader } from './AnimatedHeader';
|
|
24
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
24
25
|
// import { ReconnectionView } from './ReconnectionView';
|
|
25
26
|
|
|
26
27
|
interface MeetingScreenContentProps {
|
|
@@ -33,9 +34,14 @@ export const MeetingScreenContent: React.FC<MeetingScreenContentProps> = ({
|
|
|
33
34
|
const offset = useSharedValue(1);
|
|
34
35
|
const timerIdRef = useRef<NodeJS.Timeout | null>(null);
|
|
35
36
|
const [controlsHidden, setControlsHidden] = useState(false);
|
|
37
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
36
38
|
const isPipModeActive = useSelector(
|
|
37
39
|
(state: RootState) => state.app.pipModeStatus === PipModes.ACTIVE
|
|
38
40
|
);
|
|
41
|
+
const whiteboardActive =
|
|
42
|
+
Platform.OS === 'android'
|
|
43
|
+
? useSelector((state: RootState) => !!state.hmsStates.whiteboard)
|
|
44
|
+
: null;
|
|
39
45
|
const { keyboardState } = useKeyboardState();
|
|
40
46
|
|
|
41
47
|
const dismissKeyboard = useCallback(() => {
|
|
@@ -75,9 +81,28 @@ export const MeetingScreenContent: React.FC<MeetingScreenContentProps> = ({
|
|
|
75
81
|
[dismissKeyboard, clearTimer]
|
|
76
82
|
);
|
|
77
83
|
|
|
84
|
+
if (
|
|
85
|
+
!!whiteboardActive &&
|
|
86
|
+
(isLandscapeOrientation ? offset.value === 1 : offset.value < 1)
|
|
87
|
+
) {
|
|
88
|
+
cancelAnimation(offset);
|
|
89
|
+
offset.value = withTiming(
|
|
90
|
+
isLandscapeOrientation ? 0 : 1,
|
|
91
|
+
{ duration: 200, easing: Easing.ease },
|
|
92
|
+
(finished) => {
|
|
93
|
+
if (finished) {
|
|
94
|
+
runOnJS(setControlsHidden)(offset.value === 0);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
78
100
|
// Handles Auto hiding the controls for the first time
|
|
79
101
|
// to make this feature discoverable
|
|
80
102
|
useEffect(() => {
|
|
103
|
+
if (!!whiteboardActive) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
81
106
|
clearTimer();
|
|
82
107
|
timerIdRef.current = setTimeout(() => {
|
|
83
108
|
timerIdRef.current = null;
|
|
@@ -85,9 +110,10 @@ export const MeetingScreenContent: React.FC<MeetingScreenContentProps> = ({
|
|
|
85
110
|
}, HeaderFooterHideDelayMs);
|
|
86
111
|
|
|
87
112
|
return clearTimer;
|
|
88
|
-
}, [clearTimer, toggleControls]);
|
|
113
|
+
}, [clearTimer, toggleControls, !!whiteboardActive]);
|
|
89
114
|
|
|
90
115
|
const tapGesture = Gesture.Tap()
|
|
116
|
+
.enabled(Platform.select({ android: !whiteboardActive, default: true }))
|
|
91
117
|
.onEnd(() => toggleControls())
|
|
92
118
|
.requireExternalGestureToFail();
|
|
93
119
|
|
|
@@ -3,7 +3,7 @@ import { View, StyleSheet, Text, TouchableOpacity } from 'react-native';
|
|
|
3
3
|
import type { TouchableOpacityProps } from 'react-native';
|
|
4
4
|
import type { HMSAudioMixingMode } from '@100mslive/react-native-hms';
|
|
5
5
|
import { HMSRecordingState } from '@100mslive/react-native-hms';
|
|
6
|
-
import { useSelector } from 'react-redux';
|
|
6
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
7
7
|
|
|
8
8
|
import type { RootState } from '../redux';
|
|
9
9
|
import { ModalTypes } from '../utils/types';
|
|
@@ -22,6 +22,7 @@ import { BottomSheet, useBottomSheetActions } from './BottomSheet';
|
|
|
22
22
|
import {
|
|
23
23
|
isPublishingAllowed,
|
|
24
24
|
useHMSConferencingScreenConfig,
|
|
25
|
+
useHMSInstance,
|
|
25
26
|
useHMSLayoutConfig,
|
|
26
27
|
useHMSRoomColorPalette,
|
|
27
28
|
useHMSRoomStyleSheet,
|
|
@@ -38,6 +39,8 @@ import { RoomSettingsModalDebugModeContent } from './RoomSettingsModalDebugModeC
|
|
|
38
39
|
import { ParticipantsCount } from './ParticipantsCount';
|
|
39
40
|
import { selectAllowedTracksToPublish } from '../hooks-sdk-selectors';
|
|
40
41
|
import { TestIds } from '../utils/constants';
|
|
42
|
+
import { addNotification } from '../redux/actions';
|
|
43
|
+
import { NotificationTypes } from '../types';
|
|
41
44
|
|
|
42
45
|
interface RoomSettingsModalContentProps {
|
|
43
46
|
newAudioMixingMode: HMSAudioMixingMode;
|
|
@@ -56,6 +59,8 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
56
59
|
> = (props) => {
|
|
57
60
|
const { closeRoomSettingsModal, setModalVisible } = props;
|
|
58
61
|
|
|
62
|
+
const hmsInstance = useHMSInstance();
|
|
63
|
+
const dispatch = useDispatch();
|
|
59
64
|
const debugMode = useSelector((state: RootState) => state.user.debugMode);
|
|
60
65
|
|
|
61
66
|
const hmsActions = useHMSActions();
|
|
@@ -76,6 +81,10 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
76
81
|
return permissions?.pollRead || permissions?.pollWrite;
|
|
77
82
|
});
|
|
78
83
|
|
|
84
|
+
const whiteboardAdminPermission = useSelector((state: RootState) => {
|
|
85
|
+
return !!state.hmsStates.localPeer?.role?.permissions?.whiteboard?.admin;
|
|
86
|
+
});
|
|
87
|
+
|
|
79
88
|
const { registerOnModalHideAction } = useBottomSheetActions();
|
|
80
89
|
|
|
81
90
|
const { canShowParticipants, show } = useShowChatAndParticipants();
|
|
@@ -271,6 +280,61 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
271
280
|
closeRoomSettingsModal();
|
|
272
281
|
};
|
|
273
282
|
|
|
283
|
+
const whiteboard = useSelector(
|
|
284
|
+
(state: RootState) => state.hmsStates.whiteboard
|
|
285
|
+
);
|
|
286
|
+
const screenShareNodesAvailable = useSelector(
|
|
287
|
+
(state: RootState) => state.app.screensharePeerTrackNodes.length > 0
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
const toggleWhiteboard = async () => {
|
|
291
|
+
if (!whiteboardAdminPermission) return;
|
|
292
|
+
|
|
293
|
+
if (whiteboard && whiteboard.isOwner) {
|
|
294
|
+
hmsInstance.interactivityCenter
|
|
295
|
+
.stopWhiteboard()
|
|
296
|
+
.then((success) => {
|
|
297
|
+
console.log('#stopWhiteboard stopped whiteboard ', success);
|
|
298
|
+
})
|
|
299
|
+
.catch((error) => {
|
|
300
|
+
console.log('#stopWhiteboard error ', error);
|
|
301
|
+
});
|
|
302
|
+
} else if (whiteboard && !whiteboard.isOwner) {
|
|
303
|
+
const uid = Math.random().toString(16).slice(2);
|
|
304
|
+
dispatch(
|
|
305
|
+
addNotification({
|
|
306
|
+
id: uid,
|
|
307
|
+
type: NotificationTypes.ERROR,
|
|
308
|
+
title:
|
|
309
|
+
'Only the peer who started the whiteboard has the ability to close it!',
|
|
310
|
+
})
|
|
311
|
+
);
|
|
312
|
+
} else if (isLocalScreenShared || screenShareNodesAvailable) {
|
|
313
|
+
const uid = Math.random().toString(16).slice(2);
|
|
314
|
+
dispatch(
|
|
315
|
+
addNotification({
|
|
316
|
+
id: uid,
|
|
317
|
+
type: NotificationTypes.ERROR,
|
|
318
|
+
title: isLocalScreenShared
|
|
319
|
+
? 'Discontinue screenshare to open the whiteboard!'
|
|
320
|
+
: "Can't open whiteboard while screenshare is happening!",
|
|
321
|
+
})
|
|
322
|
+
);
|
|
323
|
+
} else {
|
|
324
|
+
hmsInstance.interactivityCenter
|
|
325
|
+
.startWhiteboard('Interactive Session')
|
|
326
|
+
.then((success) => {
|
|
327
|
+
console.log('#startWhiteboard started whiteboard ', success);
|
|
328
|
+
})
|
|
329
|
+
.catch((error) => {
|
|
330
|
+
console.log('#startWhiteboard error ', error);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Close the current bottom sheet
|
|
335
|
+
closeRoomSettingsModal();
|
|
336
|
+
};
|
|
337
|
+
|
|
274
338
|
const canShowBRB = useHMSLayoutConfig(
|
|
275
339
|
(layoutConfig) =>
|
|
276
340
|
!!layoutConfig?.screens?.conferencing?.default?.elements?.brb
|
|
@@ -394,6 +458,17 @@ export const RoomSettingsModalContent: React.FC<
|
|
|
394
458
|
isActive: false,
|
|
395
459
|
hide: !canReadOrWritePoll,
|
|
396
460
|
},
|
|
461
|
+
{
|
|
462
|
+
id: 'whiteboard',
|
|
463
|
+
icon: (
|
|
464
|
+
<PencilIcon type="board" style={{ width: 20, height: 20 }} />
|
|
465
|
+
),
|
|
466
|
+
label: whiteboard ? 'Close Whiteboard' : 'Open Whiteboard',
|
|
467
|
+
pressHandler: toggleWhiteboard,
|
|
468
|
+
isActive: !!whiteboard && whiteboard.isOwner,
|
|
469
|
+
disabled: !!whiteboard && !whiteboard.isOwner,
|
|
470
|
+
hide: !whiteboardAdminPermission,
|
|
471
|
+
},
|
|
397
472
|
{
|
|
398
473
|
id: 'noise-cancellation',
|
|
399
474
|
icon: <WaveIcon style={{ width: 20, height: 20 }} />,
|
|
@@ -458,7 +533,7 @@ type SettingItemProps = {
|
|
|
458
533
|
onPress(): void;
|
|
459
534
|
disabled?: TouchableOpacityProps['disabled'];
|
|
460
535
|
testID?: TouchableOpacityProps['testID'];
|
|
461
|
-
isActive?: boolean;
|
|
536
|
+
isActive?: boolean | null;
|
|
462
537
|
};
|
|
463
538
|
|
|
464
539
|
const SettingItem: React.FC<SettingItemProps> = ({
|
|
@@ -25,13 +25,15 @@ const _TilesContainer: React.FC<TilesContainerProps> = ({
|
|
|
25
25
|
const { width: safeWidth } = useSafeAreaFrame();
|
|
26
26
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
27
27
|
|
|
28
|
-
const
|
|
29
|
-
(state: RootState) =>
|
|
28
|
+
const screenshareTilesOrWhiteboardAcive = useSelector(
|
|
29
|
+
(state: RootState) =>
|
|
30
|
+
state.app.screensharePeerTrackNodes.length > 0 ||
|
|
31
|
+
!!state.hmsStates.whiteboard
|
|
30
32
|
);
|
|
31
33
|
|
|
32
34
|
const stylesConfig = computeTileWidthAndHeight(peerTrackNodes.length, {
|
|
33
35
|
isLandscapeOrientation,
|
|
34
|
-
type:
|
|
36
|
+
type: screenshareTilesOrWhiteboardAcive ? 'row' : 'default',
|
|
35
37
|
});
|
|
36
38
|
|
|
37
39
|
// In this layout, Tile will take as much height and width as possible
|
|
@@ -44,12 +46,12 @@ const _TilesContainer: React.FC<TilesContainerProps> = ({
|
|
|
44
46
|
// If tile are growable, then we want whatever remaining space to be between them
|
|
45
47
|
{
|
|
46
48
|
justifyContent:
|
|
47
|
-
|
|
49
|
+
screenshareTilesOrWhiteboardAcive && peerTrackNodes.length === 1
|
|
48
50
|
? 'center'
|
|
49
51
|
: growableTileLayout
|
|
50
52
|
? 'space-between'
|
|
51
53
|
: 'center',
|
|
52
|
-
flexDirection:
|
|
54
|
+
flexDirection: screenshareTilesOrWhiteboardAcive
|
|
53
55
|
? 'row'
|
|
54
56
|
: isLandscapeOrientation
|
|
55
57
|
? 'row'
|