@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
|
@@ -33,8 +33,8 @@ export const WebrtcView = /*#__PURE__*/React.forwardRef(({
|
|
|
33
33
|
|
|
34
34
|
// State to track active spotlight trackId
|
|
35
35
|
const spotlightTrackId = useSelector(state => state.user.spotlightTrackId);
|
|
36
|
-
const
|
|
37
|
-
const pairedPeers = useMemo(() => pairData(peerTrackNodes, isPortrait ?
|
|
36
|
+
const screenshareTilesOrWhiteboardAcive = useSelector(state => state.app.screensharePeerTrackNodes.length > 0 || !!state.hmsStates.whiteboard);
|
|
37
|
+
const pairedPeers = useMemo(() => pairData(peerTrackNodes, isPortrait ? screenshareTilesOrWhiteboardAcive ? MaxTilesInOnePage.IN_PORTRAIT_WITH_SCREENSHARES : MaxTilesInOnePage.IN_PORTRAIT : MaxTilesInOnePage.IN_LANDSCAPE, spotlightTrackId), [peerTrackNodes, screenshareTilesOrWhiteboardAcive, spotlightTrackId, isPortrait]);
|
|
38
38
|
const showWelcomeBanner = useSelector(state => !state.app.localPeerTrackNode && pairedPeers.length === 0);
|
|
39
39
|
const fullHeight = height - top - (isPortrait ? bottom : 0);
|
|
40
40
|
const smallHeight = isPortrait ? height - headerHeight - footerHeight : height;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","useSelector","useSafeAreaFrame","useSafeAreaInsets","Animated","interpolate","useAnimatedStyle","MaxTilesInOnePage","PipModes","pairData","GridView","PIPView","useIsPortraitOrientation","LocalPeerRegularVideoView","WelcomeInMeeting","OverlayContainer","OverlayedViews","useFooterHeight","useHeaderHeight","View","WebrtcView","forwardRef","offset","peerTrackNodes","handlePeerTileMorePress","gridViewRef","isPortrait","height","footerHeight","headerHeight","top","bottom","isPipModeActive","state","app","pipModeStatus","ACTIVE","spotlightTrackId","user","
|
|
1
|
+
{"version":3,"names":["React","useMemo","useSelector","useSafeAreaFrame","useSafeAreaInsets","Animated","interpolate","useAnimatedStyle","MaxTilesInOnePage","PipModes","pairData","GridView","PIPView","useIsPortraitOrientation","LocalPeerRegularVideoView","WelcomeInMeeting","OverlayContainer","OverlayedViews","useFooterHeight","useHeaderHeight","View","WebrtcView","forwardRef","offset","peerTrackNodes","handlePeerTileMorePress","gridViewRef","isPortrait","height","footerHeight","headerHeight","top","bottom","isPipModeActive","state","app","pipModeStatus","ACTIVE","spotlightTrackId","user","screenshareTilesOrWhiteboardAcive","screensharePeerTrackNodes","length","hmsStates","whiteboard","pairedPeers","IN_PORTRAIT_WITH_SCREENSHARES","IN_PORTRAIT","IN_LANDSCAPE","showWelcomeBanner","localPeerTrackNode","fullHeight","smallHeight","animatedStyles","value","headerPlaceholderAnimatedStyles","overlayedAnimatedStyles","createElement","customView","style","flex","ref","onPeerTileMorePress","onMoreOptionsPress","animatedStyle"],"sourceRoot":"../../../src","sources":["components/WebrtcView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,WAAW,QAAQ,aAAa;AACzC,SACEC,gBAAgB,EAChBC,iBAAiB,QACZ,gCAAgC;AAEvC,OAAOC,QAAQ,IACbC,WAAW,EACXC,gBAAgB,QACX,yBAAyB;AAEhC,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,gBAAgB;AAE5D,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,SAASC,QAAQ,QAAQ,YAAY;AAErC,OAAOC,OAAO,MAAM,WAAW;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,eAAe,QAAQ,UAAU;AAC1C,SAASC,IAAI,QAAQ,cAAc;AAQnC,OAAO,MAAMC,UAAU,gBAAGrB,KAAK,CAAC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AC,gBACzB1C,KAAA,CAAAyD,aAAA,CAAC3C,yBAAyB,MAAE,CAAC,GAC3B;IACL,CACF,CAAC;EAEN;EAEA,oBACEd,KAAA,CAAAyD,aAAA,CAACrC,IAAI;IAACuC,KAAK,EAAE;MAAEC,IAAI,EAAE;IAAE;EAAE,gBACvB5D,KAAA,CAAAyD,aAAA,CAACpD,QAAQ,CAACe,IAAI;IAACuC,KAAK,EAAEJ;EAAgC,CAAE,CAAC,eAEzDvD,KAAA,CAAAyD,aAAA,CAACpD,QAAQ,CAACe,IAAI;IAACuC,KAAK,EAAEN;EAAe,gBACnCrD,KAAA,CAAAyD,aAAA,CAACzC,gBAAgB,QACdiC,iBAAiB,gBAChBjD,KAAA,CAAAyD,aAAA,CAAC1C,gBAAgB,MAAE,CAAC,GAClB8B,WAAW,CAACH,MAAM,GAAG,CAAC,gBACxB1C,KAAA,CAAAyD,aAAA,CAAC9C,QAAQ;IACPkD,GAAG,EAAEnC,WAAY;IACjBoC,mBAAmB,EAAErC,uBAAwB;IAC7CoB,WAAW,EAAEA;EAAY,CAC1B,CAAC,gBAEF7C,KAAA,CAAAyD,aAAA,CAAC3C,yBAAyB;IACxBiD,kBAAkB,EAAEtC;EAAwB,CAC7C,CACF,eAEDzB,KAAA,CAAAyD,aAAA,CAACxC,cAAc;IACb+C,aAAa,EAAER,uBAAwB;IACvCjC,MAAM,EAAEA;EAAO,CAChB,CACe,CACL,CACX,CAAC;AAEX,CACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Platform, View } from 'react-native';
|
|
4
|
+
import { useSelector } from 'react-redux';
|
|
5
|
+
import { WebView } from 'react-native-webview';
|
|
6
|
+
import { PipModes } from '../utils/types';
|
|
7
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
8
|
+
import { WhiteboardFullScreenButton } from './WhiteboardFullScreenButton';
|
|
9
|
+
export const _Whiteboard = /*#__PURE__*/React.forwardRef((_props, webviewRef) => {
|
|
10
|
+
const localWebviewRef = React.useRef(null);
|
|
11
|
+
React.useImperativeHandle(webviewRef, () => localWebviewRef, []);
|
|
12
|
+
const whiteboardUrl = useSelector(state => {
|
|
13
|
+
var _state$hmsStates$whit;
|
|
14
|
+
return (_state$hmsStates$whit = state.hmsStates.whiteboard) === null || _state$hmsStates$whit === void 0 ? void 0 : _state$hmsStates$whit.url;
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//#region reconnection handling
|
|
18
|
+
let webviewError = React.useRef(null);
|
|
19
|
+
const webviewErrorHandler = React.useCallback(e => {
|
|
20
|
+
webviewError.current = e.nativeEvent;
|
|
21
|
+
}, []);
|
|
22
|
+
if (Platform.OS === 'ios') {
|
|
23
|
+
const prevReconnecting = React.useRef(null);
|
|
24
|
+
const reconnecting = useSelector(state => state.hmsStates.reconnecting);
|
|
25
|
+
if (whiteboardUrl && localWebviewRef.current !== null && webviewError.current !== null && prevReconnecting.current === true && reconnecting === false) {
|
|
26
|
+
localWebviewRef.current.reload();
|
|
27
|
+
}
|
|
28
|
+
prevReconnecting.current = reconnecting;
|
|
29
|
+
}
|
|
30
|
+
//#endregion reconnection handling
|
|
31
|
+
|
|
32
|
+
const isPipModeActive = useSelector(state => state.app.pipModeStatus === PipModes.ACTIVE);
|
|
33
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
34
|
+
if (!whiteboardUrl) return null;
|
|
35
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
position: 'relative'
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/React.createElement(HMSWebView, {
|
|
41
|
+
ref: localWebviewRef,
|
|
42
|
+
url: whiteboardUrl,
|
|
43
|
+
onError: webviewErrorHandler
|
|
44
|
+
}), isPipModeActive || isLandscapeOrientation ? null : /*#__PURE__*/React.createElement(WhiteboardFullScreenButton, null));
|
|
45
|
+
});
|
|
46
|
+
export const Whiteboard = /*#__PURE__*/React.memo(_Whiteboard);
|
|
47
|
+
|
|
48
|
+
//# Memoized Webview
|
|
49
|
+
|
|
50
|
+
const _HMSWebView = /*#__PURE__*/React.forwardRef((props, webviewRef) => {
|
|
51
|
+
return /*#__PURE__*/React.createElement(WebView, _extends({
|
|
52
|
+
ref: webviewRef,
|
|
53
|
+
source: {
|
|
54
|
+
uri: props.url
|
|
55
|
+
},
|
|
56
|
+
style: {
|
|
57
|
+
flex: 1
|
|
58
|
+
},
|
|
59
|
+
javaScriptEnabled: true,
|
|
60
|
+
domStorageEnabled: true
|
|
61
|
+
}, props));
|
|
62
|
+
});
|
|
63
|
+
const HMSWebView = /*#__PURE__*/React.memo(_HMSWebView);
|
|
64
|
+
//# sourceMappingURL=Whiteboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Platform","View","useSelector","WebView","PipModes","useIsLandscapeOrientation","WhiteboardFullScreenButton","_Whiteboard","forwardRef","_props","webviewRef","localWebviewRef","useRef","useImperativeHandle","whiteboardUrl","state","_state$hmsStates$whit","hmsStates","whiteboard","url","webviewError","webviewErrorHandler","useCallback","e","current","nativeEvent","OS","prevReconnecting","reconnecting","reload","isPipModeActive","app","pipModeStatus","ACTIVE","isLandscapeOrientation","createElement","style","flex","position","HMSWebView","ref","onError","Whiteboard","memo","_HMSWebView","props","_extends","source","uri","javaScriptEnabled","domStorageEnabled"],"sourceRoot":"../../../src","sources":["components/Whiteboard.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,OAAO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
import * as React from 'react';
|
|
2
|
+
import { Platform, View } from 'react-native';
|
|
3
|
+
import { useSelector } from 'react-redux';
|
|
4
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
5
|
+
import { Whiteboard } from './Whiteboard';
|
|
6
|
+
export const _WhiteboardContainer = /*#__PURE__*/React.forwardRef((_props, webviewRef) => {
|
|
7
|
+
const fullScreenWhiteboard = useSelector(state => state.app.fullScreenWhiteboard);
|
|
8
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
9
|
+
style: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
marginBottom: 4
|
|
12
|
+
}
|
|
13
|
+
}, fullScreenWhiteboard ? null : Platform.OS === 'ios' ? /*#__PURE__*/React.createElement(GestureDetector, {
|
|
14
|
+
gesture: Gesture.Tap()
|
|
15
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
16
|
+
collapsable: false,
|
|
17
|
+
style: {
|
|
18
|
+
flex: 1
|
|
19
|
+
}
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Whiteboard, {
|
|
21
|
+
ref: webviewRef
|
|
22
|
+
}))) : /*#__PURE__*/React.createElement(Whiteboard, {
|
|
23
|
+
ref: webviewRef
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
export const WhiteboardContainer = /*#__PURE__*/React.memo(_WhiteboardContainer);
|
|
27
|
+
//# sourceMappingURL=WhiteboardContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Platform","View","useSelector","GestureDetector","Gesture","Whiteboard","_WhiteboardContainer","forwardRef","_props","webviewRef","fullScreenWhiteboard","state","app","createElement","style","flex","marginBottom","OS","gesture","Tap","collapsable","ref","WhiteboardContainer","memo"],"sourceRoot":"../../../src","sources":["components/WhiteboardContainer.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,IAAI,QAAQ,cAAc;AAC7C,SAASC,WAAW,QAAQ,aAAa;AAEzC,SAASC,eAAe,EAAEC,OAAO,QAAQ,8BAA8B;AAGvE,SAASC,UAAU,QAAQ,cAAc;AAIzC,OAAO,MAAMC,oBAAoB,gBAAGP,KAAK,CAACQ,UAAU,CAGlD,CAACC,MAAM,EAAEC,UAAU,KAAK;EACxB,MAAMC,oBAAoB,GAAGR,WAAW,CACrCS,KAAgB,IAAKA,KAAK,CAACC,GAAG,CAACF,oBAClC,CAAC;EAED,oBACEX,KAAA,CAAAc,aAAA,CAACZ,IAAI;IAACa,KAAK,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,YAAY,EAAE;IAAE;EAAE,GACvCN,oBAAoB,GAAG,IAAI,GAAGV,QAAQ,CAACiB,EAAE,KAAK,KAAK,gBAClDlB,KAAA,CAAAc,aAAA,CAACV,eAAe;IAACe,OAAO,EAAEd,OAAO,CAACe,GAAG,CAAC;EAAE,gBACtCpB,KAAA,CAAAc,aAAA,CAACZ,IAAI;IAACmB,WAAW,EAAE,KAAM;IAACN,KAAK,EAAE;MAAEC,IAAI,EAAE;IAAE;EAAE,gBAC3ChB,KAAA,CAAAc,aAAA,CAACR,UAAU;IAACgB,GAAG,EAAEZ;EAAW,CAAE,CAC1B,CACS,CAAC,gBAElBV,KAAA,CAAAc,aAAA,CAACR,UAAU;IAACgB,GAAG,EAAEZ;EAAW,CAAE,CAE5B,CAAC;AAEX,CAAC,CAAC;AAEF,OAAO,MAAMa,mBAAmB,gBAAGvB,KAAK,CAACwB,IAAI,CAACjB,oBAAoB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import { PressableIcon } from './PressableIcon';
|
|
5
|
+
import { MaximizeIcon, MinimizeIcon } from '../Icons';
|
|
6
|
+
import { useHMSRoomStyle } from '../hooks-util';
|
|
7
|
+
import { hexToRgbA } from '../utils/theme';
|
|
8
|
+
import { setFullScreenWhiteboard } from '../redux/actions';
|
|
9
|
+
export const WhiteboardFullScreenButton = () => {
|
|
10
|
+
const dispatch = useDispatch();
|
|
11
|
+
const fullScreenWhiteboard = useSelector(state => state.app.fullScreenWhiteboard);
|
|
12
|
+
const buttonStyles = useHMSRoomStyle(theme => ({
|
|
13
|
+
backgroundColor: theme.palette.background_dim && hexToRgbA(theme.palette.background_dim, 0.64)
|
|
14
|
+
}));
|
|
15
|
+
const maximizeAction = !fullScreenWhiteboard;
|
|
16
|
+
const handleFullScreenPress = () => {
|
|
17
|
+
dispatch(setFullScreenWhiteboard(!fullScreenWhiteboard));
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/React.createElement(PressableIcon, {
|
|
20
|
+
border: false,
|
|
21
|
+
onPress: handleFullScreenPress,
|
|
22
|
+
style: [styles.container, buttonStyles]
|
|
23
|
+
}, maximizeAction ? /*#__PURE__*/React.createElement(MaximizeIcon, null) : /*#__PURE__*/React.createElement(MinimizeIcon, null));
|
|
24
|
+
};
|
|
25
|
+
const styles = StyleSheet.create({
|
|
26
|
+
container: {
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
top: 8,
|
|
29
|
+
right: 8,
|
|
30
|
+
padding: 8
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=WhiteboardFullScreenButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useDispatch","useSelector","PressableIcon","MaximizeIcon","MinimizeIcon","useHMSRoomStyle","hexToRgbA","setFullScreenWhiteboard","WhiteboardFullScreenButton","dispatch","fullScreenWhiteboard","state","app","buttonStyles","theme","backgroundColor","palette","background_dim","maximizeAction","handleFullScreenPress","createElement","border","onPress","style","styles","container","create","position","top","right","padding"],"sourceRoot":"../../../src","sources":["components/WhiteboardFullScreenButton.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,Q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RC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/hooks-util.js
CHANGED
|
@@ -323,7 +323,8 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
323
323
|
const fullScreenPeerTrackNode = reduxState.app.fullScreenPeerTrackNode;
|
|
324
324
|
const miniviewPeerTrackNode = reduxState.app.miniviewPeerTrackNode;
|
|
325
325
|
const localPeerTrackNode = reduxState.app.localPeerTrackNode;
|
|
326
|
-
const
|
|
326
|
+
const localPeerRole = ((_reduxState$hmsStates2 = reduxState.hmsStates.localPeer) === null || _reduxState$hmsStates2 === void 0 ? void 0 : _reduxState$hmsStates2.role) ?? null;
|
|
327
|
+
const currentLayoutConfig = selectLayoutConfigForRole(reduxState.hmsStates.layoutConfig, localPeerRole);
|
|
327
328
|
const localTileInsetEnabled = (_selectVideoTileLayou2 = selectVideoTileLayoutConfig(currentLayoutConfig)) === null || _selectVideoTileLayou2 === void 0 || (_selectVideoTileLayou2 = _selectVideoTileLayou2.grid) === null || _selectVideoTileLayou2 === void 0 ? void 0 : _selectVideoTileLayou2.enable_local_tile_inset;
|
|
328
329
|
if (type === HMSTrackUpdate.TRACK_ADDED) {
|
|
329
330
|
const newPeerTrackNode = createPeerTrackNode(peer, track);
|
|
@@ -331,6 +332,22 @@ const useHMSTrackUpdate = (hmsInstance, updateLocalPeer, setPeerTrackNodes) => {
|
|
|
331
332
|
if (!peer.isLocal && track.type === HMSTrackType.VIDEO) {
|
|
332
333
|
dispatch(addScreenshareTile(newPeerTrackNode));
|
|
333
334
|
}
|
|
335
|
+
if (track.type === HMSTrackType.VIDEO) {
|
|
336
|
+
var _localPeerRole$permis;
|
|
337
|
+
const whiteboard = reduxState.hmsStates.whiteboard;
|
|
338
|
+
// If white board is open and local peer is owner, close whiteboard
|
|
339
|
+
if (whiteboard &&
|
|
340
|
+
// Is local peer has whiteboard admin permission
|
|
341
|
+
!!(localPeerRole !== null && localPeerRole !== void 0 && (_localPeerRole$permis = localPeerRole.permissions) !== null && _localPeerRole$permis !== void 0 && (_localPeerRole$permis = _localPeerRole$permis.whiteboard) !== null && _localPeerRole$permis !== void 0 && _localPeerRole$permis.admin) &&
|
|
342
|
+
// Is local peer owner of whiteboard
|
|
343
|
+
whiteboard.isOwner) {
|
|
344
|
+
hmsInstance.interactivityCenter.stopWhiteboard().then(success => {
|
|
345
|
+
console.log('StopWhiteboard on Screenshare: ', success);
|
|
346
|
+
}).catch(error => {
|
|
347
|
+
console.log('StopWhiteboard error: ', error);
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
334
351
|
} else {
|
|
335
352
|
setPeerTrackNodes(prevPeerTrackNodes => {
|
|
336
353
|
if (peerTrackNodeExistForPeerAndTrack(prevPeerTrackNodes, peer, track)) {
|
|
@@ -2124,15 +2141,24 @@ export const useCanShowRoomOptionsButton = () => {
|
|
|
2124
2141
|
const permissions = (_state$hmsStates$loca10 = state.hmsStates.localPeer) === null || _state$hmsStates$loca10 === void 0 || (_state$hmsStates$loca10 = _state$hmsStates$loca10.role) === null || _state$hmsStates$loca10 === void 0 ? void 0 : _state$hmsStates$loca10.permissions;
|
|
2125
2142
|
return (permissions === null || permissions === void 0 ? void 0 : permissions.pollRead) || (permissions === null || permissions === void 0 ? void 0 : permissions.pollWrite);
|
|
2126
2143
|
});
|
|
2144
|
+
const canStartStopWhiteboard = useSelector(state => {
|
|
2145
|
+
var _state$hmsStates$loca11, _permissions$whiteboa;
|
|
2146
|
+
const permissions = (_state$hmsStates$loca11 = state.hmsStates.localPeer) === null || _state$hmsStates$loca11 === void 0 || (_state$hmsStates$loca11 = _state$hmsStates$loca11.role) === null || _state$hmsStates$loca11 === void 0 ? void 0 : _state$hmsStates$loca11.permissions;
|
|
2147
|
+
return permissions === null || permissions === void 0 || (_permissions$whiteboa = permissions.whiteboard) === null || _permissions$whiteboa === void 0 ? void 0 : _permissions$whiteboa.admin;
|
|
2148
|
+
});
|
|
2127
2149
|
const {
|
|
2128
2150
|
canShowParticipants
|
|
2129
2151
|
} = useShowChatAndParticipants();
|
|
2130
2152
|
const canEditUsernameFromRoomModal = isViewer && !editUsernameDisabled;
|
|
2131
|
-
const canShowOptions = canShowParticipants || canPublishScreen || canShowBRB || canStartRecording || canEditUsernameFromRoomModal || canReadOrWritePoll || isNoiseCancellationAvailable;
|
|
2153
|
+
const canShowOptions = canShowParticipants || canPublishScreen || canShowBRB || canStartRecording || canEditUsernameFromRoomModal || canReadOrWritePoll || canStartStopWhiteboard || isNoiseCancellationAvailable;
|
|
2132
2154
|
return canShowOptions;
|
|
2133
2155
|
};
|
|
2134
2156
|
export const useHLSViewsConstraints = () => {
|
|
2135
|
-
const
|
|
2157
|
+
const fullScreenMode = useSelector(state => {
|
|
2158
|
+
const hlsFullScreen = state.app.hlsFullScreen;
|
|
2159
|
+
const isPipModeActive = state.app.pipModeStatus === PipModes.ACTIVE;
|
|
2160
|
+
return hlsFullScreen || isPipModeActive;
|
|
2161
|
+
});
|
|
2136
2162
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
2137
2163
|
const {
|
|
2138
2164
|
width: safeAreaWidthFrame,
|
|
@@ -2144,7 +2170,7 @@ export const useHLSViewsConstraints = () => {
|
|
|
2144
2170
|
left: leftInset,
|
|
2145
2171
|
right: rightInset
|
|
2146
2172
|
} = useSafeAreaInsets();
|
|
2147
|
-
const playerWrapperConstraints =
|
|
2173
|
+
const playerWrapperConstraints = fullScreenMode ? {
|
|
2148
2174
|
width: safeAreaWidthFrame - leftInset - rightInset,
|
|
2149
2175
|
height: isLandscapeOrientation ? safeAreaHeightFrame : safeAreaHeightFrame - topInset - bottomInset
|
|
2150
2176
|
} : {
|
|
@@ -2163,7 +2189,11 @@ export const useHLSViewsConstraints = () => {
|
|
|
2163
2189
|
};
|
|
2164
2190
|
};
|
|
2165
2191
|
export const useHLSPlayerConstraints = () => {
|
|
2166
|
-
const
|
|
2192
|
+
const fullScreenMode = useSelector(state => {
|
|
2193
|
+
const hlsFullScreen = state.app.hlsFullScreen;
|
|
2194
|
+
const isPipModeActive = state.app.pipModeStatus === PipModes.ACTIVE;
|
|
2195
|
+
return hlsFullScreen || isPipModeActive;
|
|
2196
|
+
});
|
|
2167
2197
|
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
2168
2198
|
const resolution = useHMSHLSPlayerResolution();
|
|
2169
2199
|
const {
|
|
@@ -2196,7 +2226,7 @@ export const useHLSPlayerConstraints = () => {
|
|
|
2196
2226
|
/**
|
|
2197
2227
|
* Handling Portrait Orientation
|
|
2198
2228
|
*/
|
|
2199
|
-
if (
|
|
2229
|
+
if (fullScreenMode) {
|
|
2200
2230
|
return {
|
|
2201
2231
|
width: sr > wr ? wrapperWidth : wrapperHeight * sr,
|
|
2202
2232
|
height: sr > wr ? wrapperWidth / sr : wrapperHeight
|