@100mslive/react-native-room-kit 1.0.9 → 1.1.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/README.md +5 -6
- package/lib/commonjs/HMSRoomSetup.js +49 -0
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Add/assets/add-circle.png +0 -0
- package/lib/commonjs/Icons/Add/assets/add-circle@2x.png +0 -0
- package/lib/commonjs/Icons/Add/assets/add-circle@3x.png +0 -0
- package/lib/commonjs/Icons/Add/index.js +35 -0
- package/lib/commonjs/Icons/Add/index.js.map +1 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox@2x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/assets/checkbox@3x.png +0 -0
- package/lib/commonjs/Icons/CheckBox/index.js +34 -0
- package/lib/commonjs/Icons/CheckBox/index.js.map +1 -0
- package/lib/commonjs/Icons/Poll/assets/poll.png +0 -0
- package/lib/commonjs/Icons/Poll/assets/poll@2x.png +0 -0
- package/lib/commonjs/Icons/Poll/assets/poll@3x.png +0 -0
- package/lib/commonjs/Icons/Poll/index.js +33 -0
- package/lib/commonjs/Icons/Poll/index.js.map +1 -0
- package/lib/commonjs/Icons/PollVote/assets/poll-vote.png +0 -0
- package/lib/commonjs/Icons/PollVote/assets/poll-vote@2x.png +0 -0
- package/lib/commonjs/Icons/PollVote/assets/poll-vote@3x.png +0 -0
- package/lib/commonjs/Icons/PollVote/index.js +33 -0
- package/lib/commonjs/Icons/PollVote/index.js.map +1 -0
- package/lib/commonjs/Icons/Quiz/assets/quiz.png +0 -0
- package/lib/commonjs/Icons/Quiz/assets/quiz@2x.png +0 -0
- package/lib/commonjs/Icons/Quiz/assets/quiz@3x.png +0 -0
- package/lib/commonjs/Icons/Quiz/index.js +33 -0
- package/lib/commonjs/Icons/Quiz/index.js.map +1 -0
- package/lib/commonjs/Icons/TrashBin/assets/trash-bin.png +0 -0
- package/lib/commonjs/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
- package/lib/commonjs/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
- package/lib/commonjs/Icons/TrashBin/index.js +34 -0
- package/lib/commonjs/Icons/TrashBin/index.js.map +1 -0
- package/lib/commonjs/Icons/index.js +66 -0
- package/lib/commonjs/Icons/index.js.map +1 -1
- package/lib/commonjs/components/CheckboxInputRow.js +53 -0
- package/lib/commonjs/components/CheckboxInputRow.js.map +1 -0
- package/lib/commonjs/components/CreatePoll.js +163 -0
- package/lib/commonjs/components/CreatePoll.js.map +1 -0
- package/lib/commonjs/components/Footer.js +6 -1
- package/lib/commonjs/components/Footer.js.map +1 -1
- package/lib/commonjs/components/GridView.js +9 -4
- package/lib/commonjs/components/GridView.js.map +1 -1
- package/lib/commonjs/components/HLSPlayerEmoticons.js +2 -3
- package/lib/commonjs/components/HLSPlayerEmoticons.js.map +1 -1
- package/lib/commonjs/components/HMSBaseButton.js +4 -2
- package/lib/commonjs/components/HMSBaseButton.js.map +1 -1
- package/lib/commonjs/components/HMSNotification.js +5 -1
- package/lib/commonjs/components/HMSNotification.js.map +1 -1
- package/lib/commonjs/components/HMSNotifications.js +4 -0
- package/lib/commonjs/components/HMSNotifications.js.map +1 -1
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js +95 -0
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js.map +1 -0
- package/lib/commonjs/components/HMSRoomOptions.js +2 -1
- package/lib/commonjs/components/HMSRoomOptions.js.map +1 -1
- package/lib/commonjs/components/HMSSecondaryButton.js +56 -0
- package/lib/commonjs/components/HMSSecondaryButton.js.map +1 -0
- package/lib/commonjs/components/Meeting.js +1 -0
- package/lib/commonjs/components/Meeting.js.map +1 -1
- package/lib/commonjs/components/OverlayContainer.js +6 -3
- package/lib/commonjs/components/OverlayContainer.js.map +1 -1
- package/lib/commonjs/components/OverlayedViews.js +5 -2
- package/lib/commonjs/components/OverlayedViews.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js +18 -87
- package/lib/commonjs/components/PeerVideoTile/HMSPinchGesture.js.map +1 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js +3 -1
- package/lib/commonjs/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js +185 -0
- package/lib/commonjs/components/PollAndQuizQuestionResponseCard.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizVoting.js +136 -0
- package/lib/commonjs/components/PollAndQuizVoting.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizzStateLabel.js +72 -0
- package/lib/commonjs/components/PollAndQuizzStateLabel.js.map +1 -0
- package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js +68 -0
- package/lib/commonjs/components/PollQDeleteConfirmationSheetView.js.map +1 -0
- package/lib/commonjs/components/PollQuestion.js +368 -0
- package/lib/commonjs/components/PollQuestion.js.map +1 -0
- package/lib/commonjs/components/PollQuestionDeleteConfirmation.js +97 -0
- package/lib/commonjs/components/PollQuestionDeleteConfirmation.js.map +1 -0
- package/lib/commonjs/components/PollQuestions.js +189 -0
- package/lib/commonjs/components/PollQuestions.js.map +1 -0
- package/lib/commonjs/components/PollResponseProgressView.js +68 -0
- package/lib/commonjs/components/PollResponseProgressView.js.map +1 -0
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js +59 -0
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js.map +1 -0
- package/lib/commonjs/components/PollsAndQuizzesCard.js +97 -0
- package/lib/commonjs/components/PollsAndQuizzesCard.js.map +1 -0
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js +159 -0
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js.map +1 -0
- package/lib/commonjs/components/PollsConfigAndList.js +32 -0
- package/lib/commonjs/components/PollsConfigAndList.js.map +1 -0
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js +76 -0
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js.map +1 -0
- package/lib/commonjs/components/RadioInput.js +42 -0
- package/lib/commonjs/components/RadioInput.js.map +1 -0
- package/lib/commonjs/components/RadioInputRow.js +57 -0
- package/lib/commonjs/components/RadioInputRow.js.map +1 -0
- package/lib/commonjs/components/RoomSettingsModalContent.js +31 -6
- package/lib/commonjs/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/commonjs/components/SwitchRow.js +2 -1
- package/lib/commonjs/components/SwitchRow.js.map +1 -1
- package/lib/commonjs/components/TilesContainer.js +1 -1
- package/lib/commonjs/components/WebrtcView.js +14 -6
- package/lib/commonjs/components/WebrtcView.js.map +1 -1
- package/lib/commonjs/hooks-util.js +36 -1
- package/lib/commonjs/hooks-util.js.map +1 -1
- package/lib/commonjs/redux/actionTypes.js +38 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +140 -1
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/index.js +3 -1
- package/lib/commonjs/redux/reducers/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/polls.js +251 -0
- package/lib/commonjs/redux/reducers/polls.js.map +1 -0
- package/lib/commonjs/types.js +1 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/functions.js +6 -1
- package/lib/commonjs/utils/functions.js.map +1 -1
- package/lib/commonjs/utils/types.js +1 -0
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +52 -3
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Add/assets/add-circle.png +0 -0
- package/lib/module/Icons/Add/assets/add-circle@2x.png +0 -0
- package/lib/module/Icons/Add/assets/add-circle@3x.png +0 -0
- package/lib/module/Icons/Add/index.js +27 -0
- package/lib/module/Icons/Add/index.js.map +1 -0
- package/lib/module/Icons/CheckBox/assets/checkbox-checked.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox@2x.png +0 -0
- package/lib/module/Icons/CheckBox/assets/checkbox@3x.png +0 -0
- package/lib/module/Icons/CheckBox/index.js +26 -0
- package/lib/module/Icons/CheckBox/index.js.map +1 -0
- package/lib/module/Icons/Poll/assets/poll.png +0 -0
- package/lib/module/Icons/Poll/assets/poll@2x.png +0 -0
- package/lib/module/Icons/Poll/assets/poll@3x.png +0 -0
- package/lib/module/Icons/Poll/index.js +25 -0
- package/lib/module/Icons/Poll/index.js.map +1 -0
- package/lib/module/Icons/PollVote/assets/poll-vote.png +0 -0
- package/lib/module/Icons/PollVote/assets/poll-vote@2x.png +0 -0
- package/lib/module/Icons/PollVote/assets/poll-vote@3x.png +0 -0
- package/lib/module/Icons/PollVote/index.js +25 -0
- package/lib/module/Icons/PollVote/index.js.map +1 -0
- package/lib/module/Icons/Quiz/assets/quiz.png +0 -0
- package/lib/module/Icons/Quiz/assets/quiz@2x.png +0 -0
- package/lib/module/Icons/Quiz/assets/quiz@3x.png +0 -0
- package/lib/module/Icons/Quiz/index.js +25 -0
- package/lib/module/Icons/Quiz/index.js.map +1 -0
- package/lib/module/Icons/TrashBin/assets/trash-bin.png +0 -0
- package/lib/module/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
- package/lib/module/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
- package/lib/module/Icons/TrashBin/index.js +26 -0
- package/lib/module/Icons/TrashBin/index.js.map +1 -0
- package/lib/module/Icons/index.js +6 -0
- package/lib/module/Icons/index.js.map +1 -1
- package/lib/module/components/CheckboxInputRow.js +45 -0
- package/lib/module/components/CheckboxInputRow.js.map +1 -0
- package/lib/module/components/CreatePoll.js +155 -0
- package/lib/module/components/CreatePoll.js.map +1 -0
- package/lib/module/components/Footer.js +6 -1
- package/lib/module/components/Footer.js.map +1 -1
- package/lib/module/components/GridView.js +10 -5
- package/lib/module/components/GridView.js.map +1 -1
- package/lib/module/components/HLSPlayerEmoticons.js +2 -3
- package/lib/module/components/HLSPlayerEmoticons.js.map +1 -1
- package/lib/module/components/HMSBaseButton.js +5 -3
- package/lib/module/components/HMSBaseButton.js.map +1 -1
- package/lib/module/components/HMSNotification.js +5 -1
- package/lib/module/components/HMSNotification.js.map +1 -1
- package/lib/module/components/HMSNotifications.js +4 -0
- package/lib/module/components/HMSNotifications.js.map +1 -1
- package/lib/module/components/HMSPollsQuizzesNotification.js +86 -0
- package/lib/module/components/HMSPollsQuizzesNotification.js.map +1 -0
- package/lib/module/components/HMSRoomOptions.js +2 -1
- package/lib/module/components/HMSRoomOptions.js.map +1 -1
- package/lib/module/components/HMSSecondaryButton.js +47 -0
- package/lib/module/components/HMSSecondaryButton.js.map +1 -0
- package/lib/module/components/Meeting.js +2 -1
- package/lib/module/components/Meeting.js.map +1 -1
- package/lib/module/components/OverlayContainer.js +5 -3
- package/lib/module/components/OverlayContainer.js.map +1 -1
- package/lib/module/components/OverlayedViews.js +5 -2
- package/lib/module/components/OverlayedViews.js.map +1 -1
- package/lib/module/components/PeerVideoTile/HMSPinchGesture.js +18 -87
- package/lib/module/components/PeerVideoTile/HMSPinchGesture.js.map +1 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js +3 -1
- package/lib/module/components/PeerVideoTile/PeerVideoTileView.js.map +1 -1
- package/lib/module/components/PollAndQuizQuestionResponseCard.js +176 -0
- package/lib/module/components/PollAndQuizQuestionResponseCard.js.map +1 -0
- package/lib/module/components/PollAndQuizVoting.js +127 -0
- package/lib/module/components/PollAndQuizVoting.js.map +1 -0
- package/lib/module/components/PollAndQuizzStateLabel.js +63 -0
- package/lib/module/components/PollAndQuizzStateLabel.js.map +1 -0
- package/lib/module/components/PollQDeleteConfirmationSheetView.js +60 -0
- package/lib/module/components/PollQDeleteConfirmationSheetView.js.map +1 -0
- package/lib/module/components/PollQuestion.js +359 -0
- package/lib/module/components/PollQuestion.js.map +1 -0
- package/lib/module/components/PollQuestionDeleteConfirmation.js +88 -0
- package/lib/module/components/PollQuestionDeleteConfirmation.js.map +1 -0
- package/lib/module/components/PollQuestions.js +180 -0
- package/lib/module/components/PollQuestions.js.map +1 -0
- package/lib/module/components/PollResponseProgressView.js +59 -0
- package/lib/module/components/PollResponseProgressView.js.map +1 -0
- package/lib/module/components/PollsAndQuizBottomSheet.js +50 -0
- package/lib/module/components/PollsAndQuizBottomSheet.js.map +1 -0
- package/lib/module/components/PollsAndQuizzesCard.js +88 -0
- package/lib/module/components/PollsAndQuizzesCard.js.map +1 -0
- package/lib/module/components/PollsAndQuizzesModalContent.js +150 -0
- package/lib/module/components/PollsAndQuizzesModalContent.js.map +1 -0
- package/lib/module/components/PollsConfigAndList.js +23 -0
- package/lib/module/components/PollsConfigAndList.js.map +1 -0
- package/lib/module/components/PreviousPollsAndQuizzesList.js +67 -0
- package/lib/module/components/PreviousPollsAndQuizzesList.js.map +1 -0
- package/lib/module/components/RadioInput.js +34 -0
- package/lib/module/components/RadioInput.js.map +1 -0
- package/lib/module/components/RadioInputRow.js +49 -0
- package/lib/module/components/RadioInputRow.js.map +1 -0
- package/lib/module/components/RoomSettingsModalContent.js +32 -7
- package/lib/module/components/RoomSettingsModalContent.js.map +1 -1
- package/lib/module/components/SwitchRow.js +2 -1
- package/lib/module/components/SwitchRow.js.map +1 -1
- package/lib/module/components/TilesContainer.js +1 -1
- package/lib/module/components/WebrtcView.js +15 -7
- package/lib/module/components/WebrtcView.js.map +1 -1
- package/lib/module/hooks-util.js +35 -2
- package/lib/module/hooks-util.js.map +1 -1
- package/lib/module/redux/actionTypes.js +39 -0
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +116 -1
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/index.js +3 -1
- package/lib/module/redux/reducers/index.js.map +1 -1
- package/lib/module/redux/reducers/polls.js +245 -0
- package/lib/module/redux/reducers/polls.js.map +1 -0
- package/lib/module/types.js +1 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/functions.js +5 -1
- package/lib/module/utils/functions.js.map +1 -1
- package/lib/module/utils/types.js +1 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Add/index.d.ts +8 -0
- package/lib/typescript/Icons/Add/index.d.ts.map +1 -0
- package/lib/typescript/Icons/CheckBox/index.d.ts +8 -0
- package/lib/typescript/Icons/CheckBox/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Poll/index.d.ts +7 -0
- package/lib/typescript/Icons/Poll/index.d.ts.map +1 -0
- package/lib/typescript/Icons/PollVote/index.d.ts +7 -0
- package/lib/typescript/Icons/PollVote/index.d.ts.map +1 -0
- package/lib/typescript/Icons/Quiz/index.d.ts +7 -0
- package/lib/typescript/Icons/Quiz/index.d.ts.map +1 -0
- package/lib/typescript/Icons/TrashBin/index.d.ts +7 -0
- package/lib/typescript/Icons/TrashBin/index.d.ts.map +1 -0
- package/lib/typescript/Icons/index.d.ts +6 -0
- package/lib/typescript/Icons/index.d.ts.map +1 -1
- package/lib/typescript/components/CheckboxInputRow.d.ts +13 -0
- package/lib/typescript/components/CheckboxInputRow.d.ts.map +1 -0
- package/lib/typescript/components/CreatePoll.d.ts +5 -0
- package/lib/typescript/components/CreatePoll.d.ts.map +1 -0
- package/lib/typescript/components/Footer.d.ts.map +1 -1
- package/lib/typescript/components/GridView.d.ts.map +1 -1
- package/lib/typescript/components/HLSPlayerEmoticons.d.ts.map +1 -1
- package/lib/typescript/components/HMSBaseButton.d.ts +2 -1
- package/lib/typescript/components/HMSBaseButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSNotifications.d.ts.map +1 -1
- package/lib/typescript/components/HMSPollsQuizzesNotification.d.ts +7 -0
- package/lib/typescript/components/HMSPollsQuizzesNotification.d.ts.map +1 -0
- package/lib/typescript/components/HMSPrimaryButton.d.ts +1 -1
- package/lib/typescript/components/HMSPrimaryButton.d.ts.map +1 -1
- package/lib/typescript/components/HMSRoomOptions.d.ts.map +1 -1
- package/lib/typescript/components/HMSSecondaryButton.d.ts +15 -0
- package/lib/typescript/components/HMSSecondaryButton.d.ts.map +1 -0
- package/lib/typescript/components/Meeting.d.ts.map +1 -1
- package/lib/typescript/components/OverlayContainer.d.ts +5 -1
- package/lib/typescript/components/OverlayContainer.d.ts.map +1 -1
- package/lib/typescript/components/OverlayedViews.d.ts +2 -1
- package/lib/typescript/components/OverlayedViews.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/HMSPinchGesture.d.ts.map +1 -1
- package/lib/typescript/components/PeerVideoTile/PeerVideoTileView.d.ts.map +1 -1
- package/lib/typescript/components/PollAndQuizQuestionResponseCard.d.ts +13 -0
- package/lib/typescript/components/PollAndQuizQuestionResponseCard.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts +6 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizzStateLabel.d.ts +7 -0
- package/lib/typescript/components/PollAndQuizzStateLabel.d.ts.map +1 -0
- package/lib/typescript/components/PollQDeleteConfirmationSheetView.d.ts +6 -0
- package/lib/typescript/components/PollQDeleteConfirmationSheetView.d.ts.map +1 -0
- package/lib/typescript/components/PollQuestion.d.ts +14 -0
- package/lib/typescript/components/PollQuestion.d.ts.map +1 -0
- package/lib/typescript/components/PollQuestionDeleteConfirmation.d.ts +6 -0
- package/lib/typescript/components/PollQuestionDeleteConfirmation.d.ts.map +1 -0
- package/lib/typescript/components/PollQuestions.d.ts +6 -0
- package/lib/typescript/components/PollQuestions.d.ts.map +1 -0
- package/lib/typescript/components/PollResponseProgressView.d.ts +9 -0
- package/lib/typescript/components/PollResponseProgressView.d.ts.map +1 -0
- package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts +3 -0
- package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts.map +1 -0
- package/lib/typescript/components/PollsAndQuizzesCard.d.ts +7 -0
- package/lib/typescript/components/PollsAndQuizzesCard.d.ts.map +1 -0
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts +7 -0
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts.map +1 -0
- package/lib/typescript/components/PollsConfigAndList.d.ts +5 -0
- package/lib/typescript/components/PollsConfigAndList.d.ts.map +1 -0
- package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts +5 -0
- package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts.map +1 -0
- package/lib/typescript/components/RadioInput.d.ts +9 -0
- package/lib/typescript/components/RadioInput.d.ts.map +1 -0
- package/lib/typescript/components/RadioInputRow.d.ts +16 -0
- package/lib/typescript/components/RadioInputRow.d.ts.map +1 -0
- package/lib/typescript/components/RoomSettingsModalContent.d.ts.map +1 -1
- package/lib/typescript/components/SwitchRow.d.ts +2 -1
- package/lib/typescript/components/SwitchRow.d.ts.map +1 -1
- package/lib/typescript/components/WebrtcView.d.ts.map +1 -1
- package/lib/typescript/hooks-util.d.ts +2 -0
- package/lib/typescript/hooks-util.d.ts.map +1 -1
- package/lib/typescript/redux/actionTypes.d.ts +161 -0
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +36 -2
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +13 -0
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +13 -0
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/polls.d.ts +19 -0
- package/lib/typescript/redux/reducers/polls.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +3 -1
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils/functions.d.ts +2 -0
- package/lib/typescript/utils/functions.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +1 -0
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/HMSRoomSetup.tsx +61 -0
- package/src/Icons/Add/assets/add-circle.png +0 -0
- package/src/Icons/Add/assets/add-circle@2x.png +0 -0
- package/src/Icons/Add/assets/add-circle@3x.png +0 -0
- package/src/Icons/Add/index.tsx +37 -0
- package/src/Icons/CheckBox/assets/checkbox-checked.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox-checked@2x.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox-checked@3x.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox@2x.png +0 -0
- package/src/Icons/CheckBox/assets/checkbox@3x.png +0 -0
- package/src/Icons/CheckBox/index.tsx +40 -0
- package/src/Icons/Poll/assets/poll.png +0 -0
- package/src/Icons/Poll/assets/poll@2x.png +0 -0
- package/src/Icons/Poll/assets/poll@3x.png +0 -0
- package/src/Icons/Poll/index.tsx +30 -0
- package/src/Icons/PollVote/assets/poll-vote.png +0 -0
- package/src/Icons/PollVote/assets/poll-vote@2x.png +0 -0
- package/src/Icons/PollVote/assets/poll-vote@3x.png +0 -0
- package/src/Icons/PollVote/index.tsx +33 -0
- package/src/Icons/Quiz/assets/quiz.png +0 -0
- package/src/Icons/Quiz/assets/quiz@2x.png +0 -0
- package/src/Icons/Quiz/assets/quiz@3x.png +0 -0
- package/src/Icons/Quiz/index.tsx +30 -0
- package/src/Icons/TrashBin/assets/trash-bin.png +0 -0
- package/src/Icons/TrashBin/assets/trash-bin@2x.png +0 -0
- package/src/Icons/TrashBin/assets/trash-bin@3x.png +0 -0
- package/src/Icons/TrashBin/index.tsx +34 -0
- package/src/Icons/index.ts +6 -0
- package/src/components/CheckboxInputRow.tsx +68 -0
- package/src/components/CreatePoll.tsx +176 -0
- package/src/components/Footer.tsx +7 -1
- package/src/components/GridView.tsx +14 -5
- package/src/components/HLSPlayerEmoticons.tsx +2 -3
- package/src/components/HMSBaseButton.tsx +8 -3
- package/src/components/HMSNotification.tsx +1 -1
- package/src/components/HMSNotifications.tsx +7 -0
- package/src/components/HMSPollsQuizzesNotification.tsx +110 -0
- package/src/components/HMSPrimaryButton.tsx +1 -1
- package/src/components/HMSRoomOptions.tsx +3 -0
- package/src/components/HMSSecondaryButton.tsx +72 -0
- package/src/components/Meeting.tsx +3 -0
- package/src/components/OverlayContainer.tsx +12 -3
- package/src/components/OverlayedViews.tsx +7 -3
- package/src/components/PeerVideoTile/HMSPinchGesture.tsx +28 -71
- package/src/components/PeerVideoTile/PeerVideoTileView.tsx +4 -1
- package/src/components/PollAndQuizQuestionResponseCard.tsx +311 -0
- package/src/components/PollAndQuizVoting.tsx +157 -0
- package/src/components/PollAndQuizzStateLabel.tsx +83 -0
- package/src/components/PollQDeleteConfirmationSheetView.tsx +82 -0
- package/src/components/PollQuestion.tsx +553 -0
- package/src/components/PollQuestionDeleteConfirmation.tsx +110 -0
- package/src/components/PollQuestions.tsx +259 -0
- package/src/components/PollResponseProgressView.tsx +77 -0
- package/src/components/PollsAndQuizBottomSheet.tsx +83 -0
- package/src/components/PollsAndQuizzesCard.tsx +111 -0
- package/src/components/PollsAndQuizzesModalContent.tsx +198 -0
- package/src/components/PollsConfigAndList.tsx +29 -0
- package/src/components/PreviousPollsAndQuizzesList.tsx +103 -0
- package/src/components/RadioInput.tsx +44 -0
- package/src/components/RadioInputRow.tsx +73 -0
- package/src/components/RoomSettingsModalContent.tsx +23 -0
- package/src/components/SwitchRow.tsx +4 -2
- package/src/components/TilesContainer.tsx +1 -1
- package/src/components/WebrtcView.tsx +27 -9
- package/src/hooks-util.ts +54 -0
- package/src/redux/actionTypes.ts +221 -0
- package/src/redux/actions/index.ts +218 -1
- package/src/redux/reducers/index.ts +2 -0
- package/src/redux/reducers/polls.ts +328 -0
- package/src/types.ts +2 -0
- package/src/utils/functions.ts +14 -0
- package/src/utils/types.ts +1 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { batch, useDispatch } from 'react-redux';
|
|
3
|
+
import { StyleSheet, Text, TouchableHighlight } from 'react-native';
|
|
4
|
+
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
5
|
+
import type { HMSPoll } from '@100mslive/react-native-hms';
|
|
6
|
+
import { HMSPollType, HMSPollUpdateType } from '@100mslive/react-native-hms';
|
|
7
|
+
|
|
8
|
+
import { PollVoteIcon } from '../Icons';
|
|
9
|
+
import {
|
|
10
|
+
useHMSRoomColorPalette,
|
|
11
|
+
useHMSRoomStyleSheet,
|
|
12
|
+
useModalType,
|
|
13
|
+
} from '../hooks-util';
|
|
14
|
+
import { HMSNotification } from './HMSNotification';
|
|
15
|
+
import { ModalTypes } from '../utils/types';
|
|
16
|
+
import {
|
|
17
|
+
removeNotification,
|
|
18
|
+
setPollStage,
|
|
19
|
+
setSelectedPollId,
|
|
20
|
+
} from '../redux/actions';
|
|
21
|
+
import { CreatePollStages } from '../redux/actionTypes';
|
|
22
|
+
|
|
23
|
+
export interface HMSPollsQuizzesNotificationProps {
|
|
24
|
+
id: string;
|
|
25
|
+
payload: any;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const HMSPollsQuizzesNotification: React.FC<
|
|
29
|
+
HMSPollsQuizzesNotificationProps
|
|
30
|
+
> = ({ id, payload }) => {
|
|
31
|
+
const { poll, pollUpdateType } = payload as {
|
|
32
|
+
poll: HMSPoll;
|
|
33
|
+
pollUpdateType: HMSPollUpdateType;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const dispatch = useDispatch();
|
|
37
|
+
const { handleModalVisibleType } = useModalType();
|
|
38
|
+
const { secondary_dim: secondaryDimColor } = useHMSRoomColorPalette();
|
|
39
|
+
// const canVoteOnPoll = useSelector((state: RootState) => {
|
|
40
|
+
// const permissions = state.hmsStates.localPeer?.role?.permissions;
|
|
41
|
+
// return permissions?.pollRead;
|
|
42
|
+
// });
|
|
43
|
+
|
|
44
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
45
|
+
button: {
|
|
46
|
+
backgroundColor: theme.palette.secondary_default,
|
|
47
|
+
},
|
|
48
|
+
buttonText: {
|
|
49
|
+
color: theme.palette.on_secondary_high,
|
|
50
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
|
|
54
|
+
const handleVotePress = () => {
|
|
55
|
+
// if (!canVoteOnPoll) {
|
|
56
|
+
// return;
|
|
57
|
+
// }
|
|
58
|
+
batch(() => {
|
|
59
|
+
dispatch(setPollStage(CreatePollStages.POLL_VOTING));
|
|
60
|
+
dispatch(setSelectedPollId(poll.pollId));
|
|
61
|
+
handleModalVisibleType(ModalTypes.POLLS_AND_QUIZZES);
|
|
62
|
+
dispatch(removeNotification(id));
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<HMSNotification
|
|
68
|
+
id={id}
|
|
69
|
+
icon={<PollVoteIcon />}
|
|
70
|
+
text={
|
|
71
|
+
poll.createdBy
|
|
72
|
+
? `${poll.createdBy.name} ${
|
|
73
|
+
pollUpdateType === HMSPollUpdateType.started ? 'started' : ''
|
|
74
|
+
} a new ${poll.type === HMSPollType.poll ? 'poll' : 'quiz'}`
|
|
75
|
+
: `A new ${poll.type === HMSPollType.poll ? 'poll' : 'quiz'} has started`
|
|
76
|
+
}
|
|
77
|
+
autoDismiss={false}
|
|
78
|
+
dismissable={true}
|
|
79
|
+
cta={
|
|
80
|
+
// canVoteOnPoll ? (
|
|
81
|
+
<GestureDetector gesture={Gesture.Tap()}>
|
|
82
|
+
<TouchableHighlight
|
|
83
|
+
underlayColor={secondaryDimColor}
|
|
84
|
+
style={[styles.button, hmsRoomStyles.button]}
|
|
85
|
+
onPress={handleVotePress}
|
|
86
|
+
>
|
|
87
|
+
<Text style={[styles.buttonText, hmsRoomStyles.buttonText]}>
|
|
88
|
+
Vote
|
|
89
|
+
</Text>
|
|
90
|
+
</TouchableHighlight>
|
|
91
|
+
</GestureDetector>
|
|
92
|
+
// ) : undefined
|
|
93
|
+
}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const styles = StyleSheet.create({
|
|
99
|
+
button: {
|
|
100
|
+
paddingVertical: 8,
|
|
101
|
+
paddingHorizontal: 16,
|
|
102
|
+
borderRadius: 8,
|
|
103
|
+
marginRight: 16,
|
|
104
|
+
},
|
|
105
|
+
buttonText: {
|
|
106
|
+
fontSize: 14,
|
|
107
|
+
lineHeight: 20,
|
|
108
|
+
letterSpacing: 0.25,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
@@ -8,7 +8,7 @@ import type { HMSBaseButtonProps } from './HMSBaseButton';
|
|
|
8
8
|
export interface HMSPrimaryButtonProps {
|
|
9
9
|
title: string;
|
|
10
10
|
loading: boolean;
|
|
11
|
-
onPress(): void;
|
|
11
|
+
onPress(e: any): void;
|
|
12
12
|
testId?: HMSBaseButtonProps['testID'];
|
|
13
13
|
style?: StyleProp<ViewStyle>;
|
|
14
14
|
disabled?: boolean;
|
|
@@ -22,6 +22,7 @@ import { BottomSheet } from './BottomSheet';
|
|
|
22
22
|
import { ChangeNameModalContent } from './ChangeNameModalContent';
|
|
23
23
|
import { StopRecordingModalContent } from './StopRecordingModalContent';
|
|
24
24
|
import { TestIds } from '../utils/constants';
|
|
25
|
+
import { PollsAndQuizBottomSheet } from './PollsAndQuizBottomSheet';
|
|
25
26
|
|
|
26
27
|
interface HMSRoomOptionsProps {}
|
|
27
28
|
|
|
@@ -71,6 +72,8 @@ export const HMSRoomOptions: React.FC<HMSRoomOptionsProps> = () => {
|
|
|
71
72
|
/>
|
|
72
73
|
</BottomSheet>
|
|
73
74
|
|
|
75
|
+
<PollsAndQuizBottomSheet />
|
|
76
|
+
|
|
74
77
|
<BottomSheet
|
|
75
78
|
isVisible={modalVisible === ModalTypes.CHANGE_NAME}
|
|
76
79
|
dismissModal={dismissModal}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../hooks-util';
|
|
5
|
+
import { HMSBaseButton } from './HMSBaseButton';
|
|
6
|
+
import type { HMSBaseButtonProps } from './HMSBaseButton';
|
|
7
|
+
|
|
8
|
+
export interface HMSPrimaryButtonProps {
|
|
9
|
+
title: string;
|
|
10
|
+
loading: boolean;
|
|
11
|
+
onPress(): void;
|
|
12
|
+
testId?: HMSBaseButtonProps['testID'];
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
leftComponent?: React.ReactElement | null;
|
|
16
|
+
wrapWithGestureDetector?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const HMSSecondaryButton: React.FC<HMSPrimaryButtonProps> = ({
|
|
20
|
+
title,
|
|
21
|
+
loading,
|
|
22
|
+
onPress,
|
|
23
|
+
testId,
|
|
24
|
+
style,
|
|
25
|
+
disabled,
|
|
26
|
+
leftComponent,
|
|
27
|
+
wrapWithGestureDetector,
|
|
28
|
+
}) => {
|
|
29
|
+
const {
|
|
30
|
+
secondary_dim: secondaryDarkColor,
|
|
31
|
+
on_secondary_high: onSecondaryHighColor,
|
|
32
|
+
} = useHMSRoomColorPalette();
|
|
33
|
+
|
|
34
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
35
|
+
button: {
|
|
36
|
+
backgroundColor: theme.palette.secondary_default,
|
|
37
|
+
},
|
|
38
|
+
disabledButton: {
|
|
39
|
+
backgroundColor: theme.palette.secondary_disabled,
|
|
40
|
+
},
|
|
41
|
+
buttonText: {
|
|
42
|
+
color: theme.palette.on_secondary_high,
|
|
43
|
+
fontFamily: `${typography.font_family}-SemiBold`,
|
|
44
|
+
},
|
|
45
|
+
disabledText: {
|
|
46
|
+
color: theme.palette.on_secondary_low,
|
|
47
|
+
},
|
|
48
|
+
}));
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<HMSBaseButton
|
|
52
|
+
testID={testId}
|
|
53
|
+
loaderColor={onSecondaryHighColor}
|
|
54
|
+
loading={loading}
|
|
55
|
+
onPress={onPress}
|
|
56
|
+
title={title}
|
|
57
|
+
underlayColor={secondaryDarkColor}
|
|
58
|
+
disabled={disabled}
|
|
59
|
+
leftComponent={leftComponent}
|
|
60
|
+
style={[
|
|
61
|
+
hmsRoomStyles.button,
|
|
62
|
+
disabled ? hmsRoomStyles.disabledButton : null,
|
|
63
|
+
style,
|
|
64
|
+
]}
|
|
65
|
+
textStyle={[
|
|
66
|
+
hmsRoomStyles.buttonText,
|
|
67
|
+
disabled ? hmsRoomStyles.disabledText : null,
|
|
68
|
+
]}
|
|
69
|
+
wrapWithGestureDetector={wrapWithGestureDetector}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
useHMSReconnection,
|
|
16
16
|
useHMSRemovedFromRoomUpdate,
|
|
17
17
|
useHMSRoomStyle,
|
|
18
|
+
useLandscapeImmersiveMode,
|
|
18
19
|
usePIPListener,
|
|
19
20
|
useSetDefaultChatRecipient,
|
|
20
21
|
} from '../hooks-util';
|
|
@@ -61,6 +62,8 @@ export const Meeting: React.FC<MeetingProps> = ({ peerTrackNodes }) => {
|
|
|
61
62
|
// Handle Back button press and show leave room modal
|
|
62
63
|
useBackButtonPress();
|
|
63
64
|
|
|
65
|
+
useLandscapeImmersiveMode();
|
|
66
|
+
|
|
64
67
|
// Clearing any pending modal opening tasks
|
|
65
68
|
React.useEffect(() => {
|
|
66
69
|
return () => {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
import type { AnimatedStyle } from 'react-native-reanimated';
|
|
5
|
+
import Animated from 'react-native-reanimated';
|
|
3
6
|
|
|
4
7
|
type OverlayContainerProps = {};
|
|
5
8
|
|
|
@@ -9,10 +12,16 @@ export const OverlayContainer: React.FC<OverlayContainerProps> & {
|
|
|
9
12
|
return <View style={styles.container}>{children}</View>;
|
|
10
13
|
};
|
|
11
14
|
|
|
12
|
-
type OverlayProps = {
|
|
15
|
+
export type OverlayProps = {
|
|
16
|
+
animatedStyle?: StyleProp<AnimatedStyle<StyleProp<ViewStyle>>>;
|
|
17
|
+
};
|
|
13
18
|
|
|
14
|
-
const Overlay: React.FC<OverlayProps> = ({ children }) => {
|
|
15
|
-
return
|
|
19
|
+
const Overlay: React.FC<OverlayProps> = ({ children, animatedStyle }) => {
|
|
20
|
+
return (
|
|
21
|
+
<Animated.View style={[styles.absoluteContainer, animatedStyle]}>
|
|
22
|
+
{children}
|
|
23
|
+
</Animated.View>
|
|
24
|
+
);
|
|
16
25
|
};
|
|
17
26
|
|
|
18
27
|
OverlayContainer.Overlay = Overlay;
|
|
@@ -3,18 +3,22 @@ import type { SharedValue } from 'react-native-reanimated';
|
|
|
3
3
|
|
|
4
4
|
import { HMSNotifications } from './HMSNotifications';
|
|
5
5
|
import { OverlayContainer } from './OverlayContainer';
|
|
6
|
+
import type { OverlayProps } from './OverlayContainer';
|
|
6
7
|
import { HLSChatView } from './HMSOverlayChatView';
|
|
7
8
|
import { useShowChatAndParticipants } from '../hooks-util';
|
|
8
9
|
|
|
9
10
|
export type OverlayedViewsProps = {
|
|
10
11
|
offset: SharedValue<number>;
|
|
11
|
-
};
|
|
12
|
+
} & OverlayProps;
|
|
12
13
|
|
|
13
|
-
const _OverlayedViews: React.FC<OverlayedViewsProps> = ({
|
|
14
|
+
const _OverlayedViews: React.FC<OverlayedViewsProps> = ({
|
|
15
|
+
offset,
|
|
16
|
+
animatedStyle,
|
|
17
|
+
}) => {
|
|
14
18
|
const { overlayChatVisible } = useShowChatAndParticipants();
|
|
15
19
|
|
|
16
20
|
return (
|
|
17
|
-
<OverlayContainer.Overlay>
|
|
21
|
+
<OverlayContainer.Overlay animatedStyle={animatedStyle}>
|
|
18
22
|
{overlayChatVisible ? <HLSChatView offset={offset} /> : null}
|
|
19
23
|
|
|
20
24
|
<HMSNotifications />
|
|
@@ -21,25 +21,6 @@ export const HMSPinchGesture: React.FC<HMSPinchGestureProps> = ({
|
|
|
21
21
|
*/
|
|
22
22
|
const dimensions = useSharedValue({ width: 0, height: 0 });
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* - Tracking number of active pointers in pinch gesture
|
|
26
|
-
* "Focal point" is used as an origin point for scaling the view
|
|
27
|
-
* when active number of pointers change, focal point is also changed causing a flicker effect
|
|
28
|
-
*
|
|
29
|
-
* To remove flicker effect, when `numberOfPointers` change, we calculate the amount of change in focal point
|
|
30
|
-
* and use the `(new focal point) + (amount of change in focal point)` to apply transformations
|
|
31
|
-
*/
|
|
32
|
-
const numberOfPointers = useSharedValue(0);
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* - Current focal point to apply scaling
|
|
36
|
-
* "Focal point" is used as an origin point for scaling the view
|
|
37
|
-
* > We transform the "center of View" to the "focal point", "apply scaling" and then "undo the transformation"
|
|
38
|
-
*/
|
|
39
|
-
const focalPoint = useSharedValue({ x: 0, y: 0 });
|
|
40
|
-
|
|
41
|
-
const adjustedFocalPoint = useSharedValue({ x: 0, y: 0 });
|
|
42
|
-
|
|
43
24
|
/**
|
|
44
25
|
* - focal point captured at the start of the pinch gesture
|
|
45
26
|
* We use this point to calculate the amount of translation of focal point
|
|
@@ -51,17 +32,6 @@ export const HMSPinchGesture: React.FC<HMSPinchGestureProps> = ({
|
|
|
51
32
|
*/
|
|
52
33
|
const focalPointAtStart = useSharedValue({ x: 0, y: 0 });
|
|
53
34
|
|
|
54
|
-
/**
|
|
55
|
-
* - x,y coords representing the amount by which focal point shifted due to change in `numberOfPointers`
|
|
56
|
-
* e.g. focal point when `numberOfPointers = 2` - (20, 100)
|
|
57
|
-
* focal point when `numberOfPointers` reduced to `1` - (40, 300)
|
|
58
|
-
*
|
|
59
|
-
* focal point got shifted by `20` points on x-axis and `200` points on y-axis. Thus, `focalShift = (20, 200)`
|
|
60
|
-
*
|
|
61
|
-
* Usage: TODO
|
|
62
|
-
*/
|
|
63
|
-
const focalShift = useSharedValue({ x: 0, y: 0 });
|
|
64
|
-
|
|
65
35
|
const scale = useSharedValue(1);
|
|
66
36
|
const savedScale = useSharedValue(1);
|
|
67
37
|
const translation = useSharedValue({ x: 0, y: 0 });
|
|
@@ -80,9 +50,22 @@ export const HMSPinchGesture: React.FC<HMSPinchGestureProps> = ({
|
|
|
80
50
|
const panGesture = Gesture.Pan()
|
|
81
51
|
.maxPointers(1)
|
|
82
52
|
.onUpdate((e) => {
|
|
53
|
+
if (savedScale.value <= 1) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const swipeOnXAxis = e.translationX + savedTranslation.value.x;
|
|
57
|
+
const swipeOnYAxis = e.translationY + savedTranslation.value.y;
|
|
58
|
+
|
|
59
|
+
const diffX =
|
|
60
|
+
(dimensions.value.width * savedScale.value - dimensions.value.width) /
|
|
61
|
+
2;
|
|
62
|
+
const diffY =
|
|
63
|
+
(dimensions.value.height * savedScale.value - dimensions.value.height) /
|
|
64
|
+
2;
|
|
65
|
+
|
|
83
66
|
translation.value = {
|
|
84
|
-
x:
|
|
85
|
-
y:
|
|
67
|
+
x: Math.max(Math.min(swipeOnXAxis, diffX), -diffX),
|
|
68
|
+
y: Math.max(Math.min(swipeOnYAxis, diffY), -diffY),
|
|
86
69
|
};
|
|
87
70
|
})
|
|
88
71
|
.onEnd(() => {
|
|
@@ -91,45 +74,26 @@ export const HMSPinchGesture: React.FC<HMSPinchGestureProps> = ({
|
|
|
91
74
|
|
|
92
75
|
const pinchGesture = Gesture.Pinch()
|
|
93
76
|
.onStart((e) => {
|
|
94
|
-
numberOfPointers.value = e.numberOfPointers;
|
|
95
77
|
focalPointAtStart.value = { x: e.focalX, y: e.focalY };
|
|
96
|
-
|
|
97
|
-
adjustedFocalPoint.value = {
|
|
98
|
-
x: e.focalX - focalShift.value.x, // subtracting "focal point shift" value from "current focal point", we will get "focal point before the shift", and apply transformations on the that focal point
|
|
99
|
-
y: e.focalY - focalShift.value.y, // subtracting "focal point shift" value from "current focal point", we will get "focal point before the shift", and apply transformations on the that focal point
|
|
100
|
-
};
|
|
101
78
|
})
|
|
102
79
|
.onUpdate((e) => {
|
|
103
|
-
|
|
104
|
-
if (numberOfPointers.value !== e.numberOfPointers) {
|
|
105
|
-
numberOfPointers.value = e.numberOfPointers;
|
|
106
|
-
|
|
107
|
-
focalShift.value = {
|
|
108
|
-
x: e.focalX - (focalPoint.value.x - focalShift.value.x),
|
|
109
|
-
y: e.focalY - (focalPoint.value.y - focalShift.value.y),
|
|
110
|
-
};
|
|
111
|
-
}
|
|
80
|
+
scale.value = Math.min(Math.max(savedScale.value * e.scale, 0.94), 5.2);
|
|
112
81
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
82
|
+
const offsetX = dimensions.value.width / 2 - focalPointAtStart.value.x;
|
|
83
|
+
const offsetY = dimensions.value.height / 2 - focalPointAtStart.value.y;
|
|
84
|
+
|
|
85
|
+
const swipeOnXAxis = offsetX * scale.value + savedTranslation.value.x;
|
|
86
|
+
const swipeOnYAxis = offsetY * scale.value + savedTranslation.value.y;
|
|
87
|
+
|
|
88
|
+
const diffX =
|
|
89
|
+
(dimensions.value.width * scale.value - dimensions.value.width) / 2;
|
|
90
|
+
const diffY =
|
|
91
|
+
(dimensions.value.height * scale.value - dimensions.value.height) / 2;
|
|
117
92
|
|
|
118
|
-
// Applying translations
|
|
119
93
|
translation.value = {
|
|
120
|
-
x:
|
|
121
|
-
|
|
122
|
-
focalPointAtStart.value.x + // subtracting "focal point position capturred at start of gesture" from "adjusted focal point position" we will get the translation value
|
|
123
|
-
savedTranslation.value.x, // Adding current translation to previous Translation to make it a continuous gesture
|
|
124
|
-
y:
|
|
125
|
-
adjustedFocalPoint.value.y -
|
|
126
|
-
focalPointAtStart.value.y + // subtracting "focal point position capturred at start of gesture" from "adjusted focal point position" we will get the translation value
|
|
127
|
-
savedTranslation.value.y, // Adding current translation to previous Translation to make it a continuous gesture
|
|
94
|
+
x: Math.max(Math.min(swipeOnXAxis, diffX), -diffX),
|
|
95
|
+
y: Math.max(Math.min(swipeOnYAxis, diffY), -diffY),
|
|
128
96
|
};
|
|
129
|
-
|
|
130
|
-
// saving focal point to apply scaling on correct position
|
|
131
|
-
focalPoint.value = { x: e.focalX, y: e.focalY };
|
|
132
|
-
scale.value = Math.min(Math.max(savedScale.value * e.scale, 0.94), 5.2);
|
|
133
97
|
})
|
|
134
98
|
.onEnd(() => {
|
|
135
99
|
if (scale.value < 1) {
|
|
@@ -143,7 +107,6 @@ export const HMSPinchGesture: React.FC<HMSPinchGestureProps> = ({
|
|
|
143
107
|
savedScale.value = scale.value;
|
|
144
108
|
}
|
|
145
109
|
|
|
146
|
-
focalShift.value = { x: 0, y: 0 };
|
|
147
110
|
savedTranslation.value = translation.value;
|
|
148
111
|
});
|
|
149
112
|
|
|
@@ -151,13 +114,7 @@ export const HMSPinchGesture: React.FC<HMSPinchGestureProps> = ({
|
|
|
151
114
|
transform: [
|
|
152
115
|
{ translateX: translation.value.x },
|
|
153
116
|
{ translateY: translation.value.y },
|
|
154
|
-
{ translateX: focalPointAtStart.value.x - dimensions.value.width / 2 },
|
|
155
|
-
{ translateY: focalPointAtStart.value.y - dimensions.value.height / 2 },
|
|
156
117
|
{ scale: scale.value },
|
|
157
|
-
{ translateX: -(focalPointAtStart.value.x - dimensions.value.width / 2) },
|
|
158
|
-
{
|
|
159
|
-
translateY: -(focalPointAtStart.value.y - dimensions.value.height / 2),
|
|
160
|
-
},
|
|
161
118
|
],
|
|
162
119
|
}));
|
|
163
120
|
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
import { useHMSRoomStyleSheet } from '../../hooks-util';
|
|
29
29
|
import { HMSFullScreenButton } from './HMSFullScreenButton';
|
|
30
30
|
import { TestIds } from '../../utils/constants';
|
|
31
|
+
import { useIsLandscapeOrientation } from '../../utils/dimension';
|
|
31
32
|
|
|
32
33
|
export interface PeerVideoTileViewProps {
|
|
33
34
|
peerTrackNode: PeerTrackNode;
|
|
@@ -146,6 +147,8 @@ export const _PeerVideoTileView = React.forwardRef<
|
|
|
146
147
|
!canTakeActionOnPeer || // If local peer can't take action on peer, Or
|
|
147
148
|
!allowedToPublish; // If local peer can't publish tracks
|
|
148
149
|
|
|
150
|
+
const isLandscapeOrientation = useIsLandscapeOrientation();
|
|
151
|
+
|
|
149
152
|
return (
|
|
150
153
|
<View style={styles.container}>
|
|
151
154
|
<AvatarView
|
|
@@ -181,7 +184,7 @@ export const _PeerVideoTileView = React.forwardRef<
|
|
|
181
184
|
|
|
182
185
|
{/* Handling Peer Audio Mute indicator */}
|
|
183
186
|
{screenShareTile && showingVideoTrack ? (
|
|
184
|
-
isPipModeActive ? null : (
|
|
187
|
+
isPipModeActive || isLandscapeOrientation ? null : (
|
|
185
188
|
<HMSFullScreenButton peerTrackNode={peerTrackNode} />
|
|
186
189
|
)
|
|
187
190
|
) : peerCanPublishAudio ? (
|