@100mslive/react-native-room-kit 1.1.7 → 1.1.9-beta.0
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/HMSInstanceSetup.js +11 -5
- package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +8 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/AddImage/assets/add-image.png +0 -0
- package/lib/commonjs/Icons/AddImage/assets/add-image@2x.png +0 -0
- package/lib/commonjs/Icons/AddImage/assets/add-image@3x.png +0 -0
- package/lib/commonjs/Icons/AddImage/index.js +33 -0
- package/lib/commonjs/Icons/AddImage/index.js.map +1 -0
- package/lib/commonjs/Icons/BlurPeople/assets/blur-people.png +0 -0
- package/lib/commonjs/Icons/BlurPeople/assets/blur-people@2x.png +0 -0
- package/lib/commonjs/Icons/BlurPeople/assets/blur-people@3x.png +0 -0
- package/lib/commonjs/Icons/BlurPeople/index.js +33 -0
- package/lib/commonjs/Icons/BlurPeople/index.js.map +1 -0
- package/lib/commonjs/Icons/CrossCircle/assets/cross-circle-large.png +0 -0
- package/lib/commonjs/Icons/CrossCircle/assets/cross-circle-large@2x.png +0 -0
- package/lib/commonjs/Icons/CrossCircle/assets/cross-circle-large@3x.png +0 -0
- package/lib/commonjs/Icons/CrossCircle/index.js +7 -2
- package/lib/commonjs/Icons/CrossCircle/index.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/Icons/VirtualBackground/assets/virtual-background.png +0 -0
- package/lib/commonjs/Icons/VirtualBackground/assets/virtual-background@2x.png +0 -0
- package/lib/commonjs/Icons/VirtualBackground/assets/virtual-background@3x.png +0 -0
- package/lib/commonjs/Icons/VirtualBackground/index.js +33 -0
- package/lib/commonjs/Icons/VirtualBackground/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +33 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatMessage.js +13 -1
- package/lib/commonjs/components/Chat/ChatMessage.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/HLSDescriptionPane.js +3 -29
- package/lib/commonjs/components/HLSDescriptionPane.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/HMSHLSMessage.js +14 -1
- package/lib/commonjs/components/HMSHLSMessage.js.map +1 -1
- package/lib/commonjs/components/HMSManageCameraRotation.js +11 -4
- package/lib/commonjs/components/HMSManageCameraRotation.js.map +1 -1
- package/lib/commonjs/components/HMSManageLocalVideo.js +11 -4
- package/lib/commonjs/components/HMSManageLocalVideo.js.map +1 -1
- package/lib/commonjs/components/HMSManageVirtualBackground.js +55 -0
- package/lib/commonjs/components/HMSManageVirtualBackground.js.map +1 -0
- package/lib/commonjs/components/HMSOverlayMessageView.js +14 -1
- package/lib/commonjs/components/HMSOverlayMessageView.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +2 -1
- package/lib/commonjs/components/HMSRoomOptions.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/Preview.js +8 -3
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +91 -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/VirtualBackgroundBottomSheet.js +52 -0
- package/lib/commonjs/components/VirtualBackgroundBottomSheet.js.map +1 -0
- package/lib/commonjs/components/VirtualBackgroundModalContent.js +364 -0
- package/lib/commonjs/components/VirtualBackgroundModalContent.js.map +1 -0
- 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/modules/imagePickerWrapper.js +19 -0
- package/lib/commonjs/modules/imagePickerWrapper.js.map +1 -0
- package/lib/commonjs/modules/videoPluginWrapper.js +13 -0
- package/lib/commonjs/modules/videoPluginWrapper.js.map +1 -0
- package/lib/commonjs/redux/actionTypes.js +6 -0
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +27 -3
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +17 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js +13 -1
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/commonjs/utils/functions.js +33 -1
- package/lib/commonjs/utils/functions.js.map +1 -1
- package/lib/commonjs/utils/types.js +1 -0
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/module/HMSInstanceSetup.js +12 -6
- package/lib/module/HMSInstanceSetup.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +10 -2
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/AddImage/assets/add-image.png +0 -0
- package/lib/module/Icons/AddImage/assets/add-image@2x.png +0 -0
- package/lib/module/Icons/AddImage/assets/add-image@3x.png +0 -0
- package/lib/module/Icons/AddImage/index.js +25 -0
- package/lib/module/Icons/AddImage/index.js.map +1 -0
- package/lib/module/Icons/BlurPeople/assets/blur-people.png +0 -0
- package/lib/module/Icons/BlurPeople/assets/blur-people@2x.png +0 -0
- package/lib/module/Icons/BlurPeople/assets/blur-people@3x.png +0 -0
- package/lib/module/Icons/BlurPeople/index.js +25 -0
- package/lib/module/Icons/BlurPeople/index.js.map +1 -0
- package/lib/module/Icons/CrossCircle/assets/cross-circle-large.png +0 -0
- package/lib/module/Icons/CrossCircle/assets/cross-circle-large@2x.png +0 -0
- package/lib/module/Icons/CrossCircle/assets/cross-circle-large@3x.png +0 -0
- package/lib/module/Icons/CrossCircle/index.js +7 -2
- package/lib/module/Icons/CrossCircle/index.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/Icons/VirtualBackground/assets/virtual-background.png +0 -0
- package/lib/module/Icons/VirtualBackground/assets/virtual-background@2x.png +0 -0
- package/lib/module/Icons/VirtualBackground/assets/virtual-background@3x.png +0 -0
- package/lib/module/Icons/VirtualBackground/index.js +25 -0
- package/lib/module/Icons/VirtualBackground/index.js.map +1 -0
- package/lib/module/Icons/index.js +3 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/Chat/ChatMessage.js +15 -3
- package/lib/module/components/Chat/ChatMessage.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/HLSDescriptionPane.js +2 -28
- package/lib/module/components/HLSDescriptionPane.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/HMSHLSMessage.js +15 -2
- package/lib/module/components/HMSHLSMessage.js.map +1 -1
- package/lib/module/components/HMSManageCameraRotation.js +11 -4
- package/lib/module/components/HMSManageCameraRotation.js.map +1 -1
- package/lib/module/components/HMSManageLocalVideo.js +11 -4
- package/lib/module/components/HMSManageLocalVideo.js.map +1 -1
- package/lib/module/components/HMSManageVirtualBackground.js +46 -0
- package/lib/module/components/HMSManageVirtualBackground.js.map +1 -0
- package/lib/module/components/HMSOverlayMessageView.js +15 -2
- package/lib/module/components/HMSOverlayMessageView.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +2 -1
- package/lib/module/components/HMSRoomOptions.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/Preview.js +8 -3
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +94 -9
- 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/VirtualBackgroundBottomSheet.js +43 -0
- package/lib/module/components/VirtualBackgroundBottomSheet.js.map +1 -0
- package/lib/module/components/VirtualBackgroundModalContent.js +355 -0
- package/lib/module/components/VirtualBackgroundModalContent.js.map +1 -0
- 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/modules/imagePickerWrapper.js +14 -0
- package/lib/module/modules/imagePickerWrapper.js.map +1 -0
- package/lib/module/modules/videoPluginWrapper.js +8 -0
- package/lib/module/modules/videoPluginWrapper.js.map +1 -0
- package/lib/module/redux/actionTypes.js +6 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +20 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +17 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js +13 -1
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/utils/functions.js +29 -1
- package/lib/module/utils/functions.js.map +1 -1
- package/lib/module/utils/types.js +1 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/AddImage/index.d.ts +7 -0
- package/lib/typescript/Icons/AddImage/index.d.ts.map +1 -0
- package/lib/typescript/Icons/BlurPeople/index.d.ts +7 -0
- package/lib/typescript/Icons/BlurPeople/index.d.ts.map +1 -0
- package/lib/typescript/Icons/CrossCircle/index.d.ts +1 -0
- package/lib/typescript/Icons/CrossCircle/index.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/Icons/VirtualBackground/index.d.ts +7 -0
- package/lib/typescript/Icons/VirtualBackground/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +3 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatMessage.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/HLSDescriptionPane.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerContainer.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSMessage.d.ts.map +1 -1
- package/lib/typescript/components/HMSManageCameraRotation.d.ts +8 -1
- package/lib/typescript/components/HMSManageCameraRotation.d.ts.map +1 -1
- package/lib/typescript/components/HMSManageLocalVideo.d.ts +8 -1
- package/lib/typescript/components/HMSManageLocalVideo.d.ts.map +1 -1
- package/lib/typescript/components/HMSManageVirtualBackground.d.ts +8 -0
- package/lib/typescript/components/HMSManageVirtualBackground.d.ts.map +1 -0
- package/lib/typescript/components/HMSOverlayMessageView.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/Preview.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/VirtualBackgroundBottomSheet.d.ts +3 -0
- package/lib/typescript/components/VirtualBackgroundBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/VirtualBackgroundModalContent.d.ts +6 -0
- package/lib/typescript/components/VirtualBackgroundModalContent.d.ts.map +1 -0
- 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/modules/imagePickerWrapper.d.ts +6 -0
- package/lib/typescript/modules/imagePickerWrapper.d.ts.map +1 -0
- package/lib/typescript/modules/videoPluginWrapper.d.ts +19 -0
- package/lib/typescript/modules/videoPluginWrapper.d.ts.map +1 -0
- package/lib/typescript/redux/actionTypes.d.ts +4 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +22 -1
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +4 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +2 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts +13 -2
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +4 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/utils/functions.d.ts +2 -0
- package/lib/typescript/utils/functions.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +10 -3
- package/src/HMSInstanceSetup.tsx +17 -4
- package/src/HMSRoomSetup.tsx +21 -0
- package/src/Icons/AddImage/assets/add-image.png +0 -0
- package/src/Icons/AddImage/assets/add-image@2x.png +0 -0
- package/src/Icons/AddImage/assets/add-image@3x.png +0 -0
- package/src/Icons/AddImage/index.tsx +33 -0
- package/src/Icons/BlurPeople/assets/blur-people.png +0 -0
- package/src/Icons/BlurPeople/assets/blur-people@2x.png +0 -0
- package/src/Icons/BlurPeople/assets/blur-people@3x.png +0 -0
- package/src/Icons/BlurPeople/index.tsx +33 -0
- package/src/Icons/CrossCircle/assets/cross-circle-large.png +0 -0
- package/src/Icons/CrossCircle/assets/cross-circle-large@2x.png +0 -0
- package/src/Icons/CrossCircle/assets/cross-circle-large@3x.png +0 -0
- package/src/Icons/CrossCircle/index.tsx +19 -3
- 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/Icons/VirtualBackground/assets/virtual-background.png +0 -0
- package/src/Icons/VirtualBackground/assets/virtual-background@2x.png +0 -0
- package/src/Icons/VirtualBackground/assets/virtual-background@3x.png +0 -0
- package/src/Icons/VirtualBackground/index.tsx +33 -0
- package/src/Icons/index.ts +3 -0
- package/src/components/Chat/ChatMessage.tsx +19 -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/HLSDescriptionPane.tsx +2 -33
- package/src/components/HLSPlayerContainer.tsx +15 -7
- package/src/components/HMSHLSMessage.tsx +16 -1
- package/src/components/HMSManageCameraRotation.tsx +18 -4
- package/src/components/HMSManageLocalVideo.tsx +20 -4
- package/src/components/HMSManageVirtualBackground.tsx +76 -0
- package/src/components/HMSOverlayMessageView.tsx +16 -1
- package/src/components/HMSRoomOptions.tsx +3 -0
- package/src/components/MeetingScreenContent.tsx +28 -2
- package/src/components/Preview.tsx +12 -5
- package/src/components/RoomSettingsModalContent.tsx +108 -2
- package/src/components/TilesContainer.tsx +7 -5
- package/src/components/VirtualBackgroundBottomSheet.tsx +62 -0
- package/src/components/VirtualBackgroundModalContent.tsx +500 -0
- 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/modules/imagePickerWrapper.ts +20 -0
- package/src/modules/videoPluginWrapper.ts +32 -0
- package/src/redux/actionTypes.ts +8 -0
- package/src/redux/actions/index.ts +22 -0
- package/src/redux/reducers/appState.ts +16 -0
- package/src/redux/reducers/hmsStates.ts +29 -1
- package/src/utils/{functions.ts → functions.tsx} +34 -0
- package/src/utils/types.ts +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Platform, View } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { WebView } from 'react-native-webview';
|
|
5
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
6
|
+
|
|
7
|
+
import type { RootState } from '../redux';
|
|
8
|
+
import { Whiteboard } from './Whiteboard';
|
|
9
|
+
|
|
10
|
+
export type WhiteboardContainerProps = {};
|
|
11
|
+
|
|
12
|
+
export const _WhiteboardContainer = React.forwardRef<
|
|
13
|
+
React.RefObject<React.ElementRef<typeof WebView> | null>,
|
|
14
|
+
WhiteboardContainerProps
|
|
15
|
+
>((_props, webviewRef) => {
|
|
16
|
+
const fullScreenWhiteboard = useSelector(
|
|
17
|
+
(state: RootState) => state.app.fullScreenWhiteboard
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View style={{ flex: 1, marginBottom: 4 }}>
|
|
22
|
+
{fullScreenWhiteboard ? null : Platform.OS === 'ios' ? (
|
|
23
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
24
|
+
<View collapsable={false} style={{ flex: 1 }}>
|
|
25
|
+
<Whiteboard ref={webviewRef} />
|
|
26
|
+
</View>
|
|
27
|
+
</GestureDetector>
|
|
28
|
+
) : (
|
|
29
|
+
<Whiteboard ref={webviewRef} />
|
|
30
|
+
)}
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const WhiteboardContainer = React.memo(_WhiteboardContainer);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
|
|
5
|
+
import { PressableIcon } from './PressableIcon';
|
|
6
|
+
import { MaximizeIcon, MinimizeIcon } from '../Icons';
|
|
7
|
+
import { useHMSRoomStyle } from '../hooks-util';
|
|
8
|
+
import { hexToRgbA } from '../utils/theme';
|
|
9
|
+
import type { RootState } from '../redux';
|
|
10
|
+
import { setFullScreenWhiteboard } from '../redux/actions';
|
|
11
|
+
|
|
12
|
+
export interface WhiteboardFullScreenButtonProps {}
|
|
13
|
+
|
|
14
|
+
export const WhiteboardFullScreenButton: React.FC<
|
|
15
|
+
WhiteboardFullScreenButtonProps
|
|
16
|
+
> = () => {
|
|
17
|
+
const dispatch = useDispatch();
|
|
18
|
+
const fullScreenWhiteboard = useSelector(
|
|
19
|
+
(state: RootState) => state.app.fullScreenWhiteboard
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
const buttonStyles = useHMSRoomStyle((theme) => ({
|
|
23
|
+
backgroundColor:
|
|
24
|
+
theme.palette.background_dim &&
|
|
25
|
+
hexToRgbA(theme.palette.background_dim, 0.64),
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
const maximizeAction = !fullScreenWhiteboard;
|
|
29
|
+
|
|
30
|
+
const handleFullScreenPress = () => {
|
|
31
|
+
dispatch(setFullScreenWhiteboard(!fullScreenWhiteboard));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<PressableIcon
|
|
36
|
+
border={false}
|
|
37
|
+
onPress={handleFullScreenPress}
|
|
38
|
+
style={[styles.container, buttonStyles]}
|
|
39
|
+
>
|
|
40
|
+
{maximizeAction ? <MaximizeIcon /> : <MinimizeIcon />}
|
|
41
|
+
</PressableIcon>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const styles = StyleSheet.create({
|
|
46
|
+
container: {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
top: 8,
|
|
49
|
+
right: 8,
|
|
50
|
+
padding: 8,
|
|
51
|
+
},
|
|
52
|
+
});
|
package/src/hooks-util.ts
CHANGED
|
@@ -601,9 +601,11 @@ const useHMSTrackUpdate = (
|
|
|
601
601
|
const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
|
|
602
602
|
const localPeerTrackNode = reduxState.app.localPeerTrackNode;
|
|
603
603
|
|
|
604
|
+
const localPeerRole = reduxState.hmsStates.localPeer?.role ?? null;
|
|
605
|
+
|
|
604
606
|
const currentLayoutConfig = selectLayoutConfigForRole(
|
|
605
607
|
reduxState.hmsStates.layoutConfig,
|
|
606
|
-
|
|
608
|
+
localPeerRole
|
|
607
609
|
);
|
|
608
610
|
|
|
609
611
|
const localTileInsetEnabled =
|
|
@@ -617,6 +619,26 @@ const useHMSTrackUpdate = (
|
|
|
617
619
|
if (!peer.isLocal && track.type === HMSTrackType.VIDEO) {
|
|
618
620
|
dispatch(addScreenshareTile(newPeerTrackNode));
|
|
619
621
|
}
|
|
622
|
+
if (track.type === HMSTrackType.VIDEO) {
|
|
623
|
+
const whiteboard = reduxState.hmsStates.whiteboard;
|
|
624
|
+
// If white board is open and local peer is owner, close whiteboard
|
|
625
|
+
if (
|
|
626
|
+
whiteboard &&
|
|
627
|
+
// Is local peer has whiteboard admin permission
|
|
628
|
+
!!localPeerRole?.permissions?.whiteboard?.admin &&
|
|
629
|
+
// Is local peer owner of whiteboard
|
|
630
|
+
whiteboard.isOwner
|
|
631
|
+
) {
|
|
632
|
+
hmsInstance.interactivityCenter
|
|
633
|
+
.stopWhiteboard()
|
|
634
|
+
.then((success) => {
|
|
635
|
+
console.log('StopWhiteboard on Screenshare: ', success);
|
|
636
|
+
})
|
|
637
|
+
.catch((error) => {
|
|
638
|
+
console.log('StopWhiteboard error: ', error);
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
}
|
|
620
642
|
} else {
|
|
621
643
|
setPeerTrackNodes((prevPeerTrackNodes) => {
|
|
622
644
|
if (
|
|
@@ -3100,6 +3122,11 @@ export const useCanShowRoomOptionsButton = () => {
|
|
|
3100
3122
|
return permissions?.pollRead || permissions?.pollWrite;
|
|
3101
3123
|
});
|
|
3102
3124
|
|
|
3125
|
+
const canStartStopWhiteboard = useSelector((state: RootState) => {
|
|
3126
|
+
const permissions = state.hmsStates.localPeer?.role?.permissions;
|
|
3127
|
+
return permissions?.whiteboard?.admin;
|
|
3128
|
+
});
|
|
3129
|
+
|
|
3103
3130
|
const { canShowParticipants } = useShowChatAndParticipants();
|
|
3104
3131
|
|
|
3105
3132
|
const canEditUsernameFromRoomModal = isViewer && !editUsernameDisabled;
|
|
@@ -3111,15 +3138,18 @@ export const useCanShowRoomOptionsButton = () => {
|
|
|
3111
3138
|
canStartRecording ||
|
|
3112
3139
|
canEditUsernameFromRoomModal ||
|
|
3113
3140
|
canReadOrWritePoll ||
|
|
3141
|
+
canStartStopWhiteboard ||
|
|
3114
3142
|
isNoiseCancellationAvailable;
|
|
3115
3143
|
|
|
3116
3144
|
return canShowOptions;
|
|
3117
3145
|
};
|
|
3118
3146
|
|
|
3119
3147
|
export const useHLSViewsConstraints = () => {
|
|
3120
|
-
const
|
|
3121
|
-
|
|
3122
|
-
|
|
3148
|
+
const fullScreenMode = useSelector((state: RootState) => {
|
|
3149
|
+
const hlsFullScreen = state.app.hlsFullScreen;
|
|
3150
|
+
const isPipModeActive = state.app.pipModeStatus === PipModes.ACTIVE;
|
|
3151
|
+
return hlsFullScreen || isPipModeActive;
|
|
3152
|
+
});
|
|
3123
3153
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
3124
3154
|
const { width: safeAreaWidthFrame, height: safeAreaHeightFrame } =
|
|
3125
3155
|
useSafeAreaFrame();
|
|
@@ -3130,7 +3160,7 @@ export const useHLSViewsConstraints = () => {
|
|
|
3130
3160
|
right: rightInset,
|
|
3131
3161
|
} = useSafeAreaInsets();
|
|
3132
3162
|
|
|
3133
|
-
const playerWrapperConstraints =
|
|
3163
|
+
const playerWrapperConstraints = fullScreenMode
|
|
3134
3164
|
? {
|
|
3135
3165
|
width: safeAreaWidthFrame - leftInset - rightInset,
|
|
3136
3166
|
height: isLandscapeOrientation
|
|
@@ -3165,9 +3195,11 @@ export const useHLSViewsConstraints = () => {
|
|
|
3165
3195
|
};
|
|
3166
3196
|
|
|
3167
3197
|
export const useHLSPlayerConstraints = () => {
|
|
3168
|
-
const
|
|
3169
|
-
|
|
3170
|
-
|
|
3198
|
+
const fullScreenMode = useSelector((state: RootState) => {
|
|
3199
|
+
const hlsFullScreen = state.app.hlsFullScreen;
|
|
3200
|
+
const isPipModeActive = state.app.pipModeStatus === PipModes.ACTIVE;
|
|
3201
|
+
return hlsFullScreen || isPipModeActive;
|
|
3202
|
+
});
|
|
3171
3203
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
3172
3204
|
|
|
3173
3205
|
const resolution = useHMSHLSPlayerResolution();
|
|
@@ -3205,7 +3237,7 @@ export const useHLSPlayerConstraints = () => {
|
|
|
3205
3237
|
/**
|
|
3206
3238
|
* Handling Portrait Orientation
|
|
3207
3239
|
*/
|
|
3208
|
-
if (
|
|
3240
|
+
if (fullScreenMode) {
|
|
3209
3241
|
return {
|
|
3210
3242
|
width: sr > wr ? wrapperWidth : wrapperHeight * sr,
|
|
3211
3243
|
height: sr > wr ? wrapperWidth / sr : wrapperHeight,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
let ImagePicker:
|
|
2
|
+
| {
|
|
3
|
+
launchCamera: (options: Record<string, any>) => Promise<any>;
|
|
4
|
+
launchImageLibrary: (options: Record<string, any>) => Promise<any>;
|
|
5
|
+
}
|
|
6
|
+
| undefined;
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
ImagePicker = require('react-native-image-picker');
|
|
10
|
+
} catch (error) {
|
|
11
|
+
ImagePicker = undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (!ImagePicker?.launchCamera || !ImagePicker?.launchImageLibrary) {
|
|
15
|
+
// Make sure the loaded module is actually `react-native-image-picker`, if it's not
|
|
16
|
+
// reset the module to undefined so we can fallback to the default implementation
|
|
17
|
+
ImagePicker = undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { ImagePicker };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ImageRequireSource, ImageURISource } from 'react-native';
|
|
2
|
+
|
|
3
|
+
export declare class HMSVideoPlugin {
|
|
4
|
+
protected type: string;
|
|
5
|
+
constructor(pluginType: string);
|
|
6
|
+
protected get nativeModule(): any;
|
|
7
|
+
enable(): Promise<boolean>;
|
|
8
|
+
disable(): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare class HMSVirtualBackgroundPlugin extends HMSVideoPlugin {
|
|
12
|
+
static NAME: string;
|
|
13
|
+
constructor();
|
|
14
|
+
setBlur(blurRadius: number): Promise<boolean>;
|
|
15
|
+
setBackground(
|
|
16
|
+
backgroundImage: ImageURISource | ImageRequireSource
|
|
17
|
+
): Promise<boolean>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let VideoPlugin:
|
|
21
|
+
| {
|
|
22
|
+
HMSVirtualBackgroundPlugin: typeof HMSVirtualBackgroundPlugin;
|
|
23
|
+
}
|
|
24
|
+
| undefined;
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
VideoPlugin = require('@100mslive/react-native-video-plugin');
|
|
28
|
+
} catch (error) {
|
|
29
|
+
VideoPlugin = undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { VideoPlugin };
|
package/src/redux/actionTypes.ts
CHANGED
|
@@ -66,6 +66,8 @@ const UPDATE_MINI_VIEW_PEERTRACKNODE = 'UPDATE_MINI_VIEW_PEERTRACKNODE';
|
|
|
66
66
|
|
|
67
67
|
const SET_FULLSCREEN_PEERTRACKNODE = 'SET_FULLSCREEN_PEERTRACKNODE';
|
|
68
68
|
|
|
69
|
+
const SET_FULLSCREEN_WHITEBOARD = 'SET_FULLSCREEN_WHITEBOARD';
|
|
70
|
+
|
|
69
71
|
const UPDATE_FULLSCREEN_PEERTRACKNODE = 'UPDATE_FULLSCREEN_PEERTRACKNODE';
|
|
70
72
|
|
|
71
73
|
const SET_LOCAL_PEERTRACKNODE = 'SET_LOCAL_PEERTRACKNODE';
|
|
@@ -115,6 +117,8 @@ const SET_HLS_FULL_SCREEN = 'SET_HLS_FULL_SCREEN';
|
|
|
115
117
|
|
|
116
118
|
const SET_ANDROID_HLS_STREAM_PAUSED = 'SET_ANDROID_HLS_STREAM_PAUSED';
|
|
117
119
|
|
|
120
|
+
const SET_SELECTED_VIRTUAL_BG = 'SET_SELECTED_VIRTUAL_BG';
|
|
121
|
+
|
|
118
122
|
const FILTER_OUT_BLOCKED_MSGS = 'FILTER_OUT_BLOCKED_MSGS';
|
|
119
123
|
|
|
120
124
|
export default {
|
|
@@ -143,6 +147,7 @@ export default {
|
|
|
143
147
|
SET_MINI_VIEW_PEERTRACKNODE,
|
|
144
148
|
UPDATE_MINI_VIEW_PEERTRACKNODE,
|
|
145
149
|
SET_FULLSCREEN_PEERTRACKNODE,
|
|
150
|
+
SET_FULLSCREEN_WHITEBOARD,
|
|
146
151
|
UPDATE_FULLSCREEN_PEERTRACKNODE,
|
|
147
152
|
SET_LOCAL_PEERTRACKNODE,
|
|
148
153
|
UPDATE_LOCAL_PEERTRACKNODE,
|
|
@@ -167,6 +172,7 @@ export default {
|
|
|
167
172
|
SET_HLS_DESC_PANE_VISIBLE,
|
|
168
173
|
SET_HLS_FULL_SCREEN,
|
|
169
174
|
SET_ANDROID_HLS_STREAM_PAUSED,
|
|
175
|
+
SET_SELECTED_VIRTUAL_BG,
|
|
170
176
|
FILTER_OUT_BLOCKED_MSGS,
|
|
171
177
|
};
|
|
172
178
|
|
|
@@ -195,6 +201,8 @@ export enum HmsStateActionTypes {
|
|
|
195
201
|
SET_ACTIVE_SPEAKERS = 'SET_ACTIVE_SPEAKERS',
|
|
196
202
|
SET_RECONNECTING = 'SET_RECONNECTING',
|
|
197
203
|
SET_NOISE_CANCELLATION_PLUGIN = 'SET_NOISE_CANCELLATION_PLUGIN',
|
|
204
|
+
SET_VIDEO_PLUGIN = 'SET_VIDEO_PLUGIN',
|
|
205
|
+
SET_WHITEBOARD = 'SET_WHITEBOARD',
|
|
198
206
|
SET_INITIAL_ROLE = 'SET_INITIAL_ROLE',
|
|
199
207
|
}
|
|
200
208
|
|
|
@@ -14,7 +14,9 @@ import type {
|
|
|
14
14
|
HMSSDK,
|
|
15
15
|
HMSSessionStore,
|
|
16
16
|
HMSSpeaker,
|
|
17
|
+
HMSWhiteboard,
|
|
17
18
|
} from '@100mslive/react-native-hms';
|
|
19
|
+
import type { HMSVirtualBackgroundPlugin } from '../../modules/videoPluginWrapper';
|
|
18
20
|
import type { Layout } from '@100mslive/types-prebuilt';
|
|
19
21
|
|
|
20
22
|
import type {
|
|
@@ -285,6 +287,11 @@ export const setFullScreenPeerTrackNode = (
|
|
|
285
287
|
payload: { fullScreenPeerTrackNode },
|
|
286
288
|
});
|
|
287
289
|
|
|
290
|
+
export const setFullScreenWhiteboard = (fullScreenWhiteboard: boolean) => ({
|
|
291
|
+
type: actionTypes.SET_FULLSCREEN_WHITEBOARD,
|
|
292
|
+
payload: { fullScreenWhiteboard },
|
|
293
|
+
});
|
|
294
|
+
|
|
288
295
|
export const updateFullScreenPeerTrackNode = (
|
|
289
296
|
data: Partial<Omit<PeerTrackNode, 'id'>>
|
|
290
297
|
) => ({
|
|
@@ -439,6 +446,16 @@ export const setNoiseCancellationPlugin = (
|
|
|
439
446
|
noiseCancellationPlugin,
|
|
440
447
|
});
|
|
441
448
|
|
|
449
|
+
export const setVideoPlugin = (videoPlugin: HMSVirtualBackgroundPlugin) => ({
|
|
450
|
+
type: HmsStateActionTypes.SET_VIDEO_PLUGIN,
|
|
451
|
+
videoPlugin,
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
export const setWhiteboard = (whiteboard: HMSWhiteboard | null) => ({
|
|
455
|
+
type: HmsStateActionTypes.SET_WHITEBOARD,
|
|
456
|
+
whiteboard,
|
|
457
|
+
});
|
|
458
|
+
|
|
442
459
|
export const setHandleBackButton = (handleBackButton?: boolean) => ({
|
|
443
460
|
type: actionTypes.SET_HANDLE_BACK_BUTTON,
|
|
444
461
|
payload: { handleBackButton },
|
|
@@ -491,6 +508,11 @@ export const setAndroidHLSStreamPaused = (paused: boolean) => ({
|
|
|
491
508
|
payload: { hlsStreamPaused_android: paused },
|
|
492
509
|
});
|
|
493
510
|
|
|
511
|
+
export const setSelectedVirtualBackground = (vb: string | null) => ({
|
|
512
|
+
type: actionTypes.SET_SELECTED_VIRTUAL_BG,
|
|
513
|
+
payload: { selectedVirtualBackground: vb },
|
|
514
|
+
});
|
|
515
|
+
|
|
494
516
|
/**
|
|
495
517
|
* POLLS
|
|
496
518
|
*/
|
|
@@ -50,6 +50,7 @@ type IntialStateType = {
|
|
|
50
50
|
gridViewActivePage: number;
|
|
51
51
|
startingOrStoppingRecording: boolean;
|
|
52
52
|
fullScreenPeerTrackNode: null | PeerTrackNode;
|
|
53
|
+
fullScreenWhiteboard: boolean;
|
|
53
54
|
screensharePeerTrackNodes: PeerTrackNode[];
|
|
54
55
|
notifications: Notification[];
|
|
55
56
|
activeChatBottomSheetTab: (typeof ChatBottomSheetTabs)[number];
|
|
@@ -65,6 +66,7 @@ type IntialStateType = {
|
|
|
65
66
|
hlsDescriptionPaneVisible: boolean;
|
|
66
67
|
hlsFullScreen: boolean;
|
|
67
68
|
hlsStreamPaused_android: boolean;
|
|
69
|
+
selectedVirtualBackground: string | null;
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
const INITIAL_STATE: IntialStateType = {
|
|
@@ -90,6 +92,7 @@ const INITIAL_STATE: IntialStateType = {
|
|
|
90
92
|
gridViewActivePage: 0,
|
|
91
93
|
startingOrStoppingRecording: false,
|
|
92
94
|
fullScreenPeerTrackNode: null,
|
|
95
|
+
fullScreenWhiteboard: false,
|
|
93
96
|
screensharePeerTrackNodes: [],
|
|
94
97
|
notifications: [],
|
|
95
98
|
activeChatBottomSheetTab: ChatBottomSheetTabs[0],
|
|
@@ -105,6 +108,7 @@ const INITIAL_STATE: IntialStateType = {
|
|
|
105
108
|
hlsDescriptionPaneVisible: false,
|
|
106
109
|
hlsFullScreen: false,
|
|
107
110
|
hlsStreamPaused_android: false,
|
|
111
|
+
selectedVirtualBackground: null,
|
|
108
112
|
};
|
|
109
113
|
|
|
110
114
|
const appReducer = (
|
|
@@ -242,6 +246,12 @@ const appReducer = (
|
|
|
242
246
|
},
|
|
243
247
|
};
|
|
244
248
|
}
|
|
249
|
+
case ActionTypes.SET_FULLSCREEN_WHITEBOARD: {
|
|
250
|
+
return {
|
|
251
|
+
...state,
|
|
252
|
+
fullScreenWhiteboard: action.payload.fullScreenWhiteboard,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
245
255
|
case ActionTypes.SET_STARTING_HLS_STREAM:
|
|
246
256
|
return { ...state, startingHLSStream: action.payload.startingHLSStream };
|
|
247
257
|
case ActionTypes.SET_GRID_VIEW_ACTIVE_PAGE:
|
|
@@ -381,6 +391,12 @@ const appReducer = (
|
|
|
381
391
|
hlsStreamPaused_android: action.payload.hlsStreamPaused_android,
|
|
382
392
|
};
|
|
383
393
|
}
|
|
394
|
+
case ActionTypes.SET_SELECTED_VIRTUAL_BG: {
|
|
395
|
+
return {
|
|
396
|
+
...state,
|
|
397
|
+
selectedVirtualBackground: action.payload.selectedVirtualBackground,
|
|
398
|
+
};
|
|
399
|
+
}
|
|
384
400
|
case HmsStateActionTypes.CLEAR_STATES:
|
|
385
401
|
return INITIAL_STATE;
|
|
386
402
|
default:
|
|
@@ -6,7 +6,9 @@ import type {
|
|
|
6
6
|
HMSRoleChangeRequest,
|
|
7
7
|
HMSRoom,
|
|
8
8
|
HMSSpeaker,
|
|
9
|
+
HMSWhiteboard,
|
|
9
10
|
} from '@100mslive/react-native-hms';
|
|
11
|
+
import type { HMSVirtualBackgroundPlugin } from '../../modules/videoPluginWrapper';
|
|
10
12
|
import type { Layout } from '@100mslive/types-prebuilt';
|
|
11
13
|
import { HmsStateActionTypes } from '../actionTypes';
|
|
12
14
|
|
|
@@ -31,7 +33,9 @@ type ActionType =
|
|
|
31
33
|
| ReplaceParticipantsList
|
|
32
34
|
| SetActiveSpeakers
|
|
33
35
|
| SetReconnecting
|
|
34
|
-
| SetNoiseCancellationPlugin
|
|
36
|
+
| SetNoiseCancellationPlugin
|
|
37
|
+
| SetVideoPlugin
|
|
38
|
+
| SetWhiteboard;
|
|
35
39
|
|
|
36
40
|
type SetRoomAction = {
|
|
37
41
|
type: HmsStateActionTypes.SET_ROOM_STATE;
|
|
@@ -138,6 +142,16 @@ type SetNoiseCancellationPlugin = {
|
|
|
138
142
|
noiseCancellationPlugin: HMSNoiseCancellationPlugin;
|
|
139
143
|
};
|
|
140
144
|
|
|
145
|
+
type SetVideoPlugin = {
|
|
146
|
+
type: HmsStateActionTypes.SET_VIDEO_PLUGIN;
|
|
147
|
+
videoPlugin: HMSVirtualBackgroundPlugin;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
type SetWhiteboard = {
|
|
151
|
+
type: HmsStateActionTypes.SET_WHITEBOARD;
|
|
152
|
+
whiteboard: HMSWhiteboard | null;
|
|
153
|
+
};
|
|
154
|
+
|
|
141
155
|
type IntialStateType = {
|
|
142
156
|
isLocalAudioMuted: boolean | undefined;
|
|
143
157
|
isLocalVideoMuted: boolean | undefined;
|
|
@@ -153,6 +167,8 @@ type IntialStateType = {
|
|
|
153
167
|
layoutConfig: Layout[] | null;
|
|
154
168
|
roleChangeRequest: HMSRoleChangeRequest | null;
|
|
155
169
|
noiseCancellationPlugin: HMSNoiseCancellationPlugin | null;
|
|
170
|
+
videoPlugin: HMSVirtualBackgroundPlugin | null;
|
|
171
|
+
whiteboard: HMSWhiteboard | null;
|
|
156
172
|
};
|
|
157
173
|
|
|
158
174
|
const INITIAL_STATE: IntialStateType = {
|
|
@@ -170,6 +186,8 @@ const INITIAL_STATE: IntialStateType = {
|
|
|
170
186
|
layoutConfig: null,
|
|
171
187
|
roleChangeRequest: null,
|
|
172
188
|
noiseCancellationPlugin: null,
|
|
189
|
+
videoPlugin: null,
|
|
190
|
+
whiteboard: null,
|
|
173
191
|
};
|
|
174
192
|
|
|
175
193
|
const hmsStatesReducer = (
|
|
@@ -571,6 +589,16 @@ const hmsStatesReducer = (
|
|
|
571
589
|
...state,
|
|
572
590
|
noiseCancellationPlugin: action.noiseCancellationPlugin,
|
|
573
591
|
};
|
|
592
|
+
case HmsStateActionTypes.SET_VIDEO_PLUGIN:
|
|
593
|
+
return {
|
|
594
|
+
...state,
|
|
595
|
+
videoPlugin: action.videoPlugin,
|
|
596
|
+
};
|
|
597
|
+
case HmsStateActionTypes.SET_WHITEBOARD:
|
|
598
|
+
return {
|
|
599
|
+
...state,
|
|
600
|
+
whiteboard: action.whiteboard,
|
|
601
|
+
};
|
|
574
602
|
case HmsStateActionTypes.CLEAR_STATES:
|
|
575
603
|
return INITIAL_STATE;
|
|
576
604
|
default:
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
Dimensions,
|
|
4
4
|
PermissionsAndroid,
|
|
5
5
|
StatusBar,
|
|
6
|
+
Text,
|
|
6
7
|
} from 'react-native';
|
|
7
8
|
import Toast from 'react-native-simple-toast';
|
|
8
9
|
import {
|
|
@@ -23,6 +24,7 @@ import type {
|
|
|
23
24
|
} from '@100mslive/react-native-hms';
|
|
24
25
|
|
|
25
26
|
import type { PeerTrackNode } from './types';
|
|
27
|
+
import * as React from 'react';
|
|
26
28
|
|
|
27
29
|
export const getMeetingUrl = () =>
|
|
28
30
|
'https://yogi.app.100ms.live/streaming/meeting/nih-bkn-vek';
|
|
@@ -570,3 +572,35 @@ export function getLabelFromPollQuestionType(
|
|
|
570
572
|
return 'Short Answer';
|
|
571
573
|
}
|
|
572
574
|
}
|
|
575
|
+
|
|
576
|
+
export function splitLinksAndContent(
|
|
577
|
+
text: string,
|
|
578
|
+
{ pressHandler, style }: any
|
|
579
|
+
): string | (string | React.ReactElement)[] {
|
|
580
|
+
// Regular expression to find links in a string
|
|
581
|
+
const pattern = /(^|\s)http[s]?:\/\/\S+/g;
|
|
582
|
+
|
|
583
|
+
// Find all links in the text
|
|
584
|
+
const links = text.match(pattern) || [];
|
|
585
|
+
|
|
586
|
+
if (links.length <= 0) {
|
|
587
|
+
return text;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// Split the text into an array of links and content
|
|
591
|
+
const parts = text.replace(pattern, '^<link>^').split('^');
|
|
592
|
+
|
|
593
|
+
return parts.map((p, i) => {
|
|
594
|
+
if (p !== '<link>') {
|
|
595
|
+
return p;
|
|
596
|
+
}
|
|
597
|
+
const link = links.pop();
|
|
598
|
+
return link ? (
|
|
599
|
+
<Text key={link + i} onPress={() => pressHandler(link)} style={style}>
|
|
600
|
+
{link}
|
|
601
|
+
</Text>
|
|
602
|
+
) : (
|
|
603
|
+
p
|
|
604
|
+
);
|
|
605
|
+
});
|
|
606
|
+
}
|