@100mslive/react-native-room-kit 1.0.1 → 1.0.2-beta.1
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/HMSPrebuilt.js +16 -14
- package/lib/commonjs/HMSPrebuilt.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +85 -44
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Hand/assets/hand-off.png +0 -0
- package/lib/commonjs/Icons/Hand/assets/hand-off@2x.png +0 -0
- package/lib/commonjs/Icons/Hand/assets/hand-off@3x.png +0 -0
- package/lib/commonjs/Icons/Hand/index.js +2 -1
- package/lib/commonjs/Icons/Hand/index.js.map +1 -1
- package/lib/commonjs/Icons/Recording/assets/recording-off.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-off@2x.png +0 -0
- package/lib/commonjs/Icons/Recording/assets/recording-off@3x.png +0 -0
- package/lib/commonjs/Icons/Recording/index.js +2 -1
- package/lib/commonjs/Icons/Recording/index.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +3 -1
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/EndRoomModal.js +29 -0
- package/lib/commonjs/components/EndRoomModal.js.map +1 -0
- package/lib/commonjs/components/EndRoomModalContent.js +9 -2
- package/lib/commonjs/components/EndRoomModalContent.js.map +1 -1
- package/lib/commonjs/components/Footer.js +9 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js +3 -18
- package/lib/commonjs/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js +2 -2
- package/lib/commonjs/components/HMSLocalScreenshareNotification.js.map +1 -1
- package/lib/commonjs/components/HMSManageLeave.js +3 -178
- package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +4 -3
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +32 -6
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSOverlayChatView.js +7 -1
- package/lib/commonjs/components/HMSOverlayChatView.js.map +1 -1
- package/lib/commonjs/components/HMSReconnectingNotification.js +33 -0
- package/lib/commonjs/components/HMSReconnectingNotification.js.map +1 -0
- package/lib/commonjs/components/HMSRecordingIndicator.js +1 -1
- package/lib/commonjs/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/commonjs/components/HMSTerminalErrorNotification.js +66 -0
- package/lib/commonjs/components/HMSTerminalErrorNotification.js.map +1 -0
- package/lib/commonjs/components/LeaveRoomBottomSheet.js +175 -0
- package/lib/commonjs/components/LeaveRoomBottomSheet.js.map +1 -0
- package/lib/commonjs/components/Meeting.js +4 -0
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MeetingScreenContent.js +3 -2
- package/lib/commonjs/components/MeetingScreenContent.js.map +1 -1
- package/lib/commonjs/components/PIPView.js +80 -15
- package/lib/commonjs/components/PIPView.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js +23 -1
- package/lib/commonjs/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/AvatarView.js +4 -4
- package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js +3 -1
- package/lib/commonjs/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PreviewForRoleChangeModal.js +2 -2
- package/lib/commonjs/components/PreviewForRoleChangeModal.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +4 -7
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/StopRecordingModalContent.js +4 -1
- package/lib/commonjs/components/StopRecordingModalContent.js.map +1 -1
- package/lib/commonjs/hooks-util.js +193 -28
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +6 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +22 -1
- 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 +15 -4
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/commonjs/redux/reducers/userState.js +5 -1
- package/lib/commonjs/redux/reducers/userState.js.map +1 -1
- package/lib/commonjs/types.js +10 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/types.js +11 -1
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +1 -7
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSPrebuilt.js +16 -14
- package/lib/module/HMSPrebuilt.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +81 -40
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Hand/assets/hand-off.png +0 -0
- package/lib/module/Icons/Hand/assets/hand-off@2x.png +0 -0
- package/lib/module/Icons/Hand/assets/hand-off@3x.png +0 -0
- package/lib/module/Icons/Hand/index.js +2 -1
- package/lib/module/Icons/Hand/index.js.map +1 -1
- package/lib/module/Icons/Recording/assets/recording-off.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-off@2x.png +0 -0
- package/lib/module/Icons/Recording/assets/recording-off@3x.png +0 -0
- package/lib/module/Icons/Recording/index.js +2 -1
- package/lib/module/Icons/Recording/index.js.map +1 -1
- package/lib/module/components/DisplayView.js +3 -1
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/EndRoomModal.js +20 -0
- package/lib/module/components/EndRoomModal.js.map +1 -0
- package/lib/module/components/EndRoomModalContent.js +9 -2
- package/lib/module/components/EndRoomModalContent.js.map +1 -1
- package/lib/module/components/Footer.js +9 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/HMSKeyboardAvoidingView.js +4 -19
- package/lib/module/components/HMSKeyboardAvoidingView.js.map +1 -1
- package/lib/module/components/HMSLocalScreenshareNotification.js +1 -1
- package/lib/module/components/HMSManageLeave.js +5 -181
- package/lib/module/components/HMSManageLeave.js.map +1 -1
- package/lib/module/components/HMSNotification.js +4 -3
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +28 -2
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSOverlayChatView.js +7 -1
- package/lib/module/components/HMSOverlayChatView.js.map +1 -1
- package/lib/module/components/HMSReconnectingNotification.js +24 -0
- package/lib/module/components/HMSReconnectingNotification.js.map +1 -0
- package/lib/module/components/HMSRecordingIndicator.js +1 -1
- package/lib/module/components/HMSRecordingIndicator.js.map +1 -1
- package/lib/module/components/HMSTerminalErrorNotification.js +57 -0
- package/lib/module/components/HMSTerminalErrorNotification.js.map +1 -0
- package/lib/module/components/LeaveRoomBottomSheet.js +167 -0
- package/lib/module/components/LeaveRoomBottomSheet.js.map +1 -0
- package/lib/module/components/Meeting.js +5 -1
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MeetingScreenContent.js +3 -2
- package/lib/module/components/MeetingScreenContent.js.map +1 -1
- package/lib/module/components/PIPView.js +81 -16
- package/lib/module/components/PIPView.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsItemOptions.js +24 -2
- package/lib/module/components/Participants/ParticipantsItemOptions.js.map +1 -1
- package/lib/module/components/PeerVideoTile/AvatarView.js +4 -4
- package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js +3 -1
- package/lib/module/components/PeerVideoTile/PeerAudioIndicator.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PreviewForRoleChangeModal.js +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +6 -9
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/StopRecordingModalContent.js +4 -1
- package/lib/module/components/StopRecordingModalContent.js.map +1 -1
- package/lib/module/hooks-util.js +184 -25
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/redux/actionTypes.js +6 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +18 -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 +15 -4
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/redux/reducers/userState.js +5 -1
- package/lib/module/redux/reducers/userState.js.map +1 -1
- package/lib/module/types.js +9 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/types.js +11 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +0 -6
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSPrebuilt.d.ts +2 -16
- package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Hand/index.d.ts +1 -0
- package/lib/typescript/Icons/Hand/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Recording/index.d.ts +1 -0
- package/lib/typescript/Icons/Recording/index.d.ts.map +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/EndRoomModal.d.ts +6 -0
- package/lib/typescript/components/EndRoomModal.d.ts.map +1 -0
- package/lib/typescript/components/EndRoomModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Footer.d.ts +1 -0
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts +1 -0
- package/lib/typescript/components/HMSKeyboardAvoidingView.d.ts.map +1 -1
- package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotification.d.ts +1 -0
- package/lib/typescript/components/HMSNotification.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts +1 -0
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSOverlayChatView.d.ts.map +1 -1
- package/lib/typescript/components/HMSReconnectingNotification.d.ts +5 -0
- package/lib/typescript/components/HMSReconnectingNotification.d.ts.map +1 -0
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts +10 -0
- package/lib/typescript/components/HMSTerminalErrorNotification.d.ts.map +1 -0
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts +6 -0
- package/lib/typescript/components/LeaveRoomBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/PIPView.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsItemOptions.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerAudioIndicator.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/StopRecordingModalContent.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +20 -7
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +3 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +23 -14
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +5 -7
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +4 -5
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +5 -7
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/userState.d.ts +2 -2
- package/lib/typescript/redux/reducers/userState.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +79 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +24 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +0 -5
- package/lib/typescript/utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/HMSPrebuilt.tsx +32 -23
- package/src/HMSRoomSetup.tsx +105 -53
- package/src/Icons/Hand/assets/hand-off.png +0 -0
- package/src/Icons/Hand/assets/hand-off@2x.png +0 -0
- package/src/Icons/Hand/assets/hand-off@3x.png +0 -0
- package/src/Icons/Hand/index.tsx +13 -3
- package/src/Icons/Recording/assets/recording-off.png +0 -0
- package/src/Icons/Recording/assets/recording-off@2x.png +0 -0
- package/src/Icons/Recording/assets/recording-off@3x.png +0 -0
- package/src/Icons/Recording/index.tsx +9 -2
- package/src/components/DisplayView.tsx +6 -0
- package/src/components/EndRoomModal.tsx +24 -0
- package/src/components/EndRoomModalContent.tsx +9 -2
- package/src/components/Footer.tsx +18 -2
- package/src/components/HMSKeyboardAvoidingView.tsx +5 -23
- package/src/components/HMSLocalScreenshareNotification.tsx +1 -1
- package/src/components/HMSManageLeave.tsx +4 -228
- package/src/components/HMSNotification.tsx +4 -2
- package/src/components/HMSNotifications.tsx +41 -7
- package/src/components/HMSOverlayChatView.tsx +6 -1
- package/src/components/HMSReconnectingNotification.tsx +27 -0
- package/src/components/HMSRecordingIndicator.tsx +1 -1
- package/src/components/HMSTerminalErrorNotification.tsx +70 -0
- package/src/components/LeaveRoomBottomSheet.tsx +199 -0
- package/src/components/Meeting.tsx +7 -0
- package/src/components/MeetingScreenContent.tsx +2 -2
- package/src/components/PIPView.tsx +113 -25
- package/src/components/Participants/ParticipantsItemOptions.tsx +26 -4
- package/src/components/PeerVideoTile/AvatarView.tsx +4 -4
- package/src/components/PeerVideoTile/PeerAudioIndicator.tsx +6 -1
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +4 -2
- package/src/components/PreviewForRoleChangeModal.tsx +1 -1
- package/src/components/RoomSettingsModalContent.tsx +5 -9
- package/src/components/StopRecordingModalContent.tsx +3 -1
- package/src/hooks-util.ts +243 -25
- package/src/index.ts +2 -0
- package/src/redux/actionTypes.ts +7 -0
- package/src/redux/actions/index.ts +19 -7
- package/src/redux/reducers/appState.ts +18 -1
- package/src/redux/reducers/hmsStates.ts +19 -7
- package/src/redux/reducers/userState.ts +7 -3
- package/src/types.ts +71 -0
- package/src/utils/types.ts +27 -0
- package/src/utils.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Image","StyleSheet","useHMSRoomStyle","HandIcon","_ref","style","restProps","iconStyles","theme","tintColor","palette","on_surface_high","createElement","_extends","source","require","styles","icon","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["Icons/Hand/index.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAGhD,SAASC,eAAe,QAAQ,kBAAkB;
|
|
1
|
+
{"version":3,"names":["React","Image","StyleSheet","useHMSRoomStyle","HandIcon","_ref","style","type","restProps","iconStyles","theme","tintColor","palette","on_surface_high","createElement","_extends","source","require","styles","icon","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["Icons/Hand/index.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAGhD,SAASC,eAAe,QAAQ,kBAAkB;AAMlD,OAAO,MAAMC,QAAiC,GAAGC,IAAA,IAI3C;EAAA,IAJ4C;IAChDC,KAAK;IACLC,IAAI,GAAG,IAAI;IACX,GAAGC;EACL,CAAC,GAAAH,IAAA;EACC,MAAMI,UAAU,GAAGN,eAAe,CAAEO,KAAK,KAAM;IAC7CC,SAAS,EAAED,KAAK,CAACE,OAAO,CAACC;EAC3B,CAAC,CAAC,CAAC;EAEH,oBACEb,KAAA,CAAAc,aAAA,CAACb,KAAK,EAAAc,QAAA;IACJC,MAAM,EACJT,IAAI,KAAK,IAAI,GACTU,OAAO,CAAC,mBAAmB,CAAC,GAC5BA,OAAO,CAAC,uBAAuB,CACpC;IACDX,KAAK,EAAE,CAACY,MAAM,CAACC,IAAI,EAAEV,UAAU,EAAEH,KAAK;EAAE,GACpCE,SAAS,CACd,CAAC;AAEN,CAAC;AAED,MAAMU,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAC/BD,IAAI,EAAE;IACJE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,13 +5,14 @@ import { useHMSRoomStyle } from '../../hooks-util';
|
|
|
5
5
|
export const RecordingIcon = _ref => {
|
|
6
6
|
let {
|
|
7
7
|
style,
|
|
8
|
+
type = 'on',
|
|
8
9
|
...restProps
|
|
9
10
|
} = _ref;
|
|
10
11
|
const iconStyles = useHMSRoomStyle(theme => ({
|
|
11
12
|
tintColor: theme.palette.on_surface_high
|
|
12
13
|
}));
|
|
13
14
|
return /*#__PURE__*/React.createElement(Image, _extends({
|
|
14
|
-
source: require('./assets/recording.png'),
|
|
15
|
+
source: type === 'on' ? require('./assets/recording.png') : require('./assets/recording-off.png'),
|
|
15
16
|
style: [styles.icon, iconStyles, style]
|
|
16
17
|
}, restProps));
|
|
17
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Image","StyleSheet","useHMSRoomStyle","RecordingIcon","_ref","style","restProps","iconStyles","theme","tintColor","palette","on_surface_high","createElement","_extends","source","require","styles","icon","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["Icons/Recording/index.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAGhD,SAASC,eAAe,QAAQ,kBAAkB;
|
|
1
|
+
{"version":3,"names":["React","Image","StyleSheet","useHMSRoomStyle","RecordingIcon","_ref","style","type","restProps","iconStyles","theme","tintColor","palette","on_surface_high","createElement","_extends","source","require","styles","icon","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["Icons/Recording/index.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,KAAK,EAAEC,UAAU,QAAQ,cAAc;AAGhD,SAASC,eAAe,QAAQ,kBAAkB;AAMlD,OAAO,MAAMC,aAA2C,GAAGC,IAAA,IAIrD;EAAA,IAJsD;IAC1DC,KAAK;IACLC,IAAI,GAAG,IAAI;IACX,GAAGC;EACL,CAAC,GAAAH,IAAA;EACC,MAAMI,UAAU,GAAGN,eAAe,CAAEO,KAAK,KAAM;IAC7CC,SAAS,EAAED,KAAK,CAACE,OAAO,CAACC;EAC3B,CAAC,CAAC,CAAC;EAEH,oBACEb,KAAA,CAAAc,aAAA,CAACb,KAAK,EAAAc,QAAA;IACJC,MAAM,EACJT,IAAI,KAAK,IAAI,GACTU,OAAO,CAAC,wBAAwB,CAAC,GACjCA,OAAO,CAAC,4BAA4B,CACzC;IACDX,KAAK,EAAE,CAACY,MAAM,CAACC,IAAI,EAAEV,UAAU,EAAEH,KAAK;EAAE,GACpCE,SAAS,CACd,CAAC;AAEN,CAAC;AAED,MAAMU,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAC/BD,IAAI,EAAE;IACJE,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC"}
|
|
@@ -16,6 +16,8 @@ import { BottomSheet } from './BottomSheet';
|
|
|
16
16
|
import { FullScreenVideoView } from './FullScreenVideoView';
|
|
17
17
|
import { PreviewForRoleChangeModal } from './PreviewForRoleChangeModal';
|
|
18
18
|
import { ChatAndParticipantsBottomSheet } from './ChatAndParticipants';
|
|
19
|
+
import { LeaveRoomBottomSheet } from './LeaveRoomBottomSheet';
|
|
20
|
+
import { EndRoomModal } from './EndRoomModal';
|
|
19
21
|
export const DisplayView = _ref => {
|
|
20
22
|
let {
|
|
21
23
|
offset,
|
|
@@ -96,7 +98,7 @@ export const DisplayView = _ref => {
|
|
|
96
98
|
ref: gridViewRef,
|
|
97
99
|
peerTrackNodes: peerTrackNodes,
|
|
98
100
|
handlePeerTileMorePress: handlePeerTileMorePress
|
|
99
|
-
}), isPipModeActive ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PreviewForRoleChangeModal, null), /*#__PURE__*/React.createElement(FullScreenVideoView, null), /*#__PURE__*/React.createElement(ChatAndParticipantsBottomSheet, null), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
101
|
+
}), isPipModeActive ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LeaveRoomBottomSheet, null), /*#__PURE__*/React.createElement(EndRoomModal, null), /*#__PURE__*/React.createElement(PreviewForRoleChangeModal, null), /*#__PURE__*/React.createElement(FullScreenVideoView, null), /*#__PURE__*/React.createElement(ChatAndParticipantsBottomSheet, null), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
100
102
|
isVisible: modalVisible === ModalTypes.PEER_SETTINGS,
|
|
101
103
|
dismissModal: () => setModalVisible(ModalTypes.DEFAULT)
|
|
102
104
|
}, selectedPeerTrackNode ? /*#__PURE__*/React.createElement(PeerSettingsModalContent, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","useState","useSelector","InteractionManager","HMSCameraControl","Animated","interpolate","useAnimatedStyle","DefaultModal","ModalTypes","PipModes","requestExternalStoragePermission","ChangeAspectRatio","ChangeRoleModal","ChangeTrackStateModal","SaveScreenshot","HLSView","PeerSettingsModalContent","StreamingQualityModalContent","useHMSChangeTrackStateRequest","useHMSInstance","useHMSRoleChangeRequest","useHMSSessionStoreListeners","useIsHLSViewer","useModalType","WebrtcView","BottomSheet","FullScreenVideoView","PreviewForRoleChangeModal","ChatAndParticipantsBottomSheet","DisplayView","_ref","offset","peerTrackNodes","hmsInstance","isHLSViewer","modalVisibleType","modalVisible","handleModalVisibleType","setModalVisible","gridViewRef","trackToChangeRef","isPipModeActive","state","app","pipModeStatus","ACTIVE","selectedPeerTrackNode","setSelectedPeerTrackNode","capturedImagePath","setCapturedImagePath","trackStateChangeRequest","CHANGE_TRACK","handlePeerTileMorePress","useCallback","peerTrackNode","PEER_SETTINGS","handleCaptureScreenShotPress","node","DEFAULT","runAfterInteractions","_gridViewRef$current","current","captureViewScreenshot","handleCaptureImageAtMaxSupportedResolutionPress","_node","permission","captureImageAtMaxSupportedResolution","then","imagePath","console","log","uri","catch","error","warn","handleStreamingQualityPress","track","STREAMING_QUALITY_SETTING","animatedStyles","transform","translateY","value","createElement","View","style","flex","ref","Fragment","isVisible","dismissModal","peerTrackNodesListEmpty","length","cancelModal","onCaptureScreenShotPress","onCaptureImageAtMaxSupportedResolutionPress","onStreamingQualityPress","modalPosiion","HLS_PLAYER_ASPECT_RATIO","imageSource","roleChangeRequest","CHANGE_ROLE"],"sourceRoot":"../../../src","sources":["components/DisplayView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAAmBC,gBAAgB,QAAQ,6BAA6B;AACxE,OAAOC,QAAQ,IACbC,WAAW,EACXC,gBAAgB,QACX,yBAAyB;AAGhC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAErD,SAASC,gCAAgC,QAAQ,oBAAoB;AACrE,SACEC,iBAAiB,EACjBC,eAAe,EACfC,qBAAqB,EACrBC,cAAc,QACT,UAAU;AAGjB,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,wBAAwB,QAAQ,wCAAwC;AACjF,SAASC,4BAA4B,QAAQ,4CAA4C;AACzF,SACEC,6BAA6B,EAC7BC,cAAc,EACdC,uBAAuB,EACvBC,2BAA2B,EAC3BC,cAAc,EACdC,YAAY,QACP,eAAe;AACtB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,8BAA8B,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"names":["React","useRef","useState","useSelector","InteractionManager","HMSCameraControl","Animated","interpolate","useAnimatedStyle","DefaultModal","ModalTypes","PipModes","requestExternalStoragePermission","ChangeAspectRatio","ChangeRoleModal","ChangeTrackStateModal","SaveScreenshot","HLSView","PeerSettingsModalContent","StreamingQualityModalContent","useHMSChangeTrackStateRequest","useHMSInstance","useHMSRoleChangeRequest","useHMSSessionStoreListeners","useIsHLSViewer","useModalType","WebrtcView","BottomSheet","FullScreenVideoView","PreviewForRoleChangeModal","ChatAndParticipantsBottomSheet","LeaveRoomBottomSheet","EndRoomModal","DisplayView","_ref","offset","peerTrackNodes","hmsInstance","isHLSViewer","modalVisibleType","modalVisible","handleModalVisibleType","setModalVisible","gridViewRef","trackToChangeRef","isPipModeActive","state","app","pipModeStatus","ACTIVE","selectedPeerTrackNode","setSelectedPeerTrackNode","capturedImagePath","setCapturedImagePath","trackStateChangeRequest","CHANGE_TRACK","handlePeerTileMorePress","useCallback","peerTrackNode","PEER_SETTINGS","handleCaptureScreenShotPress","node","DEFAULT","runAfterInteractions","_gridViewRef$current","current","captureViewScreenshot","handleCaptureImageAtMaxSupportedResolutionPress","_node","permission","captureImageAtMaxSupportedResolution","then","imagePath","console","log","uri","catch","error","warn","handleStreamingQualityPress","track","STREAMING_QUALITY_SETTING","animatedStyles","transform","translateY","value","createElement","View","style","flex","ref","Fragment","isVisible","dismissModal","peerTrackNodesListEmpty","length","cancelModal","onCaptureScreenShotPress","onCaptureImageAtMaxSupportedResolutionPress","onStreamingQualityPress","modalPosiion","HLS_PLAYER_ASPECT_RATIO","imageSource","roleChangeRequest","CHANGE_ROLE"],"sourceRoot":"../../../src","sources":["components/DisplayView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC/C,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAAmBC,gBAAgB,QAAQ,6BAA6B;AACxE,OAAOC,QAAQ,IACbC,WAAW,EACXC,gBAAgB,QACX,yBAAyB;AAGhC,SAASC,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,UAAU,EAAEC,QAAQ,QAAQ,gBAAgB;AAErD,SAASC,gCAAgC,QAAQ,oBAAoB;AACrE,SACEC,iBAAiB,EACjBC,eAAe,EACfC,qBAAqB,EACrBC,cAAc,QACT,UAAU;AAGjB,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,wBAAwB,QAAQ,wCAAwC;AACjF,SAASC,4BAA4B,QAAQ,4CAA4C;AACzF,SACEC,6BAA6B,EAC7BC,cAAc,EACdC,uBAAuB,EACvBC,2BAA2B,EAC3BC,cAAc,EACdC,YAAY,QACP,eAAe;AACtB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,8B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ACrC;EAAE,CACH,CAAC,GACA,IACQ,CAAC,eACf9D,KAAA,CAAAsF,aAAA,CAAC7E,YAAY;IACX2F,YAAY,EAAC,QAAQ;IACrB5D,YAAY,EAAEA,YAAY,KAAK9B,UAAU,CAAC6C,YAAa;IACvDb,eAAe,EAAEA,CAAA,KAAMA,eAAe,CAAChC,UAAU,CAACoD,OAAO;EAAE,GAE1DR,uBAAuB,gBACtBtD,KAAA,CAAAsF,aAAA,CAACvE,qBAAqB;IACpBwF,iBAAiB,EAAEjD,uBAAwB;IAC3C0C,WAAW,EAAEA,CAAA,KAAMtD,eAAe,CAAChC,UAAU,CAACoD,OAAO;EAAE,CACxD,CAAC,GACA,IACQ,CAAC,eACf9D,KAAA,CAAAsF,aAAA,CAAC7E,YAAY;IACX2F,YAAY,EAAC,QAAQ;IACrB5D,YAAY,EAAEA,YAAY,KAAK9B,UAAU,CAAC8F,WAAY;IACtD9D,eAAe,EAAEA,CAAA,KAAMA,eAAe,CAAChC,UAAU,CAACoD,OAAO;EAAE,gBAE3D9D,KAAA,CAAAsF,aAAA,CAACxE,eAAe;IACdkF,WAAW,EAAEA,CAAA,KAAMtD,eAAe,CAAChC,UAAU,CAACoD,OAAO;EAAE,CACxD,CACW,CACd,CAES,CAAC;AAEpB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ModalTypes } from '../utils/types';
|
|
3
|
+
import { BottomSheet } from './BottomSheet';
|
|
4
|
+
import { useModalType } from '../hooks-util';
|
|
5
|
+
import { EndRoomModalContent } from './EndRoomModalContent';
|
|
6
|
+
export const EndRoomModal = () => {
|
|
7
|
+
const {
|
|
8
|
+
modalVisibleType,
|
|
9
|
+
handleModalVisibleType
|
|
10
|
+
} = useModalType();
|
|
11
|
+
const dismissModal = () => handleModalVisibleType(ModalTypes.DEFAULT);
|
|
12
|
+
return /*#__PURE__*/React.createElement(BottomSheet, {
|
|
13
|
+
dismissModal: dismissModal,
|
|
14
|
+
isVisible: modalVisibleType === ModalTypes.END_ROOM,
|
|
15
|
+
animationOutTiming: 700
|
|
16
|
+
}, /*#__PURE__*/React.createElement(EndRoomModalContent, {
|
|
17
|
+
dismissModal: dismissModal
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=EndRoomModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ModalTypes","BottomSheet","useModalType","EndRoomModalContent","EndRoomModal","modalVisibleType","handleModalVisibleType","dismissModal","DEFAULT","createElement","isVisible","END_ROOM","animationOutTiming"],"sourceRoot":"../../../src","sources":["components/EndRoomModal.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,YAAY,QAAQ,eAAe;AAC5C,SAASC,mBAAmB,QAAQ,uBAAuB;AAI3D,OAAO,MAAMC,YAAyC,GAAGA,CAAA,KAAM;EAC7D,MAAM;IAAEC,gBAAgB;IAAEC;EAAuB,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAEnE,MAAMK,YAAY,GAAGA,CAAA,KAAMD,sBAAsB,CAACN,UAAU,CAACQ,OAAO,CAAC;EAErE,oBACET,KAAA,CAAAU,aAAA,CAACR,WAAW;IACVM,YAAY,EAAEA,YAAa;IAC3BG,SAAS,EAAEL,gBAAgB,KAAKL,UAAU,CAACW,QAAS;IACpDC,kBAAkB,EAAE;EAAI,gBAExBb,KAAA,CAAAU,aAAA,CAACN,mBAAmB;IAACI,YAAY,EAAEA;EAAa,CAAE,CACvC,CAAC;AAElB,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { useHMSRoomStyleSheet, useLeaveMethods } from '../hooks-util';
|
|
|
4
4
|
import { AlertTriangleIcon, CloseIcon } from '../Icons';
|
|
5
5
|
import { HMSDangerButton } from './HMSDangerButton';
|
|
6
6
|
import { useSelector } from 'react-redux';
|
|
7
|
+
import { OnLeaveReason } from '../utils/types';
|
|
7
8
|
export const EndRoomModalContent = _ref => {
|
|
8
9
|
let {
|
|
9
10
|
dismissModal
|
|
@@ -11,7 +12,7 @@ export const EndRoomModalContent = _ref => {
|
|
|
11
12
|
const {
|
|
12
13
|
endRoom,
|
|
13
14
|
leave
|
|
14
|
-
} = useLeaveMethods(
|
|
15
|
+
} = useLeaveMethods();
|
|
15
16
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
16
17
|
headerText: {
|
|
17
18
|
color: theme.palette.alert_error_default,
|
|
@@ -49,7 +50,13 @@ export const EndRoomModalContent = _ref => {
|
|
|
49
50
|
style: [styles.text, hmsRoomStyles.text]
|
|
50
51
|
}, canStream && isStreaming ? 'The stream will end for everyone after they’ve watched it.' : canEndRoom ? 'The session will end for everyone in the room immediately. ' : 'Others will continue after you leave. You can join the session again.'), /*#__PURE__*/React.createElement(HMSDangerButton, {
|
|
51
52
|
loading: false,
|
|
52
|
-
onPress:
|
|
53
|
+
onPress: () => {
|
|
54
|
+
if (canStream && isStreaming) {
|
|
55
|
+
leave(OnLeaveReason.LEAVE, true);
|
|
56
|
+
} else {
|
|
57
|
+
endRoom(OnLeaveReason.ROOM_END);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
53
60
|
title: canStream && isStreaming ? 'End Stream' : 'End Session'
|
|
54
61
|
}));
|
|
55
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","StyleSheet","TouchableOpacity","useHMSRoomStyleSheet","useLeaveMethods","AlertTriangleIcon","CloseIcon","HMSDangerButton","useSelector","EndRoomModalContent","_ref","dismissModal","endRoom","leave","hmsRoomStyles","theme","typography","headerText","color","palette","alert_error_default","fontFamily","font_family","text","on_surface_medium","canEndRoom","state","_state$hmsStates$loca","hmsStates","localPeer","role","permissions","canStream","_state$hmsStates$loca2","hlsStreaming","isStreaming","_state$hmsStates$room","room","hlsStreamingState","running","createElement","style","styles","container","header","headerControls","onPress","hitSlop","closeIconHitSlop","loading","title","create","marginTop","marginHorizontal","flexDirection","alignItems","justifyContent","marginBottom","fontSize","lineHeight","letterSpacing","marginLeft","bottom","left","right","top"],"sourceRoot":"../../../src","sources":["components/EndRoomModalContent.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;AAEvE,SAASC,oBAAoB,EAAEC,eAAe,QAAQ,eAAe;AACrE,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,UAAU;AACvD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAASC,WAAW,QAAQ,aAAa;
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","TouchableOpacity","useHMSRoomStyleSheet","useLeaveMethods","AlertTriangleIcon","CloseIcon","HMSDangerButton","useSelector","OnLeaveReason","EndRoomModalContent","_ref","dismissModal","endRoom","leave","hmsRoomStyles","theme","typography","headerText","color","palette","alert_error_default","fontFamily","font_family","text","on_surface_medium","canEndRoom","state","_state$hmsStates$loca","hmsStates","localPeer","role","permissions","canStream","_state$hmsStates$loca2","hlsStreaming","isStreaming","_state$hmsStates$room","room","hlsStreamingState","running","createElement","style","styles","container","header","headerControls","onPress","hitSlop","closeIconHitSlop","loading","LEAVE","ROOM_END","title","create","marginTop","marginHorizontal","flexDirection","alignItems","justifyContent","marginBottom","fontSize","lineHeight","letterSpacing","marginLeft","bottom","left","right","top"],"sourceRoot":"../../../src","sources":["components/EndRoomModalContent.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;AAEvE,SAASC,oBAAoB,EAAEC,eAAe,QAAQ,eAAe;AACrE,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,UAAU;AACvD,SAASC,eAAe,QAAQ,mB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AAA,KAAM;MACb,IAAId,SAAS,IAAIG,WAAW,EAAE;QAC5BtB,KAAK,CAACL,aAAa,CAAC0C,KAAK,EAAE,IAAI,CAAC;MAClC,CAAC,MAAM;QACLtC,OAAO,CAACJ,aAAa,CAAC2C,QAAQ,CAAC;MACjC;IACF,CAAE;IACFC,KAAK,EAAEpB,SAAS,IAAIG,WAAW,GAAG,YAAY,GAAG;EAAc,CAChE,CACG,CAAC;AAEX,CAAC;AAED,MAAMO,MAAM,GAAG1C,UAAU,CAACqD,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,SAAS,EAAE,EAAE;IACbC,gBAAgB,EAAE;EACpB,CAAC;EACDX,MAAM,EAAE;IACNY,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,eAAe;IAC/BC,YAAY,EAAE;EAChB,CAAC;EACDd,cAAc,EAAE;IACdW,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDxC,UAAU,EAAE;IACV2C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBC,UAAU,EAAE;EACd,CAAC;EACDf,gBAAgB,EAAE;IAChBgB,MAAM,EAAE,EAAE;IACVC,IAAI,EAAE,EAAE;IACRC,KAAK,EAAE,EAAE;IACTC,GAAG,EAAE;EACP,CAAC;EACD5C,IAAI,EAAE;IACJqC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,IAAI;IACnBH,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { memo, useMemo } from 'react';
|
|
2
2
|
import { View, StyleSheet, Platform } from 'react-native';
|
|
3
|
-
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
3
|
+
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
4
|
import { useHMSLayoutConfig, useHMSRoomStyle, useIsHLSViewer, useShowChatAndParticipants } from '../hooks-util';
|
|
5
5
|
import { HMSManageLeave } from './HMSManageLeave';
|
|
6
6
|
import { HMSManageRaiseHand } from './HMSManageRaiseHand';
|
|
@@ -68,6 +68,14 @@ export const _Footer = () => {
|
|
|
68
68
|
}, actionType === 'leave' ? /*#__PURE__*/React.createElement(HMSManageLeave, null) : actionType === 'audio' ? /*#__PURE__*/React.createElement(HMSManageLocalAudio, null) : actionType === 'video' ? /*#__PURE__*/React.createElement(HMSManageLocalVideo, null) : actionType === 'chat' ? /*#__PURE__*/React.createElement(HMSChat, null) : actionType === 'options' ? /*#__PURE__*/React.createElement(HMSRoomOptions, null) : actionType === 'hand-raise' ? /*#__PURE__*/React.createElement(HMSManageRaiseHand, null) : null);
|
|
69
69
|
})));
|
|
70
70
|
};
|
|
71
|
+
export const useFooterHeight = () => {
|
|
72
|
+
const isHLSViewer = useIsHLSViewer();
|
|
73
|
+
const {
|
|
74
|
+
bottom
|
|
75
|
+
} = useSafeAreaInsets();
|
|
76
|
+
return bottom + (isHLSViewer ? 8 : 16) + (Platform.OS === 'android' ? 16 : 0) + 40; // bottomSafeArea + paddingTop + marginBottom + content
|
|
77
|
+
};
|
|
78
|
+
|
|
71
79
|
const styles = StyleSheet.create({
|
|
72
80
|
container: {
|
|
73
81
|
paddingTop: 16,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useMemo","View","StyleSheet","Platform","SafeAreaView","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","create","paddingTop","paddingHorizontal","flexDirection","alignItems","justifyContent","marginBottom","
|
|
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,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,MAAM/C,WAAW,GAAGb,cAAc,CAAC,CAAC;EACpC,MAAM;IAAE6D;EAAO,CAAC,GAAGhE,iBAAiB,CAAC,CAAC;EAEtC,OACEgE,MAAM,IAAIhD,WAAW,GAAG,CAAC,GAAG,EAAE,CAAC,IAAIlB,QAAQ,CAACmE,EAAE,KAAK,SAAS,GAAG,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAC3E,CAAC;AACL,CAAC;;AAED,MAAMV,MAAM,GAAG1D,UAAU,CAACqE,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,UAAU,EAAE,EAAE;IACdC,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,YAAY,EAAE1E,QAAQ,CAACmE,EAAE,KAAK,SAAS,GAAG,EAAE,GAAG,CAAC,CAAE;EACpD,CAAC;;EACDR,YAAY,EAAE;IACZU,UAAU,EAAE;EACd,CAAC;EACDL,WAAW,EAAE;IACXW,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,OAAO,MAAMC,MAAM,gBAAGhF,IAAI,CAACqB,OAAO,CAAC"}
|
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import Animated, { useAnimatedKeyboard, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
2
|
+
import Animated, { useAnimatedKeyboard, useAnimatedStyle, useDerivedValue } from 'react-native-reanimated';
|
|
4
3
|
export const HMSKeyboardAvoidingView = _ref => {
|
|
5
4
|
let {
|
|
6
5
|
children,
|
|
7
|
-
style
|
|
6
|
+
style,
|
|
7
|
+
bottomOffset = 0
|
|
8
8
|
} = _ref;
|
|
9
|
-
const animatedViewRef = React.useRef(null);
|
|
10
|
-
const {
|
|
11
|
-
height: windowHeight
|
|
12
|
-
} = useWindowDimensions();
|
|
13
9
|
const animatedKeyboard = useAnimatedKeyboard();
|
|
14
|
-
const initialPageY =
|
|
15
|
-
const _handleViewOnLayout = React.useCallback(() => {
|
|
16
|
-
var _animatedViewRef$curr;
|
|
17
|
-
(_animatedViewRef$curr = animatedViewRef.current) === null || _animatedViewRef$curr === void 0 || _animatedViewRef$curr.measureInWindow((_fx, fy, _width, height) => {
|
|
18
|
-
if (height > 0) {
|
|
19
|
-
const finalWindowHeight = Platform.OS === 'android' && Platform.Version < 29 ? windowHeight - (StatusBar.currentHeight ?? 0) : windowHeight;
|
|
20
|
-
initialPageY.value = finalWindowHeight - (height + fy);
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
}, []);
|
|
10
|
+
const initialPageY = useDerivedValue(() => bottomOffset, [bottomOffset]);
|
|
24
11
|
const keyboardAvoidStyle = useAnimatedStyle(() => {
|
|
25
12
|
const keyboardHeight = animatedKeyboard.height.value;
|
|
26
13
|
return {
|
|
@@ -31,8 +18,6 @@ export const HMSKeyboardAvoidingView = _ref => {
|
|
|
31
18
|
};
|
|
32
19
|
});
|
|
33
20
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
34
|
-
ref: animatedViewRef,
|
|
35
|
-
onLayout: _handleViewOnLayout,
|
|
36
21
|
style: [style, keyboardAvoidStyle]
|
|
37
22
|
}, children);
|
|
38
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","Animated","useAnimatedKeyboard","useAnimatedStyle","useDerivedValue","HMSKeyboardAvoidingView","_ref","children","style","bottomOffset","animatedKeyboard","initialPageY","keyboardAvoidStyle","keyboardHeight","height","value","transform","translateY","createElement","View"],"sourceRoot":"../../../src","sources":["components/HMSKeyboardAvoidingView.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,QAAQ,IACbC,mBAAmB,EACnBC,gBAAgB,EAChBC,eAAe,QACV,yBAAyB;AAOhC,OAAO,MAAMC,uBAEZ,GAAGC,IAAA,IAAyC;EAAA,IAAxC;IAAEC,QAAQ;IAAEC,KAAK;IAAEC,YAAY,GAAC;EAAE,CAAC,GAAAH,IAAA;EACtC,MAAMI,gBAAgB,GAAGR,mBAAmB,CAAC,CAAC;EAE9C,MAAMS,YAAY,GAAGP,eAAe,CAAC,MAAMK,YAAY,EAAE,CAACA,YAAY,CAAC,CAAC;EAExE,MAAMG,kBAAkB,GAAGT,gBAAgB,CAAC,MAAM;IAChD,MAAMU,cAAc,GAAGH,gBAAgB,CAACI,MAAM,CAACC,KAAK;IACpD,OAAO;MACLC,SAAS,EAAE,CACT;QACEC,UAAU,EACRJ,cAAc,IAAIF,YAAY,CAACI,KAAK,GAChC,CAAC,CAAC;QAAA,EACF,EAAEF,cAAc,GAAGF,YAAY,CAACI,KAAK;MAC7C,CAAC;IAEL,CAAC;EACH,CAAC,CAAC;EAEF,oBACEf,KAAA,CAAAkB,aAAA,CAACjB,QAAQ,CAACkB,IAAI;IAACX,KAAK,EAAE,CAACA,KAAK,EAAEI,kBAAkB;EAAE,GAC/CL,QACY,CAAC;AAEpB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { ScreenShareIcon } from '../Icons';
|
|
|
4
4
|
import { HMSDangerButton } from './HMSDangerButton';
|
|
5
5
|
import { HMSNotification } from './HMSNotification';
|
|
6
6
|
import { useHMSRoomStyle } from '../hooks-util';
|
|
7
|
-
import { NotificationTypes } from '../
|
|
7
|
+
import { NotificationTypes } from '../types';
|
|
8
8
|
export const HMSLocalScreenshareNotification = () => {
|
|
9
9
|
const hmsActions = useHMSActions();
|
|
10
10
|
const notificationStyle = useHMSRoomStyle(theme => ({
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { useSelector } from 'react-redux';
|
|
2
|
+
import { View } from 'react-native';
|
|
4
3
|
import { LeaveIcon } from '../Icons';
|
|
5
|
-
import { useHMSRoomStyleSheet,
|
|
4
|
+
import { useHMSRoomStyleSheet, useModalType } from '../hooks-util';
|
|
6
5
|
import { ModalTypes } from '../utils/types';
|
|
7
6
|
import { PressableIcon } from './PressableIcon';
|
|
8
|
-
import { BottomSheet } from './BottomSheet';
|
|
9
|
-
import { StopIcon } from '../Icons';
|
|
10
|
-
import { EndRoomModalContent } from './EndRoomModalContent';
|
|
11
7
|
import { COLORS } from '../utils/theme';
|
|
12
8
|
export const HMSManageLeave = props => {
|
|
13
9
|
// TODO: read current meeting joined state
|
|
@@ -18,58 +14,16 @@ export const HMSManageLeave = props => {
|
|
|
18
14
|
return /*#__PURE__*/React.createElement(LeaveButton, props);
|
|
19
15
|
};
|
|
20
16
|
const LeaveButton = props => {
|
|
21
|
-
const leavePopCloseAction = React.useRef(ModalTypes.DEFAULT);
|
|
22
|
-
const [leavePopVisible, setLeavePopVisible] = React.useState(false);
|
|
23
|
-
const [leaveModalType, setLeaveModalType] = React.useState(ModalTypes.DEFAULT);
|
|
24
17
|
const {
|
|
25
|
-
|
|
26
|
-
} =
|
|
18
|
+
handleModalVisibleType
|
|
19
|
+
} = useModalType();
|
|
27
20
|
|
|
28
21
|
/**
|
|
29
22
|
* Opens the Leave Popup Menu
|
|
30
23
|
*/
|
|
31
24
|
const handleLeaveButtonPress = () => {
|
|
32
|
-
|
|
25
|
+
handleModalVisibleType(ModalTypes.LEAVE_ROOM);
|
|
33
26
|
};
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Closes the Leave Popup Menu
|
|
37
|
-
* Leave Modal will open after the popup is hidden
|
|
38
|
-
*/
|
|
39
|
-
const handleLeavePress = async () => {
|
|
40
|
-
setLeavePopVisible(false);
|
|
41
|
-
await leave();
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Closes the Leave Popup Menu
|
|
46
|
-
* End Session Modal will open after the popup is hidden
|
|
47
|
-
*/
|
|
48
|
-
const handleEndSessionPress = async () => {
|
|
49
|
-
leavePopCloseAction.current = ModalTypes.END_ROOM;
|
|
50
|
-
setLeavePopVisible(false);
|
|
51
|
-
};
|
|
52
|
-
const handleEndStreamPress = async () => {
|
|
53
|
-
leavePopCloseAction.current = ModalTypes.END_ROOM;
|
|
54
|
-
setLeavePopVisible(false);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Closes the Leave Popup Menu
|
|
59
|
-
* No action is taken when the popup is hidden
|
|
60
|
-
*/
|
|
61
|
-
const dismissPopup = () => {
|
|
62
|
-
leavePopCloseAction.current = ModalTypes.DEFAULT;
|
|
63
|
-
setLeavePopVisible(false);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Handles action to take when the leave popup is hidden
|
|
68
|
-
*/
|
|
69
|
-
const handlePopupHide = () => {
|
|
70
|
-
setLeaveModalType(leavePopCloseAction.current);
|
|
71
|
-
};
|
|
72
|
-
const dismissModal = () => setLeaveModalType(ModalTypes.DEFAULT);
|
|
73
27
|
const hmsRoomStyles = useHMSRoomStyleSheet(theme => ({
|
|
74
28
|
button: {
|
|
75
29
|
backgroundColor: theme.palette.alert_error_default,
|
|
@@ -86,136 +40,6 @@ const LeaveButton = props => {
|
|
|
86
40
|
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.cloneElement(leaveButtonDelegate, {
|
|
87
41
|
onPress: handleLeaveButtonPress,
|
|
88
42
|
style: hmsRoomStyles.button
|
|
89
|
-
}), /*#__PURE__*/React.createElement(LeaveBottomSheet, {
|
|
90
|
-
isVisible: leavePopVisible,
|
|
91
|
-
onEndSessionPress: handleEndSessionPress,
|
|
92
|
-
onLeavePress: handleLeavePress,
|
|
93
|
-
onPopupDismiss: dismissPopup,
|
|
94
|
-
onPopupHide: handlePopupHide,
|
|
95
|
-
onEndStreamPress: handleEndStreamPress
|
|
96
|
-
}), /*#__PURE__*/React.createElement(BottomSheet, {
|
|
97
|
-
dismissModal: dismissModal,
|
|
98
|
-
isVisible: leaveModalType === ModalTypes.END_ROOM,
|
|
99
|
-
animationOutTiming: 700
|
|
100
|
-
}, /*#__PURE__*/React.createElement(EndRoomModalContent, {
|
|
101
|
-
dismissModal: dismissModal
|
|
102
|
-
})));
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
// const HEADER_CONTENT_HEIGHT = 24 + 8 + 8 + 2; // ICON_SIZE + TOP_PADDING + BOTTOM_PADDING + TOP&BOTTOM_BORDER_WIDTH
|
|
106
|
-
// const HEADER_HEIGHT = 8 + HEADER_CONTENT_HEIGHT + 8; // TOP_HEADER_PADDING + HEADER_CONTENT_HEIGHT + BOTTOM_HEADER_PADDING
|
|
107
|
-
const LeaveBottomSheet = _ref => {
|
|
108
|
-
let {
|
|
109
|
-
isVisible,
|
|
110
|
-
onPopupDismiss,
|
|
111
|
-
onLeavePress,
|
|
112
|
-
onEndSessionPress,
|
|
113
|
-
onEndStreamPress,
|
|
114
|
-
onPopupHide
|
|
115
|
-
} = _ref;
|
|
116
|
-
const canEndRoom = useSelector(state => {
|
|
117
|
-
var _state$hmsStates$loca;
|
|
118
|
-
return (_state$hmsStates$loca = state.hmsStates.localPeer) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.role) === null || _state$hmsStates$loca === void 0 || (_state$hmsStates$loca = _state$hmsStates$loca.permissions) === null || _state$hmsStates$loca === void 0 ? void 0 : _state$hmsStates$loca.endRoom;
|
|
119
|
-
});
|
|
120
|
-
const canStream = useSelector(state => {
|
|
121
|
-
var _state$hmsStates$loca2;
|
|
122
|
-
return (_state$hmsStates$loca2 = state.hmsStates.localPeer) === null || _state$hmsStates$loca2 === void 0 || (_state$hmsStates$loca2 = _state$hmsStates$loca2.role) === null || _state$hmsStates$loca2 === void 0 || (_state$hmsStates$loca2 = _state$hmsStates$loca2.permissions) === null || _state$hmsStates$loca2 === void 0 ? void 0 : _state$hmsStates$loca2.hlsStreaming;
|
|
123
|
-
});
|
|
124
|
-
const isStreaming = useSelector(state => {
|
|
125
|
-
var _state$hmsStates$room;
|
|
126
|
-
return ((_state$hmsStates$room = state.hmsStates.room) === null || _state$hmsStates$room === void 0 || (_state$hmsStates$room = _state$hmsStates$room.hlsStreamingState) === null || _state$hmsStates$room === void 0 ? void 0 : _state$hmsStates$room.running) ?? false;
|
|
127
|
-
});
|
|
128
|
-
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
129
|
-
text: {
|
|
130
|
-
color: theme.palette.on_surface_high,
|
|
131
|
-
fontFamily: `${typography.font_family}-SemiBold`
|
|
132
|
-
},
|
|
133
|
-
subtext: {
|
|
134
|
-
color: theme.palette.on_surface_low,
|
|
135
|
-
fontFamily: `${typography.font_family}-Regular`
|
|
136
|
-
},
|
|
137
|
-
endButton: {
|
|
138
|
-
backgroundColor: theme.palette.alert_error_dim
|
|
139
|
-
},
|
|
140
|
-
endText: {
|
|
141
|
-
color: theme.palette.alert_error_brighter,
|
|
142
|
-
fontFamily: `${typography.font_family}-SemiBold`
|
|
143
|
-
},
|
|
144
|
-
endSubtext: {
|
|
145
|
-
color: theme.palette.alert_error_bright,
|
|
146
|
-
fontFamily: `${typography.font_family}-Regular`
|
|
147
|
-
},
|
|
148
|
-
endIcon: {
|
|
149
|
-
tintColor: theme.palette.alert_error_brighter
|
|
150
|
-
}
|
|
151
43
|
}));
|
|
152
|
-
return /*#__PURE__*/React.createElement(BottomSheet, {
|
|
153
|
-
isVisible: isVisible,
|
|
154
|
-
containerStyle: leavePopupStyles.container,
|
|
155
|
-
dismissModal: onPopupDismiss,
|
|
156
|
-
onModalHide: onPopupHide,
|
|
157
|
-
animationOutTiming: 700
|
|
158
|
-
}, /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
159
|
-
style: leavePopupStyles.button,
|
|
160
|
-
onPress: onLeavePress
|
|
161
|
-
}, /*#__PURE__*/React.createElement(LeaveIcon, {
|
|
162
|
-
style: leavePopupStyles.icon
|
|
163
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
164
|
-
style: leavePopupStyles.textContainer
|
|
165
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
166
|
-
style: [leavePopupStyles.text, hmsRoomStyles.text]
|
|
167
|
-
}, "Leave"), /*#__PURE__*/React.createElement(Text, {
|
|
168
|
-
style: [leavePopupStyles.subtext, hmsRoomStyles.subtext]
|
|
169
|
-
}, "Others will continue after you leave. You can join the session again."))), canStream && isStreaming ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
170
|
-
style: [leavePopupStyles.button, hmsRoomStyles.endButton],
|
|
171
|
-
onPress: onEndStreamPress
|
|
172
|
-
}, /*#__PURE__*/React.createElement(StopIcon, {
|
|
173
|
-
style: [leavePopupStyles.icon, hmsRoomStyles.endIcon]
|
|
174
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
175
|
-
style: leavePopupStyles.textContainer
|
|
176
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
177
|
-
style: [leavePopupStyles.text, hmsRoomStyles.endText]
|
|
178
|
-
}, "End Stream"), /*#__PURE__*/React.createElement(Text, {
|
|
179
|
-
style: [leavePopupStyles.subtext, hmsRoomStyles.endSubtext]
|
|
180
|
-
}, "The stream will end for everyone after they\u2019ve watched it."))) : canEndRoom ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
181
|
-
style: [leavePopupStyles.button, hmsRoomStyles.endButton],
|
|
182
|
-
onPress: onEndSessionPress
|
|
183
|
-
}, /*#__PURE__*/React.createElement(StopIcon, {
|
|
184
|
-
style: [leavePopupStyles.icon, hmsRoomStyles.endIcon]
|
|
185
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
186
|
-
style: leavePopupStyles.textContainer
|
|
187
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
188
|
-
style: [leavePopupStyles.text, hmsRoomStyles.endText]
|
|
189
|
-
}, "End Session"), /*#__PURE__*/React.createElement(Text, {
|
|
190
|
-
style: [leavePopupStyles.subtext, hmsRoomStyles.endSubtext]
|
|
191
|
-
}, "The session will end for everyone in the room immediately."))) : null));
|
|
192
44
|
};
|
|
193
|
-
const leavePopupStyles = StyleSheet.create({
|
|
194
|
-
container: {
|
|
195
|
-
paddingBottom: 0
|
|
196
|
-
},
|
|
197
|
-
button: {
|
|
198
|
-
flexDirection: 'row',
|
|
199
|
-
padding: 24
|
|
200
|
-
},
|
|
201
|
-
icon: {
|
|
202
|
-
width: 24,
|
|
203
|
-
height: 24,
|
|
204
|
-
marginRight: 16
|
|
205
|
-
},
|
|
206
|
-
textContainer: {
|
|
207
|
-
flex: 1
|
|
208
|
-
},
|
|
209
|
-
text: {
|
|
210
|
-
fontSize: 20,
|
|
211
|
-
lineHeight: 24,
|
|
212
|
-
letterSpacing: 0.15
|
|
213
|
-
},
|
|
214
|
-
subtext: {
|
|
215
|
-
fontSize: 14,
|
|
216
|
-
lineHeight: 20,
|
|
217
|
-
letterSpacing: 0.25,
|
|
218
|
-
marginTop: 4
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
45
|
//# sourceMappingURL=HMSManageLeave.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","View","LeaveIcon","useHMSRoomStyleSheet","useModalType","ModalTypes","PressableIcon","COLORS","HMSManageLeave","props","isMeetingJoined","createElement","LeaveButton","handleModalVisibleType","handleLeaveButtonPress","LEAVE_ROOM","hmsRoomStyles","theme","button","backgroundColor","palette","alert_error_default","borderColor","icon","tintColor","WHITE","leaveIconDelegate","style","leaveButtonDelegate","cloneElement","onPress"],"sourceRoot":"../../../src","sources":["components/HMSManageLeave.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,SAAS,QAAQ,UAAU;AACpC,SAASC,oBAAoB,EAAEC,YAAY,QAAQ,eAAe;AAClE,SAASC,UAAU,QAAQ,gBAAgB;AAC3C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,MAAM,QAAQ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sB;IAC/Ba,KAAK,EAAEX,aAAa,CAACE;EACvB,CAAC,CACG,CAAC;AAEX,CAAC"}
|
|
@@ -15,7 +15,8 @@ export const HMSNotification = _ref => {
|
|
|
15
15
|
cta,
|
|
16
16
|
onDismiss,
|
|
17
17
|
dismissDelay = 5000,
|
|
18
|
-
autoDismiss = true
|
|
18
|
+
autoDismiss = true,
|
|
19
|
+
dismissable = false
|
|
19
20
|
} = _ref;
|
|
20
21
|
const dispatch = useDispatch();
|
|
21
22
|
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
@@ -27,7 +28,7 @@ export const HMSNotification = _ref => {
|
|
|
27
28
|
fontFamily: `${typography.font_family}-SemiBold`
|
|
28
29
|
}
|
|
29
30
|
}));
|
|
30
|
-
const dismissNotification = onDismiss || (autoDismiss ? () => {
|
|
31
|
+
const dismissNotification = onDismiss || (autoDismiss || dismissable ? () => {
|
|
31
32
|
dispatch(removeNotification(id));
|
|
32
33
|
} : null);
|
|
33
34
|
const notification = /*#__PURE__*/React.createElement(View, {
|
|
@@ -43,7 +44,7 @@ export const HMSNotification = _ref => {
|
|
|
43
44
|
}, cta, dismissNotification ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
44
45
|
onPress: dismissNotification
|
|
45
46
|
}, /*#__PURE__*/React.createElement(CloseIcon, null)) : null));
|
|
46
|
-
if (dismissNotification) {
|
|
47
|
+
if (dismissNotification && autoDismiss) {
|
|
47
48
|
return /*#__PURE__*/React.createElement(UnmountAfterDelay, {
|
|
48
49
|
visible: true,
|
|
49
50
|
onUnmount: dismissNotification,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useDispatch","StyleSheet","Text","TouchableOpacity","View","useHMSRoomStyleSheet","CloseIcon","UnmountAfterDelay","removeNotification","HMSNotification","_ref","id","text","icon","style","textStyle","cta","onDismiss","dismissDelay","autoDismiss","dispatch","hmsRoomStyles","theme","typography","container","backgroundColor","palette","surface_dim","color","on_surface_high","fontFamily","font_family","dismissNotification","notification","createElement","styles","leftWrapper","rightWrapper","onPress","visible","onUnmount","delay","create","flex","elevation","borderRadius","flexDirection","padding","paddingLeft","marginHorizontal","justifyContent","alignItems","marginLeft","marginRight","flexShrink","fontSize","lineHeight","letterSpacing"],"sourceRoot":"../../../src","sources":["components/HMSNotification.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAGvE,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,SAAS,QAAQ,UAAU;AACpC,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,kBAAkB,QAAQ,kBAAkB;
|
|
1
|
+
{"version":3,"names":["React","useDispatch","StyleSheet","Text","TouchableOpacity","View","useHMSRoomStyleSheet","CloseIcon","UnmountAfterDelay","removeNotification","HMSNotification","_ref","id","text","icon","style","textStyle","cta","onDismiss","dismissDelay","autoDismiss","dismissable","dispatch","hmsRoomStyles","theme","typography","container","backgroundColor","palette","surface_dim","color","on_surface_high","fontFamily","font_family","dismissNotification","notification","createElement","styles","leftWrapper","rightWrapper","onPress","visible","onUnmount","delay","create","flex","elevation","borderRadius","flexDirection","padding","paddingLeft","marginHorizontal","justifyContent","alignItems","marginLeft","marginRight","flexShrink","fontSize","lineHeight","letterSpacing"],"sourceRoot":"../../../src","sources":["components/HMSNotification.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AAGvE,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,SAAS,QAAQ,UAAU;AACpC,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,kBAAkB,QAAQ,kBAAkB;AAerD,OAA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