@100mslive/react-native-room-kit 1.0.5 → 1.0.6
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 +1 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/components/AvatarView.js +0 -1
- package/lib/commonjs/components/AvatarView.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +13 -3
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatBanner.js +10 -3
- package/lib/commonjs/components/Chat/ChatBanner.js.map +1 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js +5 -1
- package/lib/commonjs/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +4 -1
- package/lib/commonjs/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/DefaultModal.js +9 -1
- package/lib/commonjs/components/DefaultModal.js.map +1 -1
- package/lib/commonjs/components/Footer.js +14 -4
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js +23 -9
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSMessageList.js +5 -2
- package/lib/commonjs/components/HMSHLSMessageList.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js +42 -0
- package/lib/commonjs/components/HMSKeyboardAvoidingView.android.js.map +1 -0
- package/lib/commonjs/components/HMSManageAudioOutput.js +0 -1
- package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +9 -1
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js +5 -4
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSTextInput.js +2 -3
- package/lib/commonjs/components/HMSTextInput.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +3 -1
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/MiniView.js +12 -13
- package/lib/commonjs/components/MiniView.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js +1 -0
- package/lib/commonjs/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js +0 -1
- package/lib/commonjs/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/VideoView.js +0 -1
- package/lib/commonjs/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/commonjs/components/Preview.js +2 -1
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js +3 -3
- package/lib/commonjs/components/TilesContainer.js.map +1 -1
- package/lib/commonjs/hooks-util.js +20 -3
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/utils/theme.js +0 -1
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/commonjs/utils.js +0 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +2 -1
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/components/AvatarView.js +0 -1
- package/lib/module/components/AvatarView.js.map +1 -1
- package/lib/module/components/BottomSheet.js +13 -3
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/Chat/ChatBanner.js +10 -3
- package/lib/module/components/Chat/ChatBanner.js.map +1 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js +5 -1
- package/lib/module/components/Chat/ChatFilterBottomSheetView.js.map +1 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js +4 -1
- package/lib/module/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.js.map +1 -1
- package/lib/module/components/DefaultModal.js +9 -1
- package/lib/module/components/DefaultModal.js.map +1 -1
- package/lib/module/components/Footer.js +14 -5
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js +24 -10
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HMSHLSMessageList.js +5 -2
- package/lib/module/components/HMSHLSMessageList.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.android.js +34 -0
- package/lib/module/components/HMSKeyboardAvoidingView.android.js.map +1 -0
- package/lib/module/components/HMSManageAudioOutput.js +0 -1
- package/lib/module/components/HMSManageAudioOutput.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +9 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSRecordingIndicator.js +5 -4
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSTextInput.js +2 -3
- package/lib/module/components/HMSTextInput.js.map +1 -1
- package/lib/module/components/LeaveRoomBottomSheet.js +1 -0
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +3 -1
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/MiniView.js +12 -13
- package/lib/module/components/MiniView.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsGroupHeader.js +1 -0
- package/lib/module/components/Participants/ParticipantsGroupHeader.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js +0 -1
- package/lib/module/components/PeerVideoTile/PeerNameAndNetwork.js.map +1 -1
- package/lib/module/components/PeerVideoTile/VideoView.js +0 -1
- package/lib/module/components/PeerVideoTile/VideoView.js.map +1 -1
- package/lib/module/components/Preview.js +2 -1
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/TilesContainer.js +3 -3
- package/lib/module/components/TilesContainer.js.map +1 -1
- package/lib/module/hooks-util.js +20 -3
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/utils/theme.js +0 -1
- package/lib/module/utils/theme.js.map +1 -1
- package/lib/module/utils.js +0 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/components/BottomSheet.d.ts +1 -0
- package/lib/typescript/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatBanner.d.ts.map +1 -1
- package/lib/typescript/components/Chat/ChatFilterBottomSheetView.d.ts.map +1 -1
- package/lib/typescript/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/DefaultModal.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSMessageList.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts +9 -0
- package/lib/typescript/components/HMSKeyboardAvoidingView.android.d.ts.map +1 -0
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSRecordingIndicator.d.ts.map +1 -1
- package/lib/typescript/components/HMSTextInput.d.ts.map +1 -1
- package/lib/typescript/components/MeetingScreenContent.d.ts.map +1 -1
- package/lib/typescript/components/MiniView.d.ts +2 -3
- package/lib/typescript/components/MiniView.d.ts.map +1 -1
- package/lib/typescript/components/TilesContainer.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +1 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/HMSRoomSetup.tsx +3 -0
- package/src/components/BottomSheet.tsx +43 -6
- package/src/components/Chat/ChatBanner.tsx +9 -0
- package/src/components/Chat/ChatFilterBottomSheetView.tsx +7 -1
- package/src/components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx +6 -1
- package/src/components/DefaultModal.tsx +12 -1
- package/src/components/Footer.tsx +17 -3
- package/src/components/GridView.tsx +27 -15
- package/src/components/HMSHLSMessageList.tsx +8 -2
- package/src/components/HMSKeyboardAvoidingView.android.tsx +49 -0
- package/src/components/HMSNotifications.tsx +11 -1
- package/src/components/HMSRecordingIndicator.tsx +11 -2
- package/src/components/HMSTextInput.tsx +1 -0
- package/src/components/MeetingScreenContent.tsx +3 -1
- package/src/components/MiniView.tsx +18 -15
- package/src/components/Preview.tsx +2 -2
- package/src/components/TilesContainer.tsx +9 -5
- package/src/hooks-util.ts +26 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Modal","StyleSheet","Text","TouchableOpacity","View","CloseIcon","useHMSRoomColorPalette","useHMSRoomStyle","useHMSRoomStyleSheet","BottomSheet","dismissModal","style","children","containerStyle","resetProps","background_dim","backgroundDimColor","containerStyles","theme","backgroundColor","palette","background_default","handleModalHideAction","useBottomSheetActionHandlers","createElement","_extends","animationIn","animationOut","backdropColor","backdropOpacity","onBackButtonPress","onBackdropPress","useNativeDriver","useNativeDriverForBackdrop","hideModalContentWhileAnimating","styles","modal","onModalHide","supportedOrientations","container","BottomSheetHeader","heading","subheading","headingTestID","subheadingTestID","closeIconTestID","hmsRoomStyles","typography","headerText","color","on_surface_high","fontFamily","font_family","subheadingText","on_surface_medium","header","testID","onPress","hitSlop","closeIconHitSlop","BottomSheetDivider","dividerStyles","border_default","divider","Header","Divider","onModalHideActionHandlerRef","handler","onModalHideActionRef","useRef","useCallback","current","useBottomSheetActions","registerOnModalHideAction","action","clearOnModalHideAction","create","margin","justifyContent","borderTopLeftRadius","borderTopRightRadius","paddingBottom","flexDirection","alignItems","marginTop","marginHorizontal","fontSize","lineHeight","letterSpacing","bottom","left","right","top","height","
|
|
1
|
+
{"version":3,"names":["React","Modal","StyleSheet","Text","TouchableOpacity","View","CloseIcon","useHMSRoomColorPalette","useHMSRoomStyle","useHMSRoomStyleSheet","useIsLandscapeOrientation","BottomSheet","dismissModal","fullWidth","style","children","containerStyle","resetProps","background_dim","backgroundDimColor","containerStyles","theme","backgroundColor","palette","background_default","handleModalHideAction","useBottomSheetActionHandlers","isLandscapeOrientation","createElement","_extends","animationIn","animationOut","backdropColor","backdropOpacity","onBackButtonPress","onBackdropPress","useNativeDriver","useNativeDriverForBackdrop","hideModalContentWhileAnimating","styles","modal","onModalHide","supportedOrientations","statusBarTranslucent","landscapeContainer","container","BottomSheetHeader","heading","subheading","headingTestID","subheadingTestID","closeIconTestID","hmsRoomStyles","typography","headerText","color","on_surface_high","fontFamily","font_family","subheadingText","on_surface_medium","header","testID","onPress","hitSlop","closeIconHitSlop","BottomSheetDivider","dividerStyles","border_default","divider","Header","Divider","onModalHideActionHandlerRef","handler","onModalHideActionRef","useRef","useCallback","current","useBottomSheetActions","registerOnModalHideAction","action","clearOnModalHideAction","create","margin","justifyContent","borderTopLeftRadius","borderTopRightRadius","paddingBottom","borderRadius","width","alignSelf","marginBottom","flexDirection","alignItems","marginTop","marginHorizontal","fontSize","lineHeight","letterSpacing","bottom","left","right","top","height","marginVertical"],"sourceRoot":"../../../src","sources":["components/BottomSheet.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,SAASC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAQvE,SAASC,SAAS,QAAQ,UAAU;AACpC,SACEC,sBAAsB,EACtBC,eAAe,EACfC,oBAAoB,QACf,eAAe;AACtB,SAASC,yBAAyB,QAAQ,oBAAoB;AAc9D,OAAO,MAAMC,WAGZ,GAAGA,CAAC;EACHC,YAAY;EACZC,SAAS,GAAG,KAAK;EACjBC,KAAK;EACLC,QAAQ;EACRC,cAAc;EACd,GAAGC;AACL,CAAC,KAAK;EACJ,MAAM;IAAEC,cAAc,EAAEC;EAAmB,CAAC,GAAGZ,sBAAsB,CAAC,CAAC;EAEvE,MAAMa,eAAe,GAAGZ,eAAe,CAAEa,KAAK,KAAM;IAClDC,eAAe,EAAED,KAAK,CAACE,OAAO,CAACC;EACjC,CAAC,CAAC,CAAC;EAEH,MAAM;IAAEC;EAAsB,CAAC,GAAGC,4BAA4B,C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,cAAc,EAAE;EAClB,CAAC;EACDvC,SAAS,EAAE;IACTwC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,aAAa,EAAE;EACjB,CAAC;EACD3C,kBAAkB,EAAE;IAClB4C,YAAY,EAAE,EAAE;IAChBD,aAAa,EAAE,EAAE;IACjBE,KAAK,EAAE,KAAK;IACZC,SAAS,EAAE,QAAQ;IACnBC,YAAY,EAAE;EAChB,CAAC;EACD9B,MAAM,EAAE;IACN+B,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBT,cAAc,EAAE,eAAe;IAC/BU,SAAS,EAAE,EAAE;IACbC,gBAAgB,EAAE;EACpB,CAAC;EACDzC,UAAU,EAAE;IACV0C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB,CAAC;EACDvC,cAAc,EAAE;IACdmC,SAAS,EAAE,CAAC;IACZE,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB,CAAC;EACDjC,gBAAgB,EAAE;IAChBkC,MAAM,EAAE,EAAE;IACVC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,GAAG,EAAE;EACP,CAAC;EACDjC,OAAO,EAAE;IACPkC,MAAM,EAAE,CAAC;IACTd,KAAK,EAAE,MAAM;IACbe,cAAc,EAAE;EAClB;AACF,CAAC,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View, StyleSheet, Text, Image } from 'react-native';
|
|
3
3
|
import { useHMSRoomStyleSheet } from '../../hooks-util';
|
|
4
|
+
import { useIsLandscapeOrientation } from '../../utils/dimension';
|
|
4
5
|
export const ChatBanner = () => {
|
|
6
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
5
7
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
6
8
|
title: {
|
|
7
9
|
color: theme.palette.on_surface_high,
|
|
@@ -15,7 +17,8 @@ export const ChatBanner = () => {
|
|
|
15
17
|
return /*#__PURE__*/React.createElement(View, {
|
|
16
18
|
style: styles.container
|
|
17
19
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
18
|
-
source: require('../../assets/empty-chat-illustration/empty-chat.png')
|
|
20
|
+
source: require('../../assets/empty-chat-illustration/empty-chat.png'),
|
|
21
|
+
style: isLandscapeOrientation ? styles.landscapeCoverImage : null
|
|
19
22
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
20
23
|
style: [styles.title, hmsRoomStyles.title]
|
|
21
24
|
}, "Start a Conversation"), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -26,10 +29,14 @@ const styles = StyleSheet.create({
|
|
|
26
29
|
container: {
|
|
27
30
|
flex: 1,
|
|
28
31
|
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center'
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
overflow: 'hidden'
|
|
30
34
|
// transform: [Platform.OS === 'android' ? { scale: -1 } : { scaleY: -1 }],
|
|
31
35
|
},
|
|
32
|
-
|
|
36
|
+
landscapeCoverImage: {
|
|
37
|
+
flexShrink: 1,
|
|
38
|
+
resizeMode: 'contain'
|
|
39
|
+
},
|
|
33
40
|
title: {
|
|
34
41
|
fontSize: 20,
|
|
35
42
|
lineHeight: 24,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","Text","Image","useHMSRoomStyleSheet","ChatBanner","hmsRoomStyles","theme","typography","title","color","palette","on_surface_high","fontFamily","font_family","subtitle","on_surface_medium","createElement","style","styles","container","source","require","create","flex","alignItems","justifyContent","fontSize","lineHeight","letterSpacing","textAlign","marginTop"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatBanner.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,UAAU,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAE5D,SAASC,oBAAoB,QAAQ,kBAAkB;
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Text","Image","useHMSRoomStyleSheet","useIsLandscapeOrientation","ChatBanner","isLandscapeOrientation","hmsRoomStyles","theme","typography","title","color","palette","on_surface_high","fontFamily","font_family","subtitle","on_surface_medium","createElement","style","styles","container","source","require","landscapeCoverImage","create","flex","alignItems","justifyContent","overflow","flexShrink","resizeMode","fontSize","lineHeight","letterSpacing","textAlign","marginTop"],"sourceRoot":"../../../../src","sources":["components/Chat/ChatBanner.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,UAAU,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AAE5D,SAASC,oBAAoB,QAAQ,kBAAkB;AACvD,SAASC,yBAAyB,QAAQ,uBAAuB;AAEjE,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC9B,MAAMC,sBAAsB,GAAGF,yBAAyB,CAAC,CAAC;EAE1D,MAAMG,aAAa,GAAGJ,oBAAoB,CAAC,CAACK,KAAK,EAAEC,UAAU,MAAM;IACjEC,KAAK,EAAE;MACLC,KAAK,EAAEH,KAAK,CAACI,OAAO,CAACC,eAAe;MACpCC,UAAU,EAAG,GAAEL,UAAU,CAACM,WAAY;IACxC,CAAC;IACDC,QAAQ,EAAE;MACRL,KAAK,EAAEH,KAAK,CAACI,OAAO,CAACK,iBAAiB;MACtCH,UAAU,EAAG,GAAEL,UAAU,CAACM,WAAY;IACxC;EACF,CAAC,CAAC,CAAC;EAEH,oBACEjB,KAAA,CAAAoB,aAAA,CAACnB,IAAI;IAACoB,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5BvB,KAAA,CAAAoB,aAAA,CAAChB,KAAK;IACJoB,MAAM,EAAEC,OAAO,CAAC,qDAAqD,CAAE;IACvEJ,KAAK,EAAEb,sBAAsB,GAAGc,MAAM,CAACI,mBAAmB,GAAG;EAAK,CACnE,CAAC,eACF1B,KAAA,CAAAoB,aAAA,CAACjB,IAAI;IAACkB,KAAK,EAAE,CAACC,MAAM,CAACV,KAAK,EAAEH,aAAa,CAACG,KAAK;EAAE,GAAC,sBAE5C,CAAC,eACPZ,KAAA,CAAAoB,aAAA,CAACjB,IAAI;IAACkB,KAAK,EAAE,CAACC,MAAM,CAACJ,QAAQ,EAAET,aAAa,CAACS,QAAQ;EAAE,GAAC,4EAGlD,CACF,CAAC;AAEX,CAAC;AAED,MAAMI,MAAM,GAAGpB,UAAU,CAACyB,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE;IACV;EACF,CAAC;EACDL,mBAAmB,EAAE;IACnBM,UAAU,EAAE,CAAC;IACbC,UAAU,EAAE;EACd,CAAC;EACDrB,KAAK,EAAE;IACLsB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE;EACb,CAAC;EACDpB,QAAQ,EAAE;IACRgB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC"}
|
|
@@ -6,8 +6,10 @@ import { hexToRgbA } from '../../utils/theme';
|
|
|
6
6
|
import { ChatFilterView } from './ChatFilterView';
|
|
7
7
|
import { useHMSRoomStyleSheet } from '../../hooks-util';
|
|
8
8
|
import { setChatFilterSheetVisible } from '../../redux/actions';
|
|
9
|
+
import { useIsLandscapeOrientation } from '../../utils/dimension';
|
|
9
10
|
const _ChatFilterBottomSheetView = ({}) => {
|
|
10
11
|
const dispatch = useDispatch();
|
|
12
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
11
13
|
const chatFilterSheetVisible = useSelector(state => state.app.chatFilterSheetVisible);
|
|
12
14
|
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
13
15
|
backdrop: {
|
|
@@ -31,7 +33,9 @@ const _ChatFilterBottomSheetView = ({}) => {
|
|
|
31
33
|
}), /*#__PURE__*/React.createElement(Animated.View, {
|
|
32
34
|
entering: SlideInDown,
|
|
33
35
|
exiting: SlideOutDown,
|
|
34
|
-
style: [styles.contentContainer, hmsRoomStyles.contentContainer
|
|
36
|
+
style: [styles.contentContainer, hmsRoomStyles.contentContainer, isLandscapeOrientation ? {
|
|
37
|
+
maxHeight: '88%'
|
|
38
|
+
} : null]
|
|
35
39
|
}, /*#__PURE__*/React.createElement(ChatFilterView, null)));
|
|
36
40
|
};
|
|
37
41
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","StyleSheet","View","useDispatch","useSelector","Animated","SlideInDown","SlideOutDown","hexToRgbA","ChatFilterView","useHMSRoomStyleSheet","setChatFilterSheetVisible","_ChatFilterBottomSheetView","dispatch","chatFilterSheetVisible","state","app","hmsRoomStyles","theme","backdrop","backgroundColor","palette","background_dim","contentContainer","surface_default","closeFiltersBottomSheet","createElement","style","styles","container","onPress","entering","exiting","create","position","width","height","zIndex","justifyContent","minHeight","
|
|
1
|
+
{"version":3,"names":["React","Pressable","StyleSheet","View","useDispatch","useSelector","Animated","SlideInDown","SlideOutDown","hexToRgbA","ChatFilterView","useHMSRoomStyleSheet","setChatFilterSheetVisible","useIsLandscapeOrientation","_ChatFilterBottomSheetView","dispatch","isLandscapeOrientation","chatFilterSheetVisible","state","app","hmsRoomStyles","theme","backdrop","backgroundColor","palette","background_dim","contentContainer","surface_default","closeFiltersBottomSheet","createElement","style","styles","container","onPress","entering","exiting","maxHeight","create","position","width","height","zIndex","justifyContent","minHeight","borderTopLeftRadius","borderTopRightRadius","ChatFilterBottomSheetView","memo"],"sourceRoot":"../../../../src","sources":["components/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,aAAA,CAAC5B,SAAS;IACRgC,OAAO,EAAEL,uBAAwB;IACjCE,KAAK,EAAE,CAACC,MAAM,CAACT,QAAQ,EAAEF,aAAa,CAACE,QAAQ;EAAE,CAClD,CAAC,eAEFtB,KAAA,CAAA6B,aAAA,CAACvB,QAAQ,CAACH,IAAI;IACZ+B,QAAQ,EAAE3B,WAAY;IACtB4B,OAAO,EAAE3B,YAAa;IACtBsB,KAAK,EAAE,CACLC,MAAM,CAACL,gBAAgB,EACvBN,aAAa,CAACM,gBAAgB,EAC9BV,sBAAsB,GAAG;MAAEoB,SAAS,EAAE;IAAM,CAAC,GAAG,IAAI;EACpD,gBAEFpC,KAAA,CAAA6B,aAAA,CAACnB,cAAc,MAAE,CACJ,CACX,CAAC;AAEX,CAAC;AAED,MAAMqB,MAAM,GAAG7B,UAAU,CAACmC,MAAM,CAAC;EAC/BL,SAAS,EAAE;IACTM,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,MAAM,EAAE,CAAC;IACTC,cAAc,EAAE;EAClB,CAAC;EACDpB,QAAQ,EAAE;IACRgB,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDd,gBAAgB,EAAE;IAChBa,KAAK,EAAE,MAAM;IACbI,SAAS,EAAE,GAAG;IACdP,SAAS,EAAE,KAAK;IAChBQ,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE;EACxB;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,yBAAyB,gBAAG9C,KAAK,CAAC+C,IAAI,CAACjC,0BAA0B,CAAC"}
|
|
@@ -5,21 +5,24 @@ import { BottomSheet } from '../BottomSheet';
|
|
|
5
5
|
import { useShowChatAndParticipants } from '../../hooks-util';
|
|
6
6
|
import { ChatAndParticipantsView } from './ChatAndParticipantsView';
|
|
7
7
|
import { HEADER_HEIGHT } from '../Header';
|
|
8
|
+
import { useIsLandscapeOrientation } from '../../utils/dimension';
|
|
8
9
|
export const ChatAndParticipantsBottomSheet = () => {
|
|
9
10
|
const {
|
|
10
11
|
top: topSafeArea
|
|
11
12
|
} = useSafeAreaInsets();
|
|
13
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
12
14
|
const {
|
|
13
15
|
modalVisible,
|
|
14
16
|
hide
|
|
15
17
|
} = useShowChatAndParticipants();
|
|
16
18
|
const closeChatWindow = () => hide('modal');
|
|
17
19
|
return /*#__PURE__*/React.createElement(BottomSheet, {
|
|
20
|
+
fullWidth: true,
|
|
18
21
|
dismissModal: closeChatWindow,
|
|
19
22
|
isVisible: modalVisible,
|
|
20
23
|
avoidKeyboard: true,
|
|
21
24
|
containerStyle: [styles.bottomSheet, {
|
|
22
|
-
marginTop: topSafeArea + HEADER_HEIGHT
|
|
25
|
+
marginTop: topSafeArea + (isLandscapeOrientation ? 0 : HEADER_HEIGHT)
|
|
23
26
|
}]
|
|
24
27
|
}, /*#__PURE__*/React.createElement(ChatAndParticipantsView, null));
|
|
25
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","useSafeAreaInsets","BottomSheet","useShowChatAndParticipants","ChatAndParticipantsView","HEADER_HEIGHT","ChatAndParticipantsBottomSheet","top","topSafeArea","modalVisible","hide","closeChatWindow","createElement","dismissModal","isVisible","avoidKeyboard","containerStyle","styles","bottomSheet","marginTop","create","flex","backgroundColor","undefined","paddingBottom"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,0BAA0B,QAAQ,kBAAkB;AAC7D,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,aAAa,QAAQ,WAAW;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","useSafeAreaInsets","BottomSheet","useShowChatAndParticipants","ChatAndParticipantsView","HEADER_HEIGHT","useIsLandscapeOrientation","ChatAndParticipantsBottomSheet","top","topSafeArea","isLandscapeOrientation","modalVisible","hide","closeChatWindow","createElement","fullWidth","dismissModal","isVisible","avoidKeyboard","containerStyle","styles","bottomSheet","marginTop","create","flex","backgroundColor","undefined","paddingBottom"],"sourceRoot":"../../../../src","sources":["components/ChatAndParticipants/ChatAndParticipantsBottomSheet.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,0BAA0B,QAAQ,kBAAkB;AAC7D,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,aAAa,QAAQ,WAAW;AACzC,SAASC,yBAAyB,QAAQ,uBAAuB;AAEjE,OAAO,MAAMC,8BAA8B,GAAGA,CAAA,KAAM;EAClD,MAAM;IAAEC,GAAG,EAAEC;EAAY,CAAC,GAAGR,iBAAiB,CAAC,CAAC;EAChD,MAAMS,sBAAsB,GAAGJ,yBAAyB,CAAC,CAAC;EAE1D,MAAM;IAAEK,YAAY;IAAEC;EAAK,CAAC,GAAGT,0BAA0B,CAAC,CAAC;EAE3D,MAAMU,eAAe,GAAGA,CAAA,KAAMD,IAAI,CAAC,OAAO,CAAC;EAE3C,oBACEb,KAAA,CAAAe,aAAA,CAACZ,WAAW;IACVa,SAAS,EAAE,IAAK;IAChBC,YAAY,EAAEH,eAAgB;IAC9BI,SAAS,EAAEN,YAAa;IACxBO,aAAa,EAAE,IAAK;IACpBC,cAAc,EAAE,CACdC,MAAM,CAACC,WAAW,EAClB;MACEC,SAAS,EAAEb,WAAW,IAAIC,sBAAsB,GAAG,CAAC,GAAGL,aAAa;IACtE,CAAC;EACD,gBAEFN,KAAA,CAAAe,aAAA,CAACV,uBAAuB,MAAE,CACf,CAAC;AAElB,CAAC;AAED,MAAMgB,MAAM,GAAGpB,UAAU,CAACuB,MAAM,CAAC;EAC/BF,WAAW,EAAE;IACXG,IAAI,EAAE,CAAC;IACPC,eAAe,EAAEC,SAAS;IAC1BC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
5
5
|
import { COLORS } from '../utils/theme';
|
|
6
6
|
import { CustomButton } from './CustomButton';
|
|
7
7
|
import { CloseIcon } from '../Icons';
|
|
8
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
8
9
|
export const DefaultModal = ({
|
|
9
10
|
modalVisible,
|
|
10
11
|
setModalVisible,
|
|
@@ -20,6 +21,7 @@ export const DefaultModal = ({
|
|
|
20
21
|
left,
|
|
21
22
|
right
|
|
22
23
|
} = useSafeAreaInsets();
|
|
24
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
23
25
|
return /*#__PURE__*/React.createElement(Modal, {
|
|
24
26
|
useNativeDriver: true,
|
|
25
27
|
useNativeDriverForBackdrop: true,
|
|
@@ -39,7 +41,7 @@ export const DefaultModal = ({
|
|
|
39
41
|
justifyContent: modalPosiion
|
|
40
42
|
}]
|
|
41
43
|
}, /*#__PURE__*/React.createElement(View, {
|
|
42
|
-
style: [styles.contentContainer, modalPosiion === 'flex-end' ? styles.end : styles.center, viewStyle, {
|
|
44
|
+
style: [isLandscapeOrientation ? styles.landscapeContentContainer : styles.contentContainer, modalPosiion === 'flex-end' ? styles.end : styles.center, viewStyle, {
|
|
43
45
|
marginLeft: left,
|
|
44
46
|
marginRight: right
|
|
45
47
|
}]
|
|
@@ -55,6 +57,12 @@ const styles = StyleSheet.create({
|
|
|
55
57
|
// minHeight: '20%',
|
|
56
58
|
backgroundColor: COLORS.SURFACE.DEFAULT
|
|
57
59
|
},
|
|
60
|
+
landscapeContentContainer: {
|
|
61
|
+
maxHeight: '80%',
|
|
62
|
+
maxWidth: '60%',
|
|
63
|
+
// minHeight: '20%',
|
|
64
|
+
backgroundColor: COLORS.SURFACE.DEFAULT
|
|
65
|
+
},
|
|
58
66
|
end: {
|
|
59
67
|
flex: 1,
|
|
60
68
|
borderTopLeftRadius: 16,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","Modal","useSafeAreaInsets","COLORS","CustomButton","CloseIcon","DefaultModal","modalVisible","setModalVisible","children","animationIn","animationOut","modalPosiion","backdrop","viewStyle","modalStyle","left","right","createElement","useNativeDriver","useNativeDriverForBackdrop","hideModalContentWhileAnimating","avoidKeyboard","isVisible","coverScreen","hasBackdrop","supportedOrientations","onBackdropPress","onDismiss","onBackButtonPress","style","margin","justifyContent","styles","contentContainer","end","center","marginLeft","marginRight","onPress","crossButton","LeftIcon","create","maxHeight","backgroundColor","SURFACE","DEFAULT","flex","borderTopLeftRadius","borderTopRightRadius","padding","borderWidth","borderColor","BORDER","LIGHT","borderBottomWidth","borderRadius","marginHorizontal","alignSelf","width","height","position","top","alignItems","zIndex","crossButtonIcon","color","TEXT","HIGH_EMPHASIS"],"sourceRoot":"../../../src","sources":["components/DefaultModal.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,SAAS,QAAQ,UAAU;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","Modal","useSafeAreaInsets","COLORS","CustomButton","CloseIcon","useIsLandscapeOrientation","DefaultModal","modalVisible","setModalVisible","children","animationIn","animationOut","modalPosiion","backdrop","viewStyle","modalStyle","left","right","isLandscapeOrientation","createElement","useNativeDriver","useNativeDriverForBackdrop","hideModalContentWhileAnimating","avoidKeyboard","isVisible","coverScreen","hasBackdrop","supportedOrientations","onBackdropPress","onDismiss","onBackButtonPress","style","margin","justifyContent","styles","landscapeContentContainer","contentContainer","end","center","marginLeft","marginRight","onPress","crossButton","LeftIcon","create","maxHeight","backgroundColor","SURFACE","DEFAULT","maxWidth","flex","borderTopLeftRadius","borderTopRightRadius","padding","borderWidth","borderColor","BORDER","LIGHT","borderBottomWidth","borderRadius","marginHorizontal","alignSelf","width","height","position","top","alignItems","zIndex","crossButtonIcon","color","TEXT","HIGH_EMPHASIS"],"sourceRoot":"../../../src","sources":["components/DefaultModal.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAOC,KAAK,MAAM,oBAAoB;AAEtC,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,MAAM,QAAQ,gBAAgB;AACvC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,SAAS,QAAQ,UAAU;AACpC,SAASC,yBAAyB,QAAQ,oBAAoB;AAa9D,OAAO,MAAMC,YAAyC,GAAGA,CAAC;EACxDC,YAAY;EACZC,eAAe;EACfC,QAAQ;EACRC,WAAW,GAAG,QAAQ;EACtBC,YAAY,GAAG,SAAS;EACxBC,YAAY,GAAG,UAAU;EACzBC,QAAQ,GAAG,KAAK;EAChBC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGhB,iBAAiB,CAAC,CAAC;EAC3C,MAAMiB,sBAAsB,GAAGb,yBAAyB,CAAC,CAAC;EAE1D,oBACER,KAAA,CAAAsB,aAAA,CAACnB,KAAK;IACJoB,eAAe,EAAE,IAAK;IACtBC,0BAA0B,EAAE,IAAK;IACjCC,8BAA8B,EAAE,IAAK;IACrCZ,WAAW,EAAEA,WAAY;IACzBC,YAAY,EAAEA,YAAa;IAC3BY,aAAa,EA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,CAAC;EACDX,GAAG,EAAE;IACHa,IAAI,EAAE,CAAC;IACPC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,OAAO,EAAE,EAAE;IACXC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAErD,MAAM,CAACsD,MAAM,CAACC,KAAK;IAChCC,iBAAiB,EAAE;EACrB,CAAC;EACDpB,MAAM,EAAE;IACNqB,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE,EAAE;IACpBN,WAAW,EAAE,CAAC;IACdC,WAAW,EAAErD,MAAM,CAACsD,MAAM,CAACC,KAAK;IAChCI,SAAS,EAAE,QAAQ;IACnBC,KAAK,EAAE;EACT,CAAC;EACDpB,WAAW,EAAE;IACXqB,MAAM,EAAE,EAAE;IACVD,KAAK,EAAE,EAAE;IACTE,QAAQ,EAAE,UAAU;IACpB/C,KAAK,EAAE,EAAE;IACTgD,GAAG,EAAE,EAAE;IACPnB,eAAe,EAAE5C,MAAM,CAAC6C,OAAO,CAACU,KAAK;IACrCE,YAAY,EAAE,EAAE;IAChBO,UAAU,EAAE,QAAQ;IACpBjC,cAAc,EAAE,QAAQ;IACxBkC,MAAM,EAAE;EACV,CAAC;EACDC,eAAe,EAAE;IACfC,KAAK,EAAEnE,MAAM,CAACoE,IAAI,CAACC;EACrB;AACF,CAAC,CAAC"}
|
|
@@ -10,11 +10,13 @@ import { HMSChat } from './HMSChat';
|
|
|
10
10
|
import { HMSRoomOptions } from './HMSRoomOptions';
|
|
11
11
|
import { useCanPublishAudio, useCanPublishScreen, useCanPublishVideo } from '../hooks-sdk';
|
|
12
12
|
import { useSelector } from 'react-redux';
|
|
13
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
13
14
|
export const _Footer = () => {
|
|
14
15
|
const isHLSViewer = useIsHLSViewer();
|
|
15
16
|
const canPublishAudio = useCanPublishAudio();
|
|
16
17
|
const canPublishVideo = useCanPublishVideo();
|
|
17
18
|
const canPublishScreen = useCanPublishScreen();
|
|
19
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
18
20
|
const isViewer = !(canPublishAudio || canPublishVideo || canPublishScreen);
|
|
19
21
|
const {
|
|
20
22
|
canShowParticipants,
|
|
@@ -60,7 +62,7 @@ export const _Footer = () => {
|
|
|
60
62
|
style: isHLSViewer ? null : containerStyles,
|
|
61
63
|
edges: ['bottom']
|
|
62
64
|
}, /*#__PURE__*/React.createElement(View, {
|
|
63
|
-
style: [styles.container, isHLSViewer ? styles.hlsContainer : containerStyles]
|
|
65
|
+
style: [isLandscapeOrientation ? styles.landscapeContainer : styles.container, isHLSViewer ? styles.hlsContainer : containerStyles]
|
|
64
66
|
}, footerActionButtons.map((actionType, index) => {
|
|
65
67
|
return /*#__PURE__*/React.createElement(View, {
|
|
66
68
|
key: actionType,
|
|
@@ -70,12 +72,12 @@ export const _Footer = () => {
|
|
|
70
72
|
};
|
|
71
73
|
export const useFooterHeight = () => {
|
|
72
74
|
const isHLSViewer = useIsHLSViewer();
|
|
75
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
73
76
|
const {
|
|
74
77
|
bottom
|
|
75
78
|
} = useSafeAreaInsets();
|
|
76
|
-
return bottom + (isHLSViewer ? 8 : 16) + (Platform.OS === 'android' ? 16 : 0) + 40; // bottomSafeArea + paddingTop + marginBottom + content
|
|
79
|
+
return bottom + (isHLSViewer ? 8 : isLandscapeOrientation ? 4 : 16) + (Platform.OS === 'android' ? isLandscapeOrientation ? 4 : 16 : 0) + 40; // bottomSafeArea + paddingTop + marginBottom + content
|
|
77
80
|
};
|
|
78
|
-
|
|
79
81
|
const styles = StyleSheet.create({
|
|
80
82
|
container: {
|
|
81
83
|
paddingTop: 16,
|
|
@@ -83,9 +85,16 @@ const styles = StyleSheet.create({
|
|
|
83
85
|
flexDirection: 'row',
|
|
84
86
|
alignItems: 'center',
|
|
85
87
|
justifyContent: 'center',
|
|
86
|
-
marginBottom: Platform.OS === 'android' ? 16 : 0 // TODO: need to correct hide
|
|
88
|
+
marginBottom: Platform.OS === 'android' ? 16 : 0 // TODO: need to correct hide animation offsets because of this change
|
|
89
|
+
},
|
|
90
|
+
landscapeContainer: {
|
|
91
|
+
paddingTop: 4,
|
|
92
|
+
paddingHorizontal: 4,
|
|
93
|
+
flexDirection: 'row',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
marginBottom: Platform.OS === 'android' ? 4 : 0
|
|
87
97
|
},
|
|
88
|
-
|
|
89
98
|
hlsContainer: {
|
|
90
99
|
paddingTop: 8
|
|
91
100
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useMemo","View","StyleSheet","Platform","SafeAreaView","useSafeAreaInsets","useHMSLayoutConfig","useHMSRoomStyle","useIsHLSViewer","useShowChatAndParticipants","HMSManageLeave","HMSManageRaiseHand","HMSManageLocalAudio","HMSManageLocalVideo","HMSChat","HMSRoomOptions","useCanPublishAudio","useCanPublishScreen","useCanPublishVideo","useSelector","_Footer","isHLSViewer","canPublishAudio","canPublishVideo","canPublishScreen","isViewer","canShowParticipants","canShowChat","canShowBRB","layoutConfig","_layoutConfig$screens","screens","conferencing","default","elements","brb","isOnStage","_layoutConfig$screens2","on_stage_exp","canStartRecording","state","_state$hmsStates$loca","hmsStates","localPeer","role","permissions","browserRecording","canShowOptions","footerActionButtons","actions","push","unshift","containerStyles","theme","backgroundColor","palette","background_dim","createElement","style","edges","styles","container","hlsContainer","map","actionType","index","key","iconWrapper","useFooterHeight","bottom","OS","create","paddingTop","paddingHorizontal","flexDirection","alignItems","justifyContent","marginBottom","marginLeft","Footer"],"sourceRoot":"../../../src","sources":["components/Footer.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AACzD,SACEC,YAAY,EACZC,iBAAiB,QACZ,gCAAgC;AAEvC,SACEC,kBAAkB,EAClBC,eAAe,EACfC,cAAc,EACdC,0BAA0B,QACrB,eAAe;AACtB,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SACEC,kBAAkB,EAClBC,mBAAmB,EACnBC,kBAAkB,QACb,cAAc;AACrB,SAASC,WAAW,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"names":["React","memo","useMemo","View","StyleSheet","Platform","SafeAreaView","useSafeAreaInsets","useHMSLayoutConfig","useHMSRoomStyle","useIsHLSViewer","useShowChatAndParticipants","HMSManageLeave","HMSManageRaiseHand","HMSManageLocalAudio","HMSManageLocalVideo","HMSChat","HMSRoomOptions","useCanPublishAudio","useCanPublishScreen","useCanPublishVideo","useSelector","useIsLandscapeOrientation","_Footer","isHLSViewer","canPublishAudio","canPublishVideo","canPublishScreen","isLandscapeOrientation","isViewer","canShowParticipants","canShowChat","canShowBRB","layoutConfig","_layoutConfig$screens","screens","conferencing","default","elements","brb","isOnStage","_layoutConfig$screens2","on_stage_exp","canStartRecording","state","_state$hmsStates$loca","hmsStates","localPeer","role","permissions","browserRecording","canShowOptions","footerActionButtons","actions","push","unshift","containerStyles","theme","backgroundColor","palette","background_dim","createElement","style","edges","styles","landscapeContainer","container","hlsContainer","map","actionType","index","key","iconWrapper","useFooterHeight","bottom","OS","create","paddingTop","paddingHorizontal","flexDirection","alignItems","justifyContent","marginBottom","marginLeft","Footer"],"sourceRoot":"../../../src","sources":["components/Footer.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AACzD,SACEC,YAAY,EACZC,iBAAi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AAG,CAAC,GAAG;EAChD,CAAC;EACDR,YAAY,EAAE;IACZU,UAAU,EAAE;EACd,CAAC;EACDL,WAAW,EAAE;IACXW,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,MAAM,gBAAGnF,IAAI,CAACsB,OAAO,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState, useImperativeHandle } from 'react';
|
|
2
|
-
import { View, FlatList, StyleSheet,
|
|
2
|
+
import { View, FlatList, StyleSheet, useWindowDimensions } from 'react-native';
|
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
|
4
4
|
import { DefaultModal } from './DefaultModal';
|
|
5
5
|
import { SaveScreenshot } from './Modals';
|
|
@@ -8,6 +8,7 @@ import { MiniView } from './MiniView';
|
|
|
8
8
|
import { PaginationDots } from './PaginationDots';
|
|
9
9
|
import { setGridViewActivePage } from '../redux/actions';
|
|
10
10
|
import { Tile } from './Tile';
|
|
11
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
11
12
|
const FLATLIST_VIEWABILITY_CONFIG = {
|
|
12
13
|
waitForInteraction: true,
|
|
13
14
|
itemVisiblePercentThreshold: 80
|
|
@@ -20,7 +21,11 @@ export const GridView = /*#__PURE__*/React.forwardRef(({
|
|
|
20
21
|
const hmsViewRefs = useRef({});
|
|
21
22
|
const regularTilesFlatlistRef = useRef(null);
|
|
22
23
|
const screenshareTilesFlatlistRef = useRef(null);
|
|
23
|
-
const
|
|
24
|
+
const [insetTileBoundingBox, setInsetTileBoundingBox] = useState({
|
|
25
|
+
width: null,
|
|
26
|
+
height: null
|
|
27
|
+
});
|
|
28
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
24
29
|
const screenshareTilesAvailable = useSelector(state => state.app.screensharePeerTrackNodes.length > 0);
|
|
25
30
|
const miniviewPeerTrackNodeExists = useSelector(state => !!state.app.miniviewPeerTrackNode);
|
|
26
31
|
|
|
@@ -63,7 +68,10 @@ export const GridView = /*#__PURE__*/React.forwardRef(({
|
|
|
63
68
|
const _handleLayoutChange = React.useCallback(({
|
|
64
69
|
nativeEvent
|
|
65
70
|
}) => {
|
|
66
|
-
|
|
71
|
+
setInsetTileBoundingBox({
|
|
72
|
+
width: nativeEvent.layout.width,
|
|
73
|
+
height: nativeEvent.layout.height
|
|
74
|
+
});
|
|
67
75
|
}, []);
|
|
68
76
|
return /*#__PURE__*/React.createElement(View, {
|
|
69
77
|
style: styles.container
|
|
@@ -74,13 +82,14 @@ export const GridView = /*#__PURE__*/React.forwardRef(({
|
|
|
74
82
|
ref: screenshareTilesFlatlistRef,
|
|
75
83
|
setHmsViewRefs: setHmsViewRefs,
|
|
76
84
|
onPeerTileMorePress: onPeerTileMorePress
|
|
77
|
-
}) : null, /*#__PURE__*/React.createElement(RegularTiles, {
|
|
85
|
+
}) : null, screenshareTilesAvailable && isLandscapeOrientation ? null : /*#__PURE__*/React.createElement(RegularTiles, {
|
|
78
86
|
ref: regularTilesFlatlistRef,
|
|
79
87
|
pairedPeers: pairedPeers,
|
|
80
88
|
setHmsViewRefs: setHmsViewRefs,
|
|
81
89
|
onPeerTileMorePress: onPeerTileMorePress
|
|
82
90
|
}), pairedPeers.length > 0 && miniviewPeerTrackNodeExists ? /*#__PURE__*/React.createElement(MiniView, {
|
|
83
|
-
|
|
91
|
+
boundingBoxWidth: insetTileBoundingBox.width,
|
|
92
|
+
boundingBoxHeight: insetTileBoundingBox.height,
|
|
84
93
|
onMoreOptionsPress: onPeerTileMorePress
|
|
85
94
|
}) : null, /*#__PURE__*/React.createElement(DefaultModal, {
|
|
86
95
|
modalPosiion: "center",
|
|
@@ -111,6 +120,7 @@ const RegularTiles = /*#__PURE__*/React.forwardRef(({
|
|
|
111
120
|
const dispatch = useDispatch();
|
|
112
121
|
const screenshareTilesAvailable = useSelector(state => state.app.screensharePeerTrackNodes.length > 0);
|
|
113
122
|
const activeIndex = useSelector(state => state.app.gridViewActivePage);
|
|
123
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
114
124
|
const _keyExtractor = React.useCallback(item => {
|
|
115
125
|
var _item$;
|
|
116
126
|
return (_item$ = item[0]) === null || _item$ === void 0 ? void 0 : _item$.id;
|
|
@@ -151,8 +161,8 @@ const RegularTiles = /*#__PURE__*/React.forwardRef(({
|
|
|
151
161
|
}), pairedPeers.length > 1 ? /*#__PURE__*/React.createElement(PaginationDots, {
|
|
152
162
|
list: pairedPeers,
|
|
153
163
|
activeIndex: activeIndex,
|
|
154
|
-
style: screenshareTilesAvailable ? {
|
|
155
|
-
marginVertical: 8
|
|
164
|
+
style: screenshareTilesAvailable || isLandscapeOrientation ? {
|
|
165
|
+
marginVertical: isLandscapeOrientation ? 4 : 8
|
|
156
166
|
} : null
|
|
157
167
|
}) : null);
|
|
158
168
|
});
|
|
@@ -160,6 +170,10 @@ const ScreenshareTiles = /*#__PURE__*/React.forwardRef(({
|
|
|
160
170
|
onPeerTileMorePress,
|
|
161
171
|
setHmsViewRefs
|
|
162
172
|
}, flatlistRef) => {
|
|
173
|
+
const {
|
|
174
|
+
width
|
|
175
|
+
} = useWindowDimensions();
|
|
176
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
163
177
|
const [activePage, setActivePage] = useState(0);
|
|
164
178
|
const screensharePeerTrackNodes = useSelector(state => state.app.screensharePeerTrackNodes);
|
|
165
179
|
const _keyExtractor = React.useCallback(item => item.id, []);
|
|
@@ -174,12 +188,12 @@ const ScreenshareTiles = /*#__PURE__*/React.forwardRef(({
|
|
|
174
188
|
}) => {
|
|
175
189
|
return /*#__PURE__*/React.createElement(Tile, {
|
|
176
190
|
height: '100%',
|
|
177
|
-
width:
|
|
191
|
+
width: width,
|
|
178
192
|
peerTrackNode: item,
|
|
179
193
|
onPeerTileMorePress: onPeerTileMorePress,
|
|
180
194
|
setHmsViewRefs: setHmsViewRefs
|
|
181
195
|
});
|
|
182
|
-
}, [onPeerTileMorePress, setHmsViewRefs]);
|
|
196
|
+
}, [width, onPeerTileMorePress, setHmsViewRefs]);
|
|
183
197
|
return /*#__PURE__*/React.createElement(View, {
|
|
184
198
|
style: {
|
|
185
199
|
flex: 1,
|
|
@@ -203,7 +217,7 @@ const ScreenshareTiles = /*#__PURE__*/React.forwardRef(({
|
|
|
203
217
|
list: screensharePeerTrackNodes,
|
|
204
218
|
activeIndex: activePage,
|
|
205
219
|
style: {
|
|
206
|
-
marginVertical: 8
|
|
220
|
+
marginVertical: isLandscapeOrientation ? 4 : 8
|
|
207
221
|
}
|
|
208
222
|
}) : null);
|
|
209
223
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","useState","useImperativeHandle","View","FlatList","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","useImperativeHandle","View","FlatList","StyleSheet","useWindowDimensions","useDispatch","useSelector","DefaultModal","SaveScreenshot","TilesContainer","MiniView","PaginationDots","setGridViewActivePage","Tile","useIsLandscapeOrientation","FLATLIST_VIEWABILITY_CONFIG","waitForInteraction","itemVisiblePercentThreshold","GridView","forwardRef","pairedPeers","onPeerTileMorePress","ref","screenshotData","setScreenshotData","hmsViewRefs","regularTilesFlatlistRef","screenshareTilesFlatlistRef","insetTileBoundingBox","setInsetTileBoundingBox","width","height","isLandscapeOrientation","screenshareTilesAvailable","state","app","screensharePeerTrackNodes","length","miniviewPeerTrackNodeExists","miniviewPeerTrackNode","captureViewScreenshot","node","_hmsViewRef$capture","hmsViewRef","current","id","console","warn","capture","call","then","imageBase64","log","peer","source","uri","catch","error","getRegularTilesFlatlistRef","getScreenshareTilesFlatlistRef","setHmsViewRefs","useCallback","viewId","_handleLayoutChange","nativeEvent","layout","createElement","style","styles","container","onLayout","measureLayoutView","ScreenshareTiles","RegularTiles","boundingBoxWidth","boundingBoxHeight","onMoreOptionsPress","modalPosiion","modalVisible","setModalVisible","imageSource","cancelModal","displayName","create","flex","position","flatlistRef","dispatch","activeIndex","gridViewActivePage","_keyExtractor","item","_item$","_handleViewableItemsChanged","info","firstViewable","viewableItems","isViewable","index","_renderItem","peerTrackNodes","undefined","horizontal","data","initialNumToRender","maxToRenderPerBatch","windowSize","pagingEnabled","showsHorizontalScrollIndicator","renderItem","numColumns","keyExtractor","onViewableItemsChanged","viewabilityConfig","list","marginVertical","activePage","setActivePage","peerTrackNode","marginBottom"],"sourceRoot":"../../../src","sources":["components/GridView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,EAAEC,mBAAmB,QAAQ,OAAO;AAEpE,SAASC,IAAI,EAAEC,QAAQ,EAAEC,UAAU,EAAEC,mBAAmB,QAAQ,cAAc;AAC9E,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAOtD,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,cAAc,QAAQ,UAAU;AACzC,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,SAASC,QAAQ,QAAQ,YAAY;AAErC,SAASC,cAAc,QAAQ,kBAAkB;AACjD,SAASC,qBAAqB,QAAQ,kBAAkB;AACxD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,yBAAyB,QAAQ,oBAAoB;AAe9D,MAAMC,2BAA2B,GAAG;EAClCC,kBAAkB,EAAE,IAAI;EACxBC,2BAA2B,EAAE;AAC/B,CAAC;AAED,OAAO,MAAMC,QAAQ,gBAAGrB,KAAK,CAACsB,UAAU,CACtC,CAAC;EAAEC,WAAW;EAAEC;AAAoB,CAAC,EAAEC,GAAG,KAAK;EAC7C,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGzB,QAAQ,CAG1C,IAAI,CAAC;EACf,MAAM0B,WAAW,GAAG3B,MAAM,CAA6C,CAAC,CAAC,CAAC;EAC1E,MAAM4B,uBAAuB,GAAG5B,MAAM,CAA4B,IAAI,CAAC;EACvE,MAAM6B,2BAA2B,GAAG7B,MAAM,CAA0B,IAAI,CAAC;EACzE,MAAM,CAAC8B,oBAAoB,EAAEC,uBAAu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
@@ -3,11 +3,13 @@ import { StyleSheet, View, useWindowDimensions } from 'react-native';
|
|
|
3
3
|
import { useSelector } from 'react-redux';
|
|
4
4
|
import { FlashList } from '@shopify/flash-list';
|
|
5
5
|
import { HMSHLSMessage } from './HMSHLSMessage';
|
|
6
|
+
import { useIsLandscapeOrientation } from '../utils/dimension';
|
|
6
7
|
export const HMSHLSMessageList = () => {
|
|
7
8
|
const {
|
|
8
9
|
height: windowHeight
|
|
9
10
|
} = useWindowDimensions();
|
|
10
11
|
const messages = useSelector(state => state.messages.messages);
|
|
12
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
11
13
|
const _keyExtractor = React.useCallback(item => item.messageId, []);
|
|
12
14
|
const _renderItem = React.useCallback(data => {
|
|
13
15
|
return /*#__PURE__*/React.createElement(HMSHLSMessage, {
|
|
@@ -17,10 +19,11 @@ export const HMSHLSMessageList = () => {
|
|
|
17
19
|
if (messages.length <= 0) {
|
|
18
20
|
return null;
|
|
19
21
|
}
|
|
22
|
+
const HEIGHT_MULTIPLIER = isLandscapeOrientation ? 0.45 : 0.2;
|
|
20
23
|
return /*#__PURE__*/React.createElement(View, {
|
|
21
24
|
style: [styles.container, {
|
|
22
|
-
maxHeight: windowHeight *
|
|
23
|
-
height: messages.length > 3 ? windowHeight *
|
|
25
|
+
maxHeight: windowHeight * HEIGHT_MULTIPLIER,
|
|
26
|
+
height: messages.length > 3 ? windowHeight * HEIGHT_MULTIPLIER : messages.length * 54
|
|
24
27
|
}]
|
|
25
28
|
}, /*#__PURE__*/React.createElement(FlashList, {
|
|
26
29
|
data: messages,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","useWindowDimensions","useSelector","FlashList","HMSHLSMessage","HMSHLSMessageList","height","windowHeight","messages","state","_keyExtractor","useCallback","item","messageId","_renderItem","data","createElement","message","length","style","styles","container","maxHeight","inverted","estimatedItemSize","contentContainerStyle","paddingBottom","keyboardShouldPersistTaps","renderItem","keyExtractor","create","position","marginVertical","marginHorizontal"],"sourceRoot":"../../../src","sources":["components/HMSHLSMessageList.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,cAAc;AACpE,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,SAAS,QAAQ,qBAAqB;AAI/C,SAASC,aAAa,QAAQ,iBAAiB;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","useWindowDimensions","useSelector","FlashList","HMSHLSMessage","useIsLandscapeOrientation","HMSHLSMessageList","height","windowHeight","messages","state","isLandscapeOrientation","_keyExtractor","useCallback","item","messageId","_renderItem","data","createElement","message","length","HEIGHT_MULTIPLIER","style","styles","container","maxHeight","inverted","estimatedItemSize","contentContainerStyle","paddingBottom","keyboardShouldPersistTaps","renderItem","keyExtractor","create","position","marginVertical","marginHorizontal"],"sourceRoot":"../../../src","sources":["components/HMSHLSMessageList.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,cAAc;AACpE,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,SAAS,QAAQ,qBAAqB;AAI/C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,yBAAyB,QAAQ,oBAAoB;AAE9D,OAAO,MAAMC,iBAA2B,GAAGA,CAAA,KAAM;EAC/C,MAAM;IAAEC,MAAM,EAAEC;EAAa,CAAC,GAAGP,mBAAmB,CAAC,CAAC;EACtD,MAAMQ,QAAQ,GAAGP,WAAW,CAAEQ,KAAgB,IAAKA,KAAK,CAACD,QAAQ,CAACA,QAAQ,CAAC;EAC3E,MAAME,sBAAsB,GAAGN,yBAAyB,CAAC,CAAC;EAE1D,MAAMO,aAAa,GAAGd,KAAK,CAACe,WAAW,CACpCC,IAAgB,IAAKA,IAAI,CAACC,SAAS,EACpC,EACF,CAAC;EAED,MAAMC,WAAW,GAAGlB,KAAK,CAACe,WAAW,CAAEI,IAA0B,IAAK;IACpE,oBAAOnB,KAAA,CAAAoB,aAAA,CAACd,aAAa;MAACe,OAAO,EAAEF,IAAI,CAACH;IAAK,CAAE,CAAC;EAC9C,CAAC,EAAE,EAAE,CAAC;EAEN,IAAIL,QAAQ,CAACW,MAAM,IAAI,CAAC,EAAE;IACxB,OAAO,IAAI;EACb;EAEA,MAAMC,iBAAiB,GAAGV,sBAAsB,GAAG,IAAI,GAAG,GAAG;EAE7D,oBACEb,KAAA,CAAAoB,aAAA,CAAClB,IAAI;IACHsB,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,SAAS,EAAEjB,YAAY,GAAGa,iBAAiB;MAC3Cd,MAAM,EACJE,QAAQ,CAACW,MAAM,GAAG,CAAC,GACfZ,YAAY,GAAGa,iBAAiB,GAChCZ,QAAQ,CAACW,MAAM,GAAG;IAC1B,CAAC;EACD,gBAEFtB,KAAA,CAAAoB,aAAA,CAACf,SAAS;IACRc,IAAI,EAAER,QAAS;IACfiB,QAAQ,EAAE,IAAK;IACfC,iBAAiB,EAAE,EAAG;IACtBC,qBAAqB,EAAE;MAAEC,aAAa,EAAE;IAAG;IAC3C;IAAA;IACAC,yBAAyB,EAAC;IAC1B;IACA;IAAA;IACAC,UAAU,EAAEf,WAAY;IACxBgB,YAAY,EAAEpB;EAAc,CAC7B,CACG,CAAC;AAEX,CAAC;AAED,MAAMW,MAAM,GAAGxB,UAAU,CAACkC,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,QAAQ,EAAE,UAAU;IACpBC,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Animated from 'react-native-reanimated'; // useAnimatedKeyboard,
|
|
3
|
+
// useAnimatedStyle,
|
|
4
|
+
// useDerivedValue,
|
|
5
|
+
export const HMSKeyboardAvoidingView = ({
|
|
6
|
+
children,
|
|
7
|
+
style
|
|
8
|
+
// bottomOffset=0
|
|
9
|
+
}) => {
|
|
10
|
+
// const animatedKeyboard = useAnimatedKeyboard();
|
|
11
|
+
|
|
12
|
+
// const initialPageY = useDerivedValue(() => bottomOffset, [bottomOffset]);
|
|
13
|
+
|
|
14
|
+
// const keyboardAvoidStyle = useAnimatedStyle(() => {
|
|
15
|
+
// const keyboardHeight = animatedKeyboard.height.value;
|
|
16
|
+
// return {
|
|
17
|
+
// transform: [
|
|
18
|
+
// {
|
|
19
|
+
// translateY:
|
|
20
|
+
// keyboardHeight <= initialPageY.value
|
|
21
|
+
// ? 0 // Keep element at original `pageY` till and when keyboard height is less than `pageY`
|
|
22
|
+
// : -(keyboardHeight - initialPageY.value),
|
|
23
|
+
// },
|
|
24
|
+
// ],
|
|
25
|
+
// };
|
|
26
|
+
// });
|
|
27
|
+
|
|
28
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
29
|
+
style: [style
|
|
30
|
+
// keyboardAvoidStyle
|
|
31
|
+
]
|
|
32
|
+
}, children);
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=HMSKeyboardAvoidingView.android.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Animated","HMSKeyboardAvoidingView","children","style","createElement","View"],"sourceRoot":"../../../src","sources":["components/HMSKeyboardAvoidingView.android.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,QAAQ,MAIR,yBAAyB,CAAC,CAH/B;AACA;AACA;AAQF,OAAO,MAAMC,uBAEZ,GAAGA,CAAC;EACHC,QAAQ;EACRC;EACA;AACF,CAAC,KAAK;EACJ;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA,oBACEJ,KAAA,CAAAK,aAAA,CAACJ,QAAQ,CAACK,IAAI;IACZF,KAAK,EAAE,CACLA;IACA;IAAA;EACA,GAEDD,QACY,CAAC;AAEpB,CAAC"}
|
|
@@ -55,7 +55,6 @@ export const HMSManageAudioOutput = () => {
|
|
|
55
55
|
if (Platform.OS === 'android' && availableAudioOutputDevices.length === 0) {
|
|
56
56
|
hmsInstance.getAudioDevicesList().then(devices => setAvailableAudioOutputDevices(devices)); // TODO(set-state-after-unmount): setting state irrespective of component unmount check
|
|
57
57
|
}
|
|
58
|
-
|
|
59
58
|
setSettingsModalVisible(true);
|
|
60
59
|
};
|
|
61
60
|
|