@100mslive/react-native-room-kit 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/HMSInstanceSetup.js +1 -14
- package/lib/commonjs/HMSInstanceSetup.js.map +1 -1
- package/lib/commonjs/HMSPrebuilt.js +13 -4
- package/lib/commonjs/HMSPrebuilt.js.map +1 -1
- package/lib/commonjs/HMSRoomSetup.js +38 -14
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone.png +0 -0
- package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
- package/lib/commonjs/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
- package/lib/commonjs/Icons/AnswerPhone/index.js +30 -0
- package/lib/commonjs/Icons/AnswerPhone/index.js.map +1 -0
- package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
- package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
- package/lib/commonjs/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
- package/lib/commonjs/Icons/Bluetooth/index.js +30 -0
- package/lib/commonjs/Icons/Bluetooth/index.js.map +1 -0
- package/lib/commonjs/Icons/Check/assets/check.png +0 -0
- package/lib/commonjs/Icons/Check/assets/check@2x.png +0 -0
- package/lib/commonjs/Icons/Check/assets/check@3x.png +0 -0
- package/lib/commonjs/Icons/Check/index.js +30 -0
- package/lib/commonjs/Icons/Check/index.js.map +1 -0
- package/lib/commonjs/Icons/GenericLogo/assets/generic-logo.png +0 -0
- package/lib/commonjs/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
- package/lib/commonjs/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
- package/lib/commonjs/Icons/GenericLogo/index.js +30 -0
- package/lib/commonjs/Icons/GenericLogo/index.js.map +1 -0
- package/lib/commonjs/Icons/Headphones/assets/headphones.png +0 -0
- package/lib/commonjs/Icons/Headphones/assets/headphones@2x.png +0 -0
- package/lib/commonjs/Icons/Headphones/assets/headphones@3x.png +0 -0
- package/lib/commonjs/Icons/Headphones/index.js +30 -0
- package/lib/commonjs/Icons/Headphones/index.js.map +1 -0
- package/lib/commonjs/Icons/Person/assets/person.png +0 -0
- package/lib/commonjs/Icons/Person/assets/person@2x.png +0 -0
- package/lib/commonjs/Icons/Person/assets/person@3x.png +0 -0
- package/lib/commonjs/Icons/Person/index.js +30 -0
- package/lib/commonjs/Icons/Person/index.js.map +1 -0
- package/lib/commonjs/Icons/Radio/assets/radio.png +0 -0
- package/lib/commonjs/Icons/Radio/assets/radio@2x.png +0 -0
- package/lib/commonjs/Icons/Radio/assets/radio@3x.png +0 -0
- package/lib/commonjs/Icons/Radio/index.js +30 -0
- package/lib/commonjs/Icons/Radio/index.js.map +1 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-large.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-large@2x.png +0 -0
- package/lib/commonjs/Icons/Speaker/assets/speaker-large@3x.png +0 -0
- package/lib/commonjs/Icons/Speaker/index.js +7 -2
- package/lib/commonjs/Icons/Speaker/index.js.map +1 -1
- package/lib/commonjs/Icons/Wave/assets/wave.png +0 -0
- package/lib/commonjs/Icons/Wave/assets/wave@2x.png +0 -0
- package/lib/commonjs/Icons/Wave/assets/wave@3x.png +0 -0
- package/lib/commonjs/Icons/Wave/index.js +30 -0
- package/lib/commonjs/Icons/Wave/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +88 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/BackButton.js +3 -3
- package/lib/commonjs/components/BackButton.js.map +1 -1
- package/lib/commonjs/components/DisplayView.js +0 -6
- package/lib/commonjs/components/DisplayView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSStreamLoading.js +56 -0
- package/lib/commonjs/components/HMSHLSStreamLoading.js.map +1 -0
- package/lib/commonjs/components/HMSLocalVideoView.js +41 -0
- package/lib/commonjs/components/HMSLocalVideoView.js.map +1 -0
- package/lib/commonjs/components/{HMSPreviewDeviceSettings.js → HMSManageAudioOutput.js} +97 -161
- package/lib/commonjs/components/HMSManageAudioOutput.js.map +1 -0
- package/lib/commonjs/components/HMSManageLeave.js +7 -60
- package/lib/commonjs/components/HMSManageLeave.js.map +1 -1
- package/lib/commonjs/components/HMSMeetingEnded.js +36 -0
- package/lib/commonjs/components/HMSMeetingEnded.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewEditName.js +7 -4
- package/lib/commonjs/components/HMSPreviewEditName.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js +64 -0
- package/lib/commonjs/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewJoinButton.js +25 -6
- package/lib/commonjs/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js +43 -0
- package/lib/commonjs/components/HMSPreviewNetworkQuality.js.map +1 -0
- package/lib/commonjs/components/HMSPreviewPeersList.js +4 -50
- package/lib/commonjs/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewSubtitle.js +26 -3
- package/lib/commonjs/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTile.js +11 -77
- package/lib/commonjs/components/HMSPreviewTile.js.map +1 -1
- package/lib/commonjs/components/HMSPreviewTitle.js +0 -1
- package/lib/commonjs/components/HMSPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/HMSRoomOptions.js +2 -3
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSShowNetworkQuality.js +0 -2
- package/lib/commonjs/components/HMSShowNetworkQuality.js.map +1 -1
- package/lib/commonjs/components/Meeting.js +7 -0
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/MenuModal/Menu.js +1 -2
- package/lib/commonjs/components/MenuModal/Menu.js.map +1 -1
- package/lib/commonjs/components/Modals.js +39 -299
- package/lib/commonjs/components/Modals.js.map +1 -1
- package/lib/commonjs/components/Participants/ParticipantsList.js +1 -20
- package/lib/commonjs/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/commonjs/components/PeerSettingsModalContent.js +2 -13
- package/lib/commonjs/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/Preview.js +87 -28
- package/lib/commonjs/components/Preview.js.map +1 -1
- package/lib/commonjs/components/RoomSettingsModalContent.js +2 -101
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/index.js +0 -11
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/hooks/useHmsInstance.js +0 -1
- package/lib/commonjs/hooks/useHmsInstance.js.map +1 -1
- package/lib/commonjs/hooks-util-selectors.js +8 -1
- package/lib/commonjs/hooks-util-selectors.js.map +1 -1
- package/lib/commonjs/hooks-util.js +140 -82
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +7 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +25 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/appState.js +14 -1
- package/lib/commonjs/redux/reducers/appState.js.map +1 -1
- package/lib/commonjs/redux/reducers/hmsStates.js +12 -1
- package/lib/commonjs/redux/reducers/hmsStates.js.map +1 -1
- package/lib/commonjs/utils/theme.js +6 -1
- package/lib/commonjs/utils/theme.js.map +1 -1
- package/lib/commonjs/utils/types.js +0 -1
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/commonjs/utils.js +2 -2
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/HMSInstanceSetup.js +1 -14
- package/lib/module/HMSInstanceSetup.js.map +1 -1
- package/lib/module/HMSPrebuilt.js +13 -3
- package/lib/module/HMSPrebuilt.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +43 -19
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/AnswerPhone/assets/answer-phone.png +0 -0
- package/lib/module/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
- package/lib/module/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
- package/lib/module/Icons/AnswerPhone/index.js +22 -0
- package/lib/module/Icons/AnswerPhone/index.js.map +1 -0
- package/lib/module/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
- package/lib/module/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
- package/lib/module/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
- package/lib/module/Icons/Bluetooth/index.js +22 -0
- package/lib/module/Icons/Bluetooth/index.js.map +1 -0
- package/lib/module/Icons/Check/assets/check.png +0 -0
- package/lib/module/Icons/Check/assets/check@2x.png +0 -0
- package/lib/module/Icons/Check/assets/check@3x.png +0 -0
- package/lib/module/Icons/Check/index.js +22 -0
- package/lib/module/Icons/Check/index.js.map +1 -0
- package/lib/module/Icons/GenericLogo/assets/generic-logo.png +0 -0
- package/lib/module/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
- package/lib/module/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
- package/lib/module/Icons/GenericLogo/index.js +22 -0
- package/lib/module/Icons/GenericLogo/index.js.map +1 -0
- package/lib/module/Icons/Headphones/assets/headphones.png +0 -0
- package/lib/module/Icons/Headphones/assets/headphones@2x.png +0 -0
- package/lib/module/Icons/Headphones/assets/headphones@3x.png +0 -0
- package/lib/module/Icons/Headphones/index.js +22 -0
- package/lib/module/Icons/Headphones/index.js.map +1 -0
- package/lib/module/Icons/Person/assets/person.png +0 -0
- package/lib/module/Icons/Person/assets/person@2x.png +0 -0
- package/lib/module/Icons/Person/assets/person@3x.png +0 -0
- package/lib/module/Icons/Person/index.js +22 -0
- package/lib/module/Icons/Person/index.js.map +1 -0
- package/lib/module/Icons/Radio/assets/radio.png +0 -0
- package/lib/module/Icons/Radio/assets/radio@2x.png +0 -0
- package/lib/module/Icons/Radio/assets/radio@3x.png +0 -0
- package/lib/module/Icons/Radio/index.js +22 -0
- package/lib/module/Icons/Radio/index.js.map +1 -0
- package/lib/module/Icons/Speaker/assets/speaker-large.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker-large@2x.png +0 -0
- package/lib/module/Icons/Speaker/assets/speaker-large@3x.png +0 -0
- package/lib/module/Icons/Speaker/index.js +7 -2
- package/lib/module/Icons/Speaker/index.js.map +1 -1
- package/lib/module/Icons/Wave/assets/wave.png +0 -0
- package/lib/module/Icons/Wave/assets/wave@2x.png +0 -0
- package/lib/module/Icons/Wave/assets/wave@3x.png +0 -0
- package/lib/module/Icons/Wave/index.js +22 -0
- package/lib/module/Icons/Wave/index.js.map +1 -0
- package/lib/module/Icons/index.js +8 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/BackButton.js +4 -4
- package/lib/module/components/BackButton.js.map +1 -1
- package/lib/module/components/DisplayView.js +1 -7
- package/lib/module/components/DisplayView.js.map +1 -1
- package/lib/module/components/HMSHLSStreamLoading.js +47 -0
- package/lib/module/components/HMSHLSStreamLoading.js.map +1 -0
- package/lib/module/components/HMSLocalVideoView.js +32 -0
- package/lib/module/components/HMSLocalVideoView.js.map +1 -0
- package/lib/module/components/HMSManageAudioOutput.js +232 -0
- package/lib/module/components/HMSManageAudioOutput.js.map +1 -0
- package/lib/module/components/HMSManageLeave.js +9 -62
- package/lib/module/components/HMSManageLeave.js.map +1 -1
- package/lib/module/components/HMSMeetingEnded.js +27 -0
- package/lib/module/components/HMSMeetingEnded.js.map +1 -0
- package/lib/module/components/HMSPreviewEditName.js +8 -5
- package/lib/module/components/HMSPreviewEditName.js.map +1 -1
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js +55 -0
- package/lib/module/components/HMSPreviewHLSLiveIndicator.js.map +1 -0
- package/lib/module/components/HMSPreviewJoinButton.js +25 -6
- package/lib/module/components/HMSPreviewJoinButton.js.map +1 -1
- package/lib/module/components/HMSPreviewNetworkQuality.js +34 -0
- package/lib/module/components/HMSPreviewNetworkQuality.js.map +1 -0
- package/lib/module/components/HMSPreviewPeersList.js +4 -50
- package/lib/module/components/HMSPreviewPeersList.js.map +1 -1
- package/lib/module/components/HMSPreviewSubtitle.js +26 -3
- package/lib/module/components/HMSPreviewSubtitle.js.map +1 -1
- package/lib/module/components/HMSPreviewTile.js +12 -78
- package/lib/module/components/HMSPreviewTile.js.map +1 -1
- package/lib/module/components/HMSPreviewTitle.js +0 -1
- package/lib/module/components/HMSPreviewTitle.js.map +1 -1
- package/lib/module/components/HMSRoomOptions.js +2 -3
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSShowNetworkQuality.js +0 -2
- package/lib/module/components/HMSShowNetworkQuality.js.map +1 -1
- package/lib/module/components/Meeting.js +7 -0
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/MenuModal/Menu.js +1 -2
- package/lib/module/components/MenuModal/Menu.js.map +1 -1
- package/lib/module/components/Modals.js +40 -298
- package/lib/module/components/Modals.js.map +1 -1
- package/lib/module/components/Participants/ParticipantsList.js +1 -20
- package/lib/module/components/Participants/ParticipantsList.js.map +1 -1
- package/lib/module/components/PeerSettingsModalContent.js +2 -13
- package/lib/module/components/PeerSettingsModalContent.js.map +1 -1
- package/lib/module/components/Preview.js +88 -30
- package/lib/module/components/Preview.js.map +1 -1
- package/lib/module/components/RoomSettingsModalContent.js +3 -100
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/useHmsInstance.js +0 -1
- package/lib/module/hooks/useHmsInstance.js.map +1 -1
- package/lib/module/hooks-util-selectors.js +6 -0
- package/lib/module/hooks-util-selectors.js.map +1 -1
- package/lib/module/hooks-util.js +142 -86
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +7 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +20 -0
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/appState.js +14 -1
- package/lib/module/redux/reducers/appState.js.map +1 -1
- package/lib/module/redux/reducers/hmsStates.js +12 -1
- package/lib/module/redux/reducers/hmsStates.js.map +1 -1
- package/lib/module/utils/theme.js +6 -1
- package/lib/module/utils/theme.js.map +1 -1
- package/lib/module/utils/types.js +0 -1
- package/lib/module/utils/types.js.map +1 -1
- package/lib/module/utils.js +2 -2
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/HMSInstanceSetup.d.ts.map +1 -1
- package/lib/typescript/HMSPrebuilt.d.ts +2 -3
- package/lib/typescript/HMSPrebuilt.d.ts.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/AnswerPhone/index.d.ts +7 -0
- package/lib/typescript/Icons/AnswerPhone/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Bluetooth/index.d.ts +7 -0
- package/lib/typescript/Icons/Bluetooth/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Check/index.d.ts +7 -0
- package/lib/typescript/Icons/Check/index.d.ts.map +1 -0
- package/lib/typescript/Icons/GenericLogo/index.d.ts +7 -0
- package/lib/typescript/Icons/GenericLogo/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Headphones/index.d.ts +7 -0
- package/lib/typescript/Icons/Headphones/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Person/index.d.ts +7 -0
- package/lib/typescript/Icons/Person/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Radio/index.d.ts +7 -0
- package/lib/typescript/Icons/Radio/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Speaker/index.d.ts +1 -0
- package/lib/typescript/Icons/Speaker/index.d.ts.map +1 -1
- package/lib/typescript/Icons/Wave/index.d.ts +7 -0
- package/lib/typescript/Icons/Wave/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +8 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/CustomInput.d.ts +1 -1
- package/lib/typescript/components/DisplayView.d.ts.map +1 -1
- package/lib/typescript/components/HMSHLSStreamLoading.d.ts +3 -0
- package/lib/typescript/components/HMSHLSStreamLoading.d.ts.map +1 -0
- package/lib/typescript/components/HMSLocalVideoView.d.ts +3 -0
- package/lib/typescript/components/HMSLocalVideoView.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageAudioOutput.d.ts +3 -0
- package/lib/typescript/components/HMSManageAudioOutput.d.ts.map +1 -0
- package/lib/typescript/components/HMSManageLeave.d.ts.map +1 -1
- package/lib/typescript/components/HMSMeetingEnded.d.ts +3 -0
- package/lib/typescript/components/HMSMeetingEnded.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts +3 -0
- package/lib/typescript/components/HMSPreviewHLSLiveIndicator.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewJoinButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts +3 -0
- package/lib/typescript/components/HMSPreviewNetworkQuality.d.ts.map +1 -0
- package/lib/typescript/components/HMSPreviewPeersList.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewSubtitle.d.ts.map +1 -1
- package/lib/typescript/components/HMSPreviewTile.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSShowNetworkQuality.d.ts.map +1 -1
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/MenuModal/Menu.d.ts.map +1 -1
- package/lib/typescript/components/Modals.d.ts +1 -9
- package/lib/typescript/components/Modals.d.ts.map +1 -1
- package/lib/typescript/components/Participants/ParticipantsList.d.ts.map +1 -1
- package/lib/typescript/components/PeerSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Preview.d.ts.map +1 -1
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +0 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/hooks-util-selectors.d.ts +2 -0
- package/lib/typescript/hooks-util-selectors.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +9 -2
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +5 -1
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +24 -3
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +4 -1
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/appState.d.ts +3 -0
- package/lib/typescript/redux/reducers/appState.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/hmsStates.d.ts +11 -2
- package/lib/typescript/redux/reducers/hmsStates.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +4 -1
- 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/utils/theme.d.ts +5 -0
- package/lib/typescript/utils/theme.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +3 -4
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +11 -17
- package/src/HMSInstanceSetup.tsx +4 -31
- package/src/HMSPrebuilt.tsx +24 -6
- package/src/HMSRoomSetup.tsx +55 -17
- package/src/Icons/AnswerPhone/assets/answer-phone.png +0 -0
- package/src/Icons/AnswerPhone/assets/answer-phone@2x.png +0 -0
- package/src/Icons/AnswerPhone/assets/answer-phone@3x.png +0 -0
- package/src/Icons/AnswerPhone/index.tsx +27 -0
- package/src/Icons/Bluetooth/assets/bluetooth-on.png +0 -0
- package/src/Icons/Bluetooth/assets/bluetooth-on@2x.png +0 -0
- package/src/Icons/Bluetooth/assets/bluetooth-on@3x.png +0 -0
- package/src/Icons/Bluetooth/index.tsx +27 -0
- package/src/Icons/Check/assets/check.png +0 -0
- package/src/Icons/Check/assets/check@2x.png +0 -0
- package/src/Icons/Check/assets/check@3x.png +0 -0
- package/src/Icons/Check/index.tsx +27 -0
- package/src/Icons/GenericLogo/assets/generic-logo.png +0 -0
- package/src/Icons/GenericLogo/assets/generic-logo@2x.png +0 -0
- package/src/Icons/GenericLogo/assets/generic-logo@3x.png +0 -0
- package/src/Icons/GenericLogo/index.tsx +27 -0
- package/src/Icons/Headphones/assets/headphones.png +0 -0
- package/src/Icons/Headphones/assets/headphones@2x.png +0 -0
- package/src/Icons/Headphones/assets/headphones@3x.png +0 -0
- package/src/Icons/Headphones/index.tsx +27 -0
- package/src/Icons/Person/assets/person.png +0 -0
- package/src/Icons/Person/assets/person@2x.png +0 -0
- package/src/Icons/Person/assets/person@3x.png +0 -0
- package/src/Icons/Person/index.tsx +27 -0
- package/src/Icons/Radio/assets/radio.png +0 -0
- package/src/Icons/Radio/assets/radio@2x.png +0 -0
- package/src/Icons/Radio/assets/radio@3x.png +0 -0
- package/src/Icons/Radio/index.tsx +27 -0
- package/src/Icons/Speaker/assets/speaker-large.png +0 -0
- package/src/Icons/Speaker/assets/speaker-large@2x.png +0 -0
- package/src/Icons/Speaker/assets/speaker-large@3x.png +0 -0
- package/src/Icons/Speaker/index.tsx +10 -2
- package/src/Icons/Wave/assets/wave.png +0 -0
- package/src/Icons/Wave/assets/wave@2x.png +0 -0
- package/src/Icons/Wave/assets/wave@3x.png +0 -0
- package/src/Icons/Wave/index.tsx +24 -0
- package/src/Icons/index.ts +8 -0
- package/src/components/BackButton.tsx +4 -4
- package/src/components/DisplayView.tsx +0 -10
- package/src/components/HMSHLSStreamLoading.tsx +57 -0
- package/src/components/HMSLocalVideoView.tsx +42 -0
- package/src/components/HMSManageAudioOutput.tsx +311 -0
- package/src/components/HMSManageLeave.tsx +6 -77
- package/src/components/HMSMeetingEnded.tsx +29 -0
- package/src/components/HMSPreviewEditName.tsx +6 -5
- package/src/components/HMSPreviewHLSLiveIndicator.tsx +58 -0
- package/src/components/HMSPreviewJoinButton.tsx +44 -4
- package/src/components/HMSPreviewNetworkQuality.tsx +40 -0
- package/src/components/HMSPreviewPeersList.tsx +12 -72
- package/src/components/HMSPreviewSubtitle.tsx +27 -3
- package/src/components/HMSPreviewTile.tsx +13 -91
- package/src/components/HMSPreviewTitle.tsx +0 -1
- package/src/components/HMSRoomOptions.tsx +2 -8
- package/src/components/HMSShowNetworkQuality.tsx +0 -1
- package/src/components/Meeting.tsx +11 -0
- package/src/components/MenuModal/Menu.tsx +1 -1
- package/src/components/Modals.tsx +4 -299
- package/src/components/Participants/ParticipantsList.tsx +0 -24
- package/src/components/PeerSettingsModalContent.tsx +9 -23
- package/src/components/Preview.tsx +131 -48
- package/src/components/RoomSettingsModalContent.tsx +1 -138
- package/src/components/index.ts +0 -1
- package/src/hooks/useHmsInstance.ts +0 -1
- package/src/hooks-util-selectors.tsx +10 -0
- package/src/hooks-util.ts +168 -89
- package/src/redux/actionTypes.ts +8 -0
- package/src/redux/actions/index.ts +23 -2
- package/src/redux/reducers/appState.ts +9 -0
- package/src/redux/reducers/hmsStates.ts +28 -1
- package/src/redux/reducers/userState.ts +2 -2
- package/src/utils/theme.ts +6 -1
- package/src/utils/types.ts +3 -4
- package/src/utils.ts +2 -2
- package/lib/commonjs/components/HMSPreviewDeviceSettings.js.map +0 -1
- package/lib/commonjs/components/ZoomableView.js +0 -84
- package/lib/commonjs/components/ZoomableView.js.map +0 -1
- package/lib/module/components/HMSPreviewDeviceSettings.js +0 -296
- package/lib/module/components/HMSPreviewDeviceSettings.js.map +0 -1
- package/lib/module/components/ZoomableView.js +0 -76
- package/lib/module/components/ZoomableView.js.map +0 -1
- package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts +0 -3
- package/lib/typescript/components/HMSPreviewDeviceSettings.d.ts.map +0 -1
- package/lib/typescript/components/ZoomableView.d.ts +0 -6
- package/lib/typescript/components/ZoomableView.d.ts.map +0 -1
- package/src/components/HMSPreviewDeviceSettings.tsx +0 -387
- package/src/components/ZoomableView.tsx +0 -91
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { Animated, StyleSheet } from 'react-native';
|
|
3
|
-
import { PinchGestureHandler, GestureHandlerRootView, PanGestureHandler, State } from 'react-native-gesture-handler';
|
|
4
|
-
import { COLORS } from '../utils/theme';
|
|
5
|
-
const ZoomableView = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
children
|
|
8
|
-
} = _ref;
|
|
9
|
-
const baseScale = useRef(new Animated.Value(1)).current;
|
|
10
|
-
const pinchScale = useRef(new Animated.Value(1)).current;
|
|
11
|
-
const scale = Animated.multiply(baseScale, pinchScale);
|
|
12
|
-
let lastScale = 1;
|
|
13
|
-
const translateX = useRef(new Animated.Value(1)).current;
|
|
14
|
-
const translateY = useRef(new Animated.Value(1)).current;
|
|
15
|
-
const handlePinch = Animated.event([{
|
|
16
|
-
nativeEvent: {
|
|
17
|
-
scale: pinchScale
|
|
18
|
-
}
|
|
19
|
-
}], {
|
|
20
|
-
useNativeDriver: true
|
|
21
|
-
});
|
|
22
|
-
const handlePan = Animated.event([{
|
|
23
|
-
nativeEvent: {
|
|
24
|
-
translationX: translateX,
|
|
25
|
-
translationY: translateY
|
|
26
|
-
}
|
|
27
|
-
}], {
|
|
28
|
-
useNativeDriver: true
|
|
29
|
-
});
|
|
30
|
-
const onHandlerStateChange = useCallback(() => {
|
|
31
|
-
translateY.extractOffset();
|
|
32
|
-
translateX.extractOffset();
|
|
33
|
-
}, [translateX, translateY]);
|
|
34
|
-
const onPinchHandlerStateChange = event => {
|
|
35
|
-
if (event.nativeEvent.oldState === State.ACTIVE) {
|
|
36
|
-
lastScale *= event.nativeEvent.scale;
|
|
37
|
-
baseScale.setValue(lastScale);
|
|
38
|
-
pinchScale.setValue(1);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
return /*#__PURE__*/React.createElement(GestureHandlerRootView, {
|
|
42
|
-
style: styles.container
|
|
43
|
-
}, /*#__PURE__*/React.createElement(PanGestureHandler, {
|
|
44
|
-
onGestureEvent: handlePan,
|
|
45
|
-
onHandlerStateChange: onHandlerStateChange
|
|
46
|
-
}, /*#__PURE__*/React.createElement(Animated.View, null, /*#__PURE__*/React.createElement(PinchGestureHandler, {
|
|
47
|
-
onGestureEvent: handlePinch,
|
|
48
|
-
onHandlerStateChange: onPinchHandlerStateChange
|
|
49
|
-
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
50
|
-
style: [styles.zoomableView, {
|
|
51
|
-
transform: [{
|
|
52
|
-
scale: scale
|
|
53
|
-
}, {
|
|
54
|
-
translateX
|
|
55
|
-
}, {
|
|
56
|
-
translateY
|
|
57
|
-
}]
|
|
58
|
-
}]
|
|
59
|
-
}, children)))));
|
|
60
|
-
};
|
|
61
|
-
export { ZoomableView };
|
|
62
|
-
const styles = StyleSheet.create({
|
|
63
|
-
container: {
|
|
64
|
-
backgroundColor: COLORS.BLACK
|
|
65
|
-
},
|
|
66
|
-
zoomableView: {
|
|
67
|
-
width: '100%',
|
|
68
|
-
marginVertical: 1,
|
|
69
|
-
padding: 0.5,
|
|
70
|
-
overflow: 'hidden',
|
|
71
|
-
borderRadius: 10,
|
|
72
|
-
justifyContent: 'center',
|
|
73
|
-
alignSelf: 'center'
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=ZoomableView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useRef","Animated","StyleSheet","PinchGestureHandler","GestureHandlerRootView","PanGestureHandler","State","COLORS","ZoomableView","_ref","children","baseScale","Value","current","pinchScale","scale","multiply","lastScale","translateX","translateY","handlePinch","event","nativeEvent","useNativeDriver","handlePan","translationX","translationY","onHandlerStateChange","extractOffset","onPinchHandlerStateChange","oldState","ACTIVE","setValue","createElement","style","styles","container","onGestureEvent","View","zoomableView","transform","create","backgroundColor","BLACK","width","marginVertical","padding","overflow","borderRadius","justifyContent","alignSelf"],"sourceRoot":"../../../src","sources":["components/ZoomableView.tsx"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HMSPreviewDeviceSettings.d.ts","sourceRoot":"","sources":["../../../src/components/HMSPreviewDeviceSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiC/B,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EA4P5C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomableView.d.ts","sourceRoot":"","sources":["../../../src/components/ZoomableView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAenD,QAAA,MAAM,YAAY;eAA+B,MAAM,SAAS;uBA0D/D,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import Modal from 'react-native-modal';
|
|
3
|
-
import {
|
|
4
|
-
LayoutAnimation,
|
|
5
|
-
Platform,
|
|
6
|
-
ScrollView,
|
|
7
|
-
StyleSheet,
|
|
8
|
-
Switch,
|
|
9
|
-
Text,
|
|
10
|
-
TouchableHighlight,
|
|
11
|
-
TouchableOpacity,
|
|
12
|
-
View,
|
|
13
|
-
} from 'react-native';
|
|
14
|
-
import Toast from 'react-native-simple-toast';
|
|
15
|
-
import { useDispatch, useSelector } from 'react-redux';
|
|
16
|
-
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
17
|
-
import {
|
|
18
|
-
HMSUpdateListenerActions,
|
|
19
|
-
HMSAudioDevice,
|
|
20
|
-
} from '@100mslive/react-native-hms';
|
|
21
|
-
|
|
22
|
-
import { ChevronIcon, SettingsIcon, SpeakerIcon } from '../Icons';
|
|
23
|
-
import { PressableIcon } from './PressableIcon';
|
|
24
|
-
import { COLORS } from '../utils/theme';
|
|
25
|
-
import { CloseIcon } from '../Icons';
|
|
26
|
-
import { useHMSInstance } from '../hooks-util';
|
|
27
|
-
import type { RootState } from '../redux';
|
|
28
|
-
import { setRoomLocallyMuted } from '../redux/actions';
|
|
29
|
-
|
|
30
|
-
enum PreviewModalCloseActions {
|
|
31
|
-
SWITCH_AUDIO_OUTPUT_IOS,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const HMSPreviewDeviceSettings: React.FC = () => {
|
|
35
|
-
const actionAfterModalHide = React.useRef<PreviewModalCloseActions | null>(
|
|
36
|
-
null
|
|
37
|
-
);
|
|
38
|
-
const hmsInstance = useHMSInstance();
|
|
39
|
-
const dispatch = useDispatch();
|
|
40
|
-
const [settingsModalVisible, setSettingsModalVisible] = React.useState(false);
|
|
41
|
-
|
|
42
|
-
/// VVV
|
|
43
|
-
const [deviceListDropdownOpen, setDeviceListDropdownOpen] =
|
|
44
|
-
React.useState(false);
|
|
45
|
-
const [currentAudioOutputDevice, setCurrentAudioOutputDevice] =
|
|
46
|
-
React.useState<HMSAudioDevice | null>(null);
|
|
47
|
-
const [availableAudioOutputDevices, setAvailableAudioOutputDevices] =
|
|
48
|
-
React.useState<HMSAudioDevice[]>([]);
|
|
49
|
-
/// ^^^
|
|
50
|
-
|
|
51
|
-
const roomLocallyMuted = useSelector(
|
|
52
|
-
(state: RootState) => state.hmsStates.roomLocallyMuted
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
React.useEffect(() => {
|
|
56
|
-
if (Platform.OS === 'android') {
|
|
57
|
-
let ignore = false;
|
|
58
|
-
|
|
59
|
-
const getCurrentAudioOutputDevice = async () => {
|
|
60
|
-
const device = await hmsInstance.getAudioOutputRouteType();
|
|
61
|
-
if (!ignore) {
|
|
62
|
-
setCurrentAudioOutputDevice(device);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const getAvailableAudioOutputDevices = async () => {
|
|
67
|
-
const devices = await hmsInstance.getAudioDevicesList();
|
|
68
|
-
if (!ignore) {
|
|
69
|
-
setAvailableAudioOutputDevices(devices);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
getCurrentAudioOutputDevice();
|
|
74
|
-
getAvailableAudioOutputDevices();
|
|
75
|
-
|
|
76
|
-
return () => {
|
|
77
|
-
ignore = true;
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}, [hmsInstance]);
|
|
81
|
-
|
|
82
|
-
const cleanup = () => {
|
|
83
|
-
setDeviceListDropdownOpen(false);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
const closeModal = () => {
|
|
87
|
-
setSettingsModalVisible(false);
|
|
88
|
-
cleanup();
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
// closes modal and no action will be taken after modal has been closed
|
|
92
|
-
const dismissModal = () => {
|
|
93
|
-
actionAfterModalHide.current = null;
|
|
94
|
-
closeModal();
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const handleSpeakerChange = () => {
|
|
98
|
-
if (Platform.OS === 'ios') {
|
|
99
|
-
actionAfterModalHide.current =
|
|
100
|
-
PreviewModalCloseActions.SWITCH_AUDIO_OUTPUT_IOS;
|
|
101
|
-
closeModal();
|
|
102
|
-
} else {
|
|
103
|
-
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
104
|
-
setDeviceListDropdownOpen((prev) => !prev);
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
React.useEffect(() => {
|
|
109
|
-
if (Platform.OS === 'android') {
|
|
110
|
-
let ignore = false;
|
|
111
|
-
hmsInstance.setAudioDeviceChangeListener((data: any) => {
|
|
112
|
-
if (!ignore && data) {
|
|
113
|
-
setCurrentAudioOutputDevice(data.device);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
Toast.showWithGravity(
|
|
117
|
-
`Audio Device Output changed to: ${getDescription(data?.device)}`,
|
|
118
|
-
Toast.LONG,
|
|
119
|
-
Toast.TOP
|
|
120
|
-
);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
return () => {
|
|
124
|
-
ignore = true;
|
|
125
|
-
|
|
126
|
-
hmsInstance.removeEventListener(
|
|
127
|
-
HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED
|
|
128
|
-
);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
}, [hmsInstance]);
|
|
132
|
-
|
|
133
|
-
const handleOnModalClose = () => {
|
|
134
|
-
if (actionAfterModalHide.current === null) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (
|
|
139
|
-
actionAfterModalHide.current ===
|
|
140
|
-
PreviewModalCloseActions.SWITCH_AUDIO_OUTPUT_IOS
|
|
141
|
-
) {
|
|
142
|
-
hmsInstance.switchAudioOutputUsingIOSUI();
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const handleMuteRoom = () => {
|
|
147
|
-
hmsInstance.setPlaybackForAllAudio(!roomLocallyMuted);
|
|
148
|
-
dispatch(setRoomLocallyMuted(!roomLocallyMuted));
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const handleSelectAudioDevice = (device: HMSAudioDevice) => {
|
|
152
|
-
hmsInstance.switchAudioOutput(device);
|
|
153
|
-
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
154
|
-
setDeviceListDropdownOpen(false);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
return (
|
|
158
|
-
<View>
|
|
159
|
-
<PressableIcon onPress={() => setSettingsModalVisible(true)}>
|
|
160
|
-
<SettingsIcon />
|
|
161
|
-
</PressableIcon>
|
|
162
|
-
|
|
163
|
-
<Modal
|
|
164
|
-
isVisible={settingsModalVisible}
|
|
165
|
-
animationIn={'slideInUp'}
|
|
166
|
-
animationOut={'slideOutDown'}
|
|
167
|
-
backdropColor={COLORS.BACKGROUND.DIM}
|
|
168
|
-
backdropOpacity={0.3}
|
|
169
|
-
onBackButtonPress={dismissModal}
|
|
170
|
-
onBackdropPress={dismissModal}
|
|
171
|
-
useNativeDriver={true}
|
|
172
|
-
onModalHide={handleOnModalClose}
|
|
173
|
-
useNativeDriverForBackdrop={true}
|
|
174
|
-
hideModalContentWhileAnimating={true}
|
|
175
|
-
// swipeDirection={['up', 'down']}
|
|
176
|
-
// swipe
|
|
177
|
-
style={styles.modal}
|
|
178
|
-
>
|
|
179
|
-
<SafeAreaView style={styles.container}>
|
|
180
|
-
<View style={styles.header}>
|
|
181
|
-
<Text style={styles.headerText}>Device Settings</Text>
|
|
182
|
-
|
|
183
|
-
<TouchableOpacity
|
|
184
|
-
onPress={dismissModal}
|
|
185
|
-
hitSlop={styles.closeIconHitSlop}
|
|
186
|
-
>
|
|
187
|
-
<CloseIcon />
|
|
188
|
-
</TouchableOpacity>
|
|
189
|
-
</View>
|
|
190
|
-
|
|
191
|
-
<View style={styles.divider} />
|
|
192
|
-
|
|
193
|
-
<Text style={styles.itemLabel}>Speakers</Text>
|
|
194
|
-
|
|
195
|
-
<View>
|
|
196
|
-
<TouchableHighlight
|
|
197
|
-
underlayColor={COLORS.SURFACE.DEFAULT}
|
|
198
|
-
style={styles.item}
|
|
199
|
-
onPress={handleSpeakerChange}
|
|
200
|
-
>
|
|
201
|
-
<>
|
|
202
|
-
<View style={styles.itemTextContainer}>
|
|
203
|
-
<SpeakerIcon muted={false} />
|
|
204
|
-
|
|
205
|
-
<Text style={styles.itemText} numberOfLines={1}>
|
|
206
|
-
{currentAudioOutputDevice
|
|
207
|
-
? getDescription(currentAudioOutputDevice)
|
|
208
|
-
: 'Switch Audio Output Device'}
|
|
209
|
-
</Text>
|
|
210
|
-
</View>
|
|
211
|
-
|
|
212
|
-
<ChevronIcon
|
|
213
|
-
direction="down"
|
|
214
|
-
style={
|
|
215
|
-
Platform.OS === 'ios'
|
|
216
|
-
? styles.downToRightChevronIcon
|
|
217
|
-
: deviceListDropdownOpen
|
|
218
|
-
? styles.downToUpChevronIcon
|
|
219
|
-
: null
|
|
220
|
-
}
|
|
221
|
-
/>
|
|
222
|
-
</>
|
|
223
|
-
</TouchableHighlight>
|
|
224
|
-
|
|
225
|
-
{Platform.OS === 'android' && deviceListDropdownOpen ? (
|
|
226
|
-
<View
|
|
227
|
-
style={{
|
|
228
|
-
height: 160,
|
|
229
|
-
marginTop: 8,
|
|
230
|
-
overflow: 'hidden',
|
|
231
|
-
borderRadius: 8,
|
|
232
|
-
backgroundColor: COLORS.SURFACE.DEFAULT,
|
|
233
|
-
}}
|
|
234
|
-
>
|
|
235
|
-
<ScrollView showsVerticalScrollIndicator={true}>
|
|
236
|
-
{availableAudioOutputDevices.sort().map((device) => (
|
|
237
|
-
<TouchableOpacity
|
|
238
|
-
disabled={device === currentAudioOutputDevice}
|
|
239
|
-
style={{
|
|
240
|
-
paddingHorizontal: 16,
|
|
241
|
-
paddingVertical: 12,
|
|
242
|
-
backgroundColor:
|
|
243
|
-
device === currentAudioOutputDevice
|
|
244
|
-
? COLORS.PRIMARY.DARK
|
|
245
|
-
: undefined,
|
|
246
|
-
}}
|
|
247
|
-
onPress={() => handleSelectAudioDevice(device)}
|
|
248
|
-
>
|
|
249
|
-
<Text style={styles.itemText}>
|
|
250
|
-
{getDescription(device)}
|
|
251
|
-
</Text>
|
|
252
|
-
</TouchableOpacity>
|
|
253
|
-
))}
|
|
254
|
-
</ScrollView>
|
|
255
|
-
</View>
|
|
256
|
-
) : null}
|
|
257
|
-
</View>
|
|
258
|
-
|
|
259
|
-
<TouchableOpacity
|
|
260
|
-
style={styles.item2}
|
|
261
|
-
onPress={handleMuteRoom}
|
|
262
|
-
activeOpacity={0.7}
|
|
263
|
-
>
|
|
264
|
-
<View style={styles.itemTextContainer}>
|
|
265
|
-
<SpeakerIcon muted={roomLocallyMuted} />
|
|
266
|
-
|
|
267
|
-
<Text style={styles.itemText} numberOfLines={1}>
|
|
268
|
-
Mute Room
|
|
269
|
-
</Text>
|
|
270
|
-
</View>
|
|
271
|
-
|
|
272
|
-
<Switch
|
|
273
|
-
value={roomLocallyMuted}
|
|
274
|
-
thumbColor={COLORS.BASE.WHITE}
|
|
275
|
-
trackColor={{
|
|
276
|
-
true: COLORS.PRIMARY.DEFAULT,
|
|
277
|
-
false: COLORS.SECONDARY.DISABLED,
|
|
278
|
-
}}
|
|
279
|
-
onValueChange={handleMuteRoom}
|
|
280
|
-
/>
|
|
281
|
-
</TouchableOpacity>
|
|
282
|
-
</SafeAreaView>
|
|
283
|
-
</Modal>
|
|
284
|
-
</View>
|
|
285
|
-
);
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
const styles = StyleSheet.create({
|
|
289
|
-
modal: {
|
|
290
|
-
margin: 0,
|
|
291
|
-
justifyContent: 'flex-end',
|
|
292
|
-
},
|
|
293
|
-
container: {
|
|
294
|
-
backgroundColor: COLORS.SURFACE.DIM,
|
|
295
|
-
borderTopLeftRadius: 16,
|
|
296
|
-
borderTopRightRadius: 16,
|
|
297
|
-
padding: 24,
|
|
298
|
-
},
|
|
299
|
-
header: {
|
|
300
|
-
flexDirection: 'row',
|
|
301
|
-
alignItems: 'center',
|
|
302
|
-
justifyContent: 'space-between',
|
|
303
|
-
},
|
|
304
|
-
headerText: {
|
|
305
|
-
color: COLORS.SURFACE.ON_SURFACE.HIGH,
|
|
306
|
-
fontSize: 16,
|
|
307
|
-
fontFamily: 'Inter',
|
|
308
|
-
fontWeight: '500',
|
|
309
|
-
lineHeight: 24,
|
|
310
|
-
letterSpacing: 0.15,
|
|
311
|
-
},
|
|
312
|
-
closeIconHitSlop: {
|
|
313
|
-
bottom: 16,
|
|
314
|
-
left: 16,
|
|
315
|
-
right: 16,
|
|
316
|
-
top: 16,
|
|
317
|
-
},
|
|
318
|
-
divider: {
|
|
319
|
-
marginVertical: 24,
|
|
320
|
-
height: 1,
|
|
321
|
-
backgroundColor: COLORS.BORDER.DEFAULT,
|
|
322
|
-
},
|
|
323
|
-
itemLabel: {
|
|
324
|
-
color: COLORS.SURFACE.ON_SURFACE.HIGH,
|
|
325
|
-
fontSize: 14,
|
|
326
|
-
fontFamily: 'Inter',
|
|
327
|
-
fontWeight: '400',
|
|
328
|
-
lineHeight: 20,
|
|
329
|
-
letterSpacing: 0.25,
|
|
330
|
-
marginBottom: 8,
|
|
331
|
-
},
|
|
332
|
-
item: {
|
|
333
|
-
paddingHorizontal: 16,
|
|
334
|
-
paddingVertical: 12,
|
|
335
|
-
borderRadius: 8,
|
|
336
|
-
backgroundColor: COLORS.SURFACE.BRIGHT,
|
|
337
|
-
flexDirection: 'row',
|
|
338
|
-
alignItems: 'center',
|
|
339
|
-
justifyContent: 'space-between',
|
|
340
|
-
},
|
|
341
|
-
item2: {
|
|
342
|
-
marginTop: 24,
|
|
343
|
-
paddingHorizontal: 16,
|
|
344
|
-
paddingVertical: 12,
|
|
345
|
-
// borderRadius: 8,
|
|
346
|
-
// backgroundColor: COLORS.SURFACE.BRIGHT,
|
|
347
|
-
flexDirection: 'row',
|
|
348
|
-
alignItems: 'center',
|
|
349
|
-
justifyContent: 'space-between',
|
|
350
|
-
},
|
|
351
|
-
itemTextContainer: {
|
|
352
|
-
flex: 1,
|
|
353
|
-
flexDirection: 'row',
|
|
354
|
-
alignItems: 'center',
|
|
355
|
-
},
|
|
356
|
-
itemText: {
|
|
357
|
-
flex: 1,
|
|
358
|
-
marginHorizontal: 16,
|
|
359
|
-
color: COLORS.SURFACE.ON_SURFACE.HIGH,
|
|
360
|
-
fontSize: 16,
|
|
361
|
-
fontFamily: 'Inter',
|
|
362
|
-
fontWeight: '400',
|
|
363
|
-
lineHeight: 24,
|
|
364
|
-
letterSpacing: 0.5,
|
|
365
|
-
},
|
|
366
|
-
downToRightChevronIcon: {
|
|
367
|
-
transform: [{ rotateZ: '-90deg' }],
|
|
368
|
-
},
|
|
369
|
-
downToUpChevronIcon: {
|
|
370
|
-
transform: [{ rotateZ: '-180deg' }],
|
|
371
|
-
},
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
const getDescription = (ofDevice: HMSAudioDevice) => {
|
|
375
|
-
switch (ofDevice) {
|
|
376
|
-
case HMSAudioDevice.AUTOMATIC:
|
|
377
|
-
return 'Automatic';
|
|
378
|
-
case HMSAudioDevice.BLUETOOTH:
|
|
379
|
-
return 'Bluetooth';
|
|
380
|
-
case HMSAudioDevice.EARPIECE:
|
|
381
|
-
return 'Earpiece';
|
|
382
|
-
case HMSAudioDevice.SPEAKER_PHONE:
|
|
383
|
-
return 'Phone Speaker';
|
|
384
|
-
case HMSAudioDevice.WIRED_HEADSET:
|
|
385
|
-
return 'Wired Headset';
|
|
386
|
-
}
|
|
387
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { Animated, StyleSheet } from 'react-native';
|
|
3
|
-
import {
|
|
4
|
-
PinchGestureHandler,
|
|
5
|
-
GestureHandlerRootView,
|
|
6
|
-
PanGestureHandler,
|
|
7
|
-
State,
|
|
8
|
-
} from 'react-native-gesture-handler';
|
|
9
|
-
import type {
|
|
10
|
-
HandlerStateChangeEvent,
|
|
11
|
-
PinchGestureHandlerEventPayload,
|
|
12
|
-
} from 'react-native-gesture-handler';
|
|
13
|
-
|
|
14
|
-
import { COLORS } from '../utils/theme';
|
|
15
|
-
|
|
16
|
-
const ZoomableView = ({ children }: { children?: React.ReactNode }) => {
|
|
17
|
-
const baseScale = useRef(new Animated.Value(1)).current;
|
|
18
|
-
const pinchScale = useRef(new Animated.Value(1)).current;
|
|
19
|
-
const scale = Animated.multiply(baseScale, pinchScale);
|
|
20
|
-
let lastScale = 1;
|
|
21
|
-
const translateX = useRef(new Animated.Value(1)).current;
|
|
22
|
-
const translateY = useRef(new Animated.Value(1)).current;
|
|
23
|
-
|
|
24
|
-
const handlePinch = Animated.event([{ nativeEvent: { scale: pinchScale } }], {
|
|
25
|
-
useNativeDriver: true,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
const handlePan = Animated.event(
|
|
29
|
-
[{ nativeEvent: { translationX: translateX, translationY: translateY } }],
|
|
30
|
-
{ useNativeDriver: true }
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const onHandlerStateChange = useCallback(() => {
|
|
34
|
-
translateY.extractOffset();
|
|
35
|
-
translateX.extractOffset();
|
|
36
|
-
}, [translateX, translateY]);
|
|
37
|
-
|
|
38
|
-
const onPinchHandlerStateChange = (
|
|
39
|
-
event: HandlerStateChangeEvent<PinchGestureHandlerEventPayload>
|
|
40
|
-
) => {
|
|
41
|
-
if (event.nativeEvent.oldState === State.ACTIVE) {
|
|
42
|
-
lastScale *= event.nativeEvent.scale;
|
|
43
|
-
baseScale.setValue(lastScale);
|
|
44
|
-
pinchScale.setValue(1);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<GestureHandlerRootView style={styles.container}>
|
|
50
|
-
<PanGestureHandler
|
|
51
|
-
onGestureEvent={handlePan}
|
|
52
|
-
onHandlerStateChange={onHandlerStateChange}
|
|
53
|
-
>
|
|
54
|
-
<Animated.View>
|
|
55
|
-
<PinchGestureHandler
|
|
56
|
-
onGestureEvent={handlePinch}
|
|
57
|
-
onHandlerStateChange={onPinchHandlerStateChange}
|
|
58
|
-
>
|
|
59
|
-
<Animated.View
|
|
60
|
-
style={[
|
|
61
|
-
styles.zoomableView,
|
|
62
|
-
{
|
|
63
|
-
transform: [{ scale: scale }, { translateX }, { translateY }],
|
|
64
|
-
},
|
|
65
|
-
]}
|
|
66
|
-
>
|
|
67
|
-
{children}
|
|
68
|
-
</Animated.View>
|
|
69
|
-
</PinchGestureHandler>
|
|
70
|
-
</Animated.View>
|
|
71
|
-
</PanGestureHandler>
|
|
72
|
-
</GestureHandlerRootView>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export { ZoomableView };
|
|
77
|
-
|
|
78
|
-
const styles = StyleSheet.create({
|
|
79
|
-
container: {
|
|
80
|
-
backgroundColor: COLORS.BLACK,
|
|
81
|
-
},
|
|
82
|
-
zoomableView: {
|
|
83
|
-
width: '100%',
|
|
84
|
-
marginVertical: 1,
|
|
85
|
-
padding: 0.5,
|
|
86
|
-
overflow: 'hidden',
|
|
87
|
-
borderRadius: 10,
|
|
88
|
-
justifyContent: 'center',
|
|
89
|
-
alignSelf: 'center',
|
|
90
|
-
},
|
|
91
|
-
});
|