@stream-io/video-react-native-sdk 0.0.1-alpha.413 → 0.0.1-alpha.415
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/CHANGELOG.md +18 -0
- package/dist/index.js +21 -45
- package/dist/index.js.map +1 -1
- package/dist/jest-setup.js +5 -3
- package/dist/jest-setup.js.map +1 -1
- package/dist/src/components/Call/CallContent/CallContent.js +37 -68
- package/dist/src/components/Call/CallContent/CallContent.js.map +1 -1
- package/dist/src/components/Call/CallContent/index.js +1 -17
- package/dist/src/components/Call/CallContent/index.js.map +1 -1
- package/dist/src/components/Call/CallControls/AcceptCallButton.js +10 -18
- package/dist/src/components/Call/CallControls/AcceptCallButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/CallControls.js +18 -26
- package/dist/src/components/Call/CallControls/CallControls.js.map +1 -1
- package/dist/src/components/Call/CallControls/CallControlsButton.js +14 -24
- package/dist/src/components/Call/CallControls/CallControlsButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/ChatButton.js +19 -30
- package/dist/src/components/Call/CallControls/ChatButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/HangupCallButton.js +15 -43
- package/dist/src/components/Call/CallControls/HangupCallButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/IncomingCallControls.js +13 -21
- package/dist/src/components/Call/CallControls/IncomingCallControls.js.map +1 -1
- package/dist/src/components/Call/CallControls/LobbyControls.js +11 -19
- package/dist/src/components/Call/CallControls/LobbyControls.js.map +1 -1
- package/dist/src/components/Call/CallControls/OutgoingCallControls.js +14 -23
- package/dist/src/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/src/components/Call/CallControls/ReactionButton.js +19 -49
- package/dist/src/components/Call/CallControls/ReactionButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/RejectCallButton.js +16 -24
- package/dist/src/components/Call/CallControls/RejectCallButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/ToggleAudioPreviewButton.js +12 -21
- package/dist/src/components/Call/CallControls/ToggleAudioPreviewButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/ToggleAudioPublishingButton.js +12 -22
- package/dist/src/components/Call/CallControls/ToggleAudioPublishingButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/ToggleCameraFaceButton.js +13 -22
- package/dist/src/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/ToggleVideoPreviewButton.js +12 -21
- package/dist/src/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/ToggleVideoPublishingButton.js +12 -22
- package/dist/src/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
- package/dist/src/components/Call/CallControls/index.js +14 -30
- package/dist/src/components/Call/CallControls/index.js.map +1 -1
- package/dist/src/components/Call/CallControls/internal/ReactionsPicker.js +47 -82
- package/dist/src/components/Call/CallControls/internal/ReactionsPicker.js.map +1 -1
- package/dist/src/components/Call/CallLayout/CallParticipantsGrid.js +15 -24
- package/dist/src/components/Call/CallLayout/CallParticipantsGrid.js.map +1 -1
- package/dist/src/components/Call/CallLayout/CallParticipantsSpotlight.js +22 -32
- package/dist/src/components/Call/CallLayout/CallParticipantsSpotlight.js.map +1 -1
- package/dist/src/components/Call/CallLayout/index.js +2 -18
- package/dist/src/components/Call/CallLayout/index.js.map +1 -1
- package/dist/src/components/Call/CallParticipantsList/CallParticipantsList.js +29 -62
- package/dist/src/components/Call/CallParticipantsList/CallParticipantsList.js.map +1 -1
- package/dist/src/components/Call/CallParticipantsList/index.js +1 -17
- package/dist/src/components/Call/CallParticipantsList/index.js.map +1 -1
- package/dist/src/components/Call/CallTopView/CallTopView.js +38 -79
- package/dist/src/components/Call/CallTopView/CallTopView.js.map +1 -1
- package/dist/src/components/Call/CallTopView/ParticipantsInfoBadge.js +36 -48
- package/dist/src/components/Call/CallTopView/ParticipantsInfoBadge.js.map +1 -1
- package/dist/src/components/Call/CallTopView/index.js +2 -18
- package/dist/src/components/Call/CallTopView/index.js.map +1 -1
- package/dist/src/components/Call/Lobby/JoinCallButton.js +19 -29
- package/dist/src/components/Call/Lobby/JoinCallButton.js.map +1 -1
- package/dist/src/components/Call/Lobby/Lobby.js +74 -96
- package/dist/src/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/src/components/Call/Lobby/index.js +2 -18
- package/dist/src/components/Call/Lobby/index.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/IncomingCall.js +34 -51
- package/dist/src/components/Call/RingingCallContent/IncomingCall.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/JoiningCallIndicator.js +9 -17
- package/dist/src/components/Call/RingingCallContent/JoiningCallIndicator.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/OutgoingCall.js +44 -59
- package/dist/src/components/Call/RingingCallContent/OutgoingCall.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/RingingCallContent.js +25 -34
- package/dist/src/components/Call/RingingCallContent/RingingCallContent.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/UserInfo.js +24 -36
- package/dist/src/components/Call/RingingCallContent/UserInfo.js.map +1 -1
- package/dist/src/components/Call/RingingCallContent/index.js +3 -19
- package/dist/src/components/Call/RingingCallContent/index.js.map +1 -1
- package/dist/src/components/Call/index.js +7 -23
- package/dist/src/components/Call/index.js.map +1 -1
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js +40 -68
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/AnimatedFloatingView.js.map +1 -1
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.d.ts +4 -0
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js +126 -0
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.js.map +1 -0
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/common.js +5 -10
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/common.js.map +1 -1
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/index.d.ts +4 -0
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/index.js +6 -0
- package/dist/src/components/Participant/FloatingParticipantView/FloatingView/index.js.map +1 -0
- package/dist/src/components/Participant/FloatingParticipantView/index.js +42 -56
- package/dist/src/components/Participant/FloatingParticipantView/index.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/ParticipantLabel.js +51 -68
- package/dist/src/components/Participant/ParticipantView/ParticipantLabel.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js +20 -29
- package/dist/src/components/Participant/ParticipantView/ParticipantNetworkQualityIndicator.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/ParticipantReaction.js +17 -48
- package/dist/src/components/Participant/ParticipantView/ParticipantReaction.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/ParticipantVideoFallback.js +20 -31
- package/dist/src/components/Participant/ParticipantView/ParticipantVideoFallback.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/ParticipantView.js +18 -27
- package/dist/src/components/Participant/ParticipantView/ParticipantView.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/VideoRenderer.js +30 -59
- package/dist/src/components/Participant/ParticipantView/VideoRenderer.js.map +1 -1
- package/dist/src/components/Participant/ParticipantView/index.js +6 -22
- package/dist/src/components/Participant/ParticipantView/index.js.map +1 -1
- package/dist/src/components/Participant/index.js +2 -18
- package/dist/src/components/Participant/index.js.map +1 -1
- package/dist/src/components/index.js +3 -19
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/utility/Avatar.js +19 -30
- package/dist/src/components/utility/Avatar.js.map +1 -1
- package/dist/src/components/utility/index.js +1 -17
- package/dist/src/components/utility/index.js.map +1 -1
- package/dist/src/constants/TestIds.js +8 -11
- package/dist/src/constants/TestIds.js.map +1 -1
- package/dist/src/constants/index.js +4 -7
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/contexts/StreamVideoContext.js +14 -43
- package/dist/src/contexts/StreamVideoContext.js.map +1 -1
- package/dist/src/contexts/ThemeContext.js +13 -47
- package/dist/src/contexts/ThemeContext.js.map +1 -1
- package/dist/src/contexts/index.js +2 -18
- package/dist/src/contexts/index.js.map +1 -1
- package/dist/src/hooks/index.js +5 -21
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/internal/useCallMediaStreamCleanup.js +10 -14
- package/dist/src/hooks/internal/useCallMediaStreamCleanup.js.map +1 -1
- package/dist/src/hooks/push/index.js +9 -13
- package/dist/src/hooks/push/index.js.map +1 -1
- package/dist/src/hooks/push/useInitAndroidTokenAndRest.js +10 -14
- package/dist/src/hooks/push/useInitAndroidTokenAndRest.js.map +1 -1
- package/dist/src/hooks/push/useIosCallKeepEventsSetupEffect.js +17 -21
- package/dist/src/hooks/push/useIosCallKeepEventsSetupEffect.js.map +1 -1
- package/dist/src/hooks/push/useIosCallkeepWithCallingStateEffect.js +38 -42
- package/dist/src/hooks/push/useIosCallkeepWithCallingStateEffect.js.map +1 -1
- package/dist/src/hooks/push/useIosVoipPushEventsSetupEffect.js +17 -21
- package/dist/src/hooks/push/useIosVoipPushEventsSetupEffect.js.map +1 -1
- package/dist/src/hooks/push/useProcessPushCallEffect.js +16 -20
- package/dist/src/hooks/push/useProcessPushCallEffect.js.map +1 -1
- package/dist/src/hooks/useAndroidKeepCallAliveEffect.js +24 -51
- package/dist/src/hooks/useAndroidKeepCallAliveEffect.js.map +1 -1
- package/dist/src/hooks/useIncallManager.js +6 -13
- package/dist/src/hooks/useIncallManager.js.map +1 -1
- package/dist/src/hooks/usePermissionNotification.js +15 -19
- package/dist/src/hooks/usePermissionNotification.js.map +1 -1
- package/dist/src/hooks/usePermissionRequest.js +13 -17
- package/dist/src/hooks/usePermissionRequest.js.map +1 -1
- package/dist/src/icons/Back.js +4 -12
- package/dist/src/icons/Back.js.map +1 -1
- package/dist/src/icons/CameraSwitch.js +4 -12
- package/dist/src/icons/CameraSwitch.js.map +1 -1
- package/dist/src/icons/Chat.js +4 -12
- package/dist/src/icons/Chat.js.map +1 -1
- package/dist/src/icons/Mic.js +5 -13
- package/dist/src/icons/Mic.js.map +1 -1
- package/dist/src/icons/MicOff.js +4 -12
- package/dist/src/icons/MicOff.js.map +1 -1
- package/dist/src/icons/Participants.js +4 -12
- package/dist/src/icons/Participants.js.map +1 -1
- package/dist/src/icons/Phone.js +4 -12
- package/dist/src/icons/Phone.js.map +1 -1
- package/dist/src/icons/PhoneDown.js +5 -13
- package/dist/src/icons/PhoneDown.js.map +1 -1
- package/dist/src/icons/PinVertical.js +4 -12
- package/dist/src/icons/PinVertical.js.map +1 -1
- package/dist/src/icons/Reaction.js +4 -12
- package/dist/src/icons/Reaction.js.map +1 -1
- package/dist/src/icons/ScreenShare.js +9 -42
- package/dist/src/icons/ScreenShare.js.map +1 -1
- package/dist/src/icons/Settings.js +5 -36
- package/dist/src/icons/Settings.js.map +1 -1
- package/dist/src/icons/Spotlight.js +4 -12
- package/dist/src/icons/Spotlight.js.map +1 -1
- package/dist/src/icons/ThreeDots.js +6 -14
- package/dist/src/icons/ThreeDots.js.map +1 -1
- package/dist/src/icons/TopViewBackground.js +8 -18
- package/dist/src/icons/TopViewBackground.js.map +1 -1
- package/dist/src/icons/Video.js +4 -12
- package/dist/src/icons/Video.js.map +1 -1
- package/dist/src/icons/VideoSlash.js +5 -13
- package/dist/src/icons/VideoSlash.js.map +1 -1
- package/dist/src/icons/index.js +16 -32
- package/dist/src/icons/index.js.map +1 -1
- package/dist/src/providers/MediaDevices.js +11 -15
- package/dist/src/providers/MediaDevices.js.map +1 -1
- package/dist/src/providers/MediaStreamManagement.js +26 -56
- package/dist/src/providers/MediaStreamManagement.js.map +1 -1
- package/dist/src/providers/StreamCall.js +13 -22
- package/dist/src/providers/StreamCall.js.map +1 -1
- package/dist/src/providers/StreamVideo.js +19 -52
- package/dist/src/providers/StreamVideo.js.map +1 -1
- package/dist/src/providers/index.js +3 -19
- package/dist/src/providers/index.js.map +1 -1
- package/dist/src/theme/colors.js +36 -40
- package/dist/src/theme/colors.js.map +1 -1
- package/dist/src/theme/constants.js +1 -4
- package/dist/src/theme/constants.js.map +1 -1
- package/dist/src/theme/index.js +5 -22
- package/dist/src/theme/index.js.map +1 -1
- package/dist/src/theme/theme.js +3 -6
- package/dist/src/theme/theme.js.map +1 -1
- package/dist/src/theme/types.js +1 -2
- package/dist/src/translations/en.json +3 -1
- package/dist/src/translations/index.d.ts +2 -0
- package/dist/src/translations/index.js +2 -8
- package/dist/src/translations/index.js.map +1 -1
- package/dist/src/utils/StreamVideoRN/index.js +10 -14
- package/dist/src/utils/StreamVideoRN/index.js.map +1 -1
- package/dist/src/utils/StreamVideoRN/permissions.js +7 -11
- package/dist/src/utils/StreamVideoRN/permissions.js.map +1 -1
- package/dist/src/utils/StreamVideoRN/types.js +1 -2
- package/dist/src/utils/hooks/index.js +3 -19
- package/dist/src/utils/hooks/index.js.map +1 -1
- package/dist/src/utils/hooks/useAppStateListener.js +9 -13
- package/dist/src/utils/hooks/useAppStateListener.js.map +1 -1
- package/dist/src/utils/hooks/useDebouncedValue.js +4 -8
- package/dist/src/utils/hooks/useDebouncedValue.js.map +1 -1
- package/dist/src/utils/hooks/usePrevious.js +4 -8
- package/dist/src/utils/hooks/usePrevious.js.map +1 -1
- package/dist/src/utils/index.js +4 -24
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/internal/optionalLibs.d.ts +5 -0
- package/dist/src/utils/internal/optionalLibs.js +23 -0
- package/dist/src/utils/internal/optionalLibs.js.map +1 -0
- package/dist/src/utils/push/android.js +26 -54
- package/dist/src/utils/push/android.js.map +1 -1
- package/dist/src/utils/push/ios.js +11 -16
- package/dist/src/utils/push/ios.js.map +1 -1
- package/dist/src/utils/push/libs.js +3 -9
- package/dist/src/utils/push/libs.js.map +1 -1
- package/dist/src/utils/push/rxSubjects.js +7 -10
- package/dist/src/utils/push/rxSubjects.js.map +1 -1
- package/dist/src/utils/push/utils.js +3 -8
- package/dist/src/utils/push/utils.js.map +1 -1
- package/dist/src/utils/setClientDetails.js +12 -16
- package/dist/src/utils/setClientDetails.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -4
- package/dist/version.js.map +1 -1
- package/package.json +22 -3
- package/src/components/Participant/FloatingParticipantView/FloatingView/ReanimatedFloatingView.tsx +198 -0
- package/src/components/Participant/FloatingParticipantView/FloatingView/index.ts +12 -0
- package/src/components/Participant/FloatingParticipantView/index.tsx +3 -3
- package/src/providers/MediaStreamManagement.tsx +7 -7
- package/src/translations/en.json +3 -1
- package/src/utils/internal/optionalLibs.ts +27 -0
- package/src/utils/setClientDetails.ts +2 -2
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradlew +0 -234
- package/android/gradlew.bat +0 -89
- package/dist/__tests__/components/Avatar.test.d.ts +0 -1
- package/dist/__tests__/components/Avatar.test.js +0 -34
- package/dist/__tests__/components/Avatar.test.js.map +0 -1
- package/dist/__tests__/components/CallControls.test.d.ts +0 -1
- package/dist/__tests__/components/CallControls.test.js +0 -99
- package/dist/__tests__/components/CallControls.test.js.map +0 -1
- package/dist/__tests__/components/CallParticipantsGrid.test.d.ts +0 -1
- package/dist/__tests__/components/CallParticipantsGrid.test.js +0 -105
- package/dist/__tests__/components/CallParticipantsGrid.test.js.map +0 -1
- package/dist/__tests__/components/CallParticipantsSpotlight.test.d.ts +0 -1
- package/dist/__tests__/components/CallParticipantsSpotlight.test.js +0 -76
- package/dist/__tests__/components/CallParticipantsSpotlight.test.js.map +0 -1
- package/dist/__tests__/components/ParticipantView.test.d.ts +0 -1
- package/dist/__tests__/components/ParticipantView.test.js +0 -62
- package/dist/__tests__/components/ParticipantView.test.js.map +0 -1
- package/dist/__tests__/mocks/call.d.ts +0 -2
- package/dist/__tests__/mocks/call.js +0 -24
- package/dist/__tests__/mocks/call.js.map +0 -1
- package/dist/__tests__/mocks/client.d.ts +0 -2
- package/dist/__tests__/mocks/client.js +0 -30
- package/dist/__tests__/mocks/client.js.map +0 -1
- package/dist/__tests__/mocks/participant.d.ts +0 -3
- package/dist/__tests__/mocks/participant.js +0 -32
- package/dist/__tests__/mocks/participant.js.map +0 -1
- package/dist/__tests__/utils/RNTLTools.d.ts +0 -13
- package/dist/__tests__/utils/RNTLTools.js +0 -45
- package/dist/__tests__/utils/RNTLTools.js.map +0 -1
- package/dist/src/utils/device-info/libs.d.ts +0 -2
- package/dist/src/utils/device-info/libs.js +0 -16
- package/dist/src/utils/device-info/libs.js.map +0 -1
- package/src/utils/device-info/libs.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.0.1-alpha.415](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.414...@stream-io/video-react-native-sdk-0.0.1-alpha.415) (2023-08-31)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.0.1-alpha.414](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.413...@stream-io/video-react-native-sdk-0.0.1-alpha.414) (2023-08-31)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* bring back reanimated and gesture handler ([#1019](https://github.com/GetStream/stream-video-js/issues/1019)) ([f90d140](https://github.com/GetStream/stream-video-js/commit/f90d140d8bf4bc1c5bc5b31bff80e8c7b557dfc4))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **react-native:** add permission alert messages to translations ([#956](https://github.com/GetStream/stream-video-js/issues/956)) ([44ff70c](https://github.com/GetStream/stream-video-js/commit/44ff70cefdcd1b977334f4c21a0c59a599db9322))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
## [0.0.1-alpha.413](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-0.0.1-alpha.412...@stream-io/video-react-native-sdk-0.0.1-alpha.413) (2023-08-31)
|
|
6
24
|
|
|
7
25
|
|
package/dist/index.js
CHANGED
|
@@ -1,56 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.useMediaStreamManagement = exports.MediaStreamManagement = exports.StreamCall = exports.StreamVideo = void 0;
|
|
21
|
-
const setClientDetails_1 = require("./src/utils/setClientDetails");
|
|
1
|
+
import { setClientDetails } from './src/utils/setClientDetails';
|
|
22
2
|
/** Initialize text encoder/decoder polyfill */
|
|
23
|
-
|
|
3
|
+
import 'text-encoding-polyfill';
|
|
24
4
|
/** Initialize URL polyfill */
|
|
25
|
-
|
|
5
|
+
import 'react-native-url-polyfill/auto';
|
|
26
6
|
/** i18next polyfill to handle intl format for pluralization. For more info see https://www.i18next.com/misc/json-format#i-18-next-json-v4 */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
import 'intl-pluralrules';
|
|
8
|
+
import { registerGlobals } from '@stream-io/react-native-webrtc';
|
|
9
|
+
import Logger from '@stream-io/react-native-webrtc/src/Logger';
|
|
10
|
+
import { Platform } from 'react-native';
|
|
31
11
|
// We're registering globals, because our video JS client is serving SDKs that use browser based webRTC functions.
|
|
32
12
|
// This will result in creation of 2 global objects: `window` and `navigator`
|
|
33
13
|
// Reference: https://github.com/react-native-webrtc/react-native-webrtc/blob/16cff1523da457dbcc27bb0744ee2bad3a987c41/Documentation/BasicUsage.md#registering-globals
|
|
34
|
-
if (
|
|
35
|
-
|
|
14
|
+
if (Platform.OS !== 'web') {
|
|
15
|
+
registerGlobals();
|
|
36
16
|
}
|
|
37
17
|
// only enable warning and error logs from webrtc library
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
18
|
+
Logger.enable(`${Logger.ROOT_PREFIX}:(WARN|ERROR)`);
|
|
19
|
+
export * from '@stream-io/i18n';
|
|
20
|
+
export * from '@stream-io/video-client';
|
|
21
|
+
export * from '@stream-io/video-react-bindings';
|
|
22
|
+
export * from './src/components';
|
|
23
|
+
export * from './src/contexts';
|
|
24
|
+
export * from './src/hooks';
|
|
25
|
+
export * from './src/theme';
|
|
26
|
+
export * from './src/utils';
|
|
27
|
+
export * from './src/translations';
|
|
48
28
|
// Overriding 'StreamVideo' from '@stream-io/video-react-bindings'
|
|
49
29
|
// Explicitly re-exporting to resolve ambiguity.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Object.defineProperty(exports, "StreamCall", { enumerable: true, get: function () { return providers_1.StreamCall; } });
|
|
53
|
-
Object.defineProperty(exports, "MediaStreamManagement", { enumerable: true, get: function () { return providers_1.MediaStreamManagement; } });
|
|
54
|
-
Object.defineProperty(exports, "useMediaStreamManagement", { enumerable: true, get: function () { return providers_1.useMediaStreamManagement; } });
|
|
55
|
-
(0, setClientDetails_1.setClientDetails)();
|
|
30
|
+
export { StreamVideo, StreamCall, MediaStreamManagement, useMediaStreamManagement, } from './src/providers';
|
|
31
|
+
setClientDetails();
|
|
56
32
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,+CAA+C;AAC/C,OAAO,wBAAwB,CAAC;AAChC,8BAA8B;AAC9B,OAAO,gCAAgC,CAAC;AACxC,6IAA6I;AAC7I,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,MAAM,MAAM,2CAA2C,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,kHAAkH;AAClH,6EAA6E;AAC7E,sKAAsK;AACtK,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;IACzB,eAAe,EAAE,CAAC;CACnB;AAED,yDAAyD;AACzD,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,eAAe,CAAC,CAAC;AAEpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AAEnC,kEAAkE;AAClE,gDAAgD;AAChD,OAAO,EACL,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AAEzB,gBAAgB,EAAE,CAAC"}
|
package/dist/jest-setup.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
// Import Jest Native matchers
|
|
4
|
-
|
|
2
|
+
import '@testing-library/jest-native/extend-expect';
|
|
5
3
|
const mockedMedia = {
|
|
6
4
|
getTracks: jest.fn().mockReturnValue([
|
|
7
5
|
{
|
|
@@ -25,6 +23,10 @@ const mockedDevices = [
|
|
|
25
23
|
];
|
|
26
24
|
// Mock the notifee module using the mock provided by @notifee/react-native itself
|
|
27
25
|
jest.mock('@notifee/react-native', () => require('@notifee/react-native/jest-mock'));
|
|
26
|
+
jest.mock('react-native-reanimated', () => {
|
|
27
|
+
const RNReanimatedmock = require('react-native-reanimated/mock');
|
|
28
|
+
return { ...RNReanimatedmock, runOnUI: (fn) => fn };
|
|
29
|
+
});
|
|
28
30
|
// When mocking we implement only the needed navigator APIs, hence the suppression rule
|
|
29
31
|
// @ts-ignore
|
|
30
32
|
global.navigator = {
|
package/dist/jest-setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest-setup.js","sourceRoot":"","sources":["../jest-setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jest-setup.js","sourceRoot":"","sources":["../jest-setup.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,4CAA4C,CAAC;AAEpD,MAAM,WAAW,GAAG;IAClB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC;QACnC;YACE,EAAE,EAAE,iBAAiB;YACrB,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,KAAK;YACZ,UAAU,EAAE,oBAAoB;YAChC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;SAChB;KACF,CAAC;CACH,CAAC;AACF,MAAM,aAAa,GAAG;IACpB;QACE,QAAQ,EAAE,kBAAkB;QAC5B,OAAO,EAAE,iBAAiB;QAC1B,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,cAAc;KACtB;CACF,CAAC;AAEF,kFAAkF;AAClF,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,GAAG,EAAE,CACtC,OAAO,CAAC,iCAAiC,CAAC,CAC3C,CAAC;AAEF,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACxC,MAAM,gBAAgB,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACjE,OAAO,EAAE,GAAG,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEH,uFAAuF;AACvF,aAAa;AACb,MAAM,CAAC,SAAS,GAAG;IACjB,YAAY,EAAE;QACZ,YAAY,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,WAAW,CAAC;QACtD,gBAAgB,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,aAAa,CAAC;KAC7D;CACF,CAAC"}
|
|
@@ -1,47 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.CallContent = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
|
-
const react_native_1 = require("react-native");
|
|
29
|
-
const CallTopView_1 = require("../CallTopView");
|
|
30
|
-
const CallLayout_1 = require("../CallLayout");
|
|
31
|
-
const CallControls_1 = require("../CallControls");
|
|
32
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
33
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
34
|
-
const hooks_1 = require("../../../hooks");
|
|
35
|
-
const constants_1 = require("../../../constants");
|
|
36
|
-
const hooks_2 = require("../../../utils/hooks");
|
|
37
|
-
const Participant_1 = require("../../Participant");
|
|
38
|
-
const contexts_1 = require("../../../contexts");
|
|
39
|
-
const CallContent = ({ onBackPressed, onParticipantInfoPress, onHangupCallHandler, CallParticipantsList, CallTopView = CallTopView_1.CallTopView, CallControls = CallControls_1.CallControls, FloatingParticipantView = Participant_1.FloatingParticipantView, ParticipantLabel, ParticipantNetworkQualityIndicator, ParticipantReaction, ParticipantVideoFallback, ParticipantView, ParticipantsInfoBadge, VideoRenderer, layout = 'grid', }) => {
|
|
40
|
-
const [showRemoteParticipantInFloatingView, setShowRemoteParticipantInFloatingView,] = (0, react_1.useState)(false);
|
|
41
|
-
const { theme: { callContent }, } = (0, contexts_1.useTheme)();
|
|
42
|
-
const { useHasOngoingScreenShare, useRemoteParticipants, useLocalParticipant, } = (0, video_react_bindings_1.useCallStateHooks)();
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { CallTopView as DefaultCallTopView, } from '../CallTopView';
|
|
4
|
+
import { CallParticipantsGrid, CallParticipantsSpotlight, } from '../CallLayout';
|
|
5
|
+
import { CallControls as DefaultCallControls, } from '../CallControls';
|
|
6
|
+
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
7
|
+
import { CallingState } from '@stream-io/video-client';
|
|
8
|
+
import { useIncallManager } from '../../../hooks';
|
|
9
|
+
import { Z_INDEX } from '../../../constants';
|
|
10
|
+
import { useDebouncedValue } from '../../../utils/hooks';
|
|
11
|
+
import { FloatingParticipantView as DefaultFloatingParticipantView, } from '../../Participant';
|
|
12
|
+
import { useTheme } from '../../../contexts';
|
|
13
|
+
export const CallContent = ({ onBackPressed, onParticipantInfoPress, onHangupCallHandler, CallParticipantsList, CallTopView = DefaultCallTopView, CallControls = DefaultCallControls, FloatingParticipantView = DefaultFloatingParticipantView, ParticipantLabel, ParticipantNetworkQualityIndicator, ParticipantReaction, ParticipantVideoFallback, ParticipantView, ParticipantsInfoBadge, VideoRenderer, layout = 'grid', }) => {
|
|
14
|
+
const [showRemoteParticipantInFloatingView, setShowRemoteParticipantInFloatingView,] = useState(false);
|
|
15
|
+
const { theme: { callContent }, } = useTheme();
|
|
16
|
+
const { useHasOngoingScreenShare, useRemoteParticipants, useLocalParticipant, } = useCallStateHooks();
|
|
43
17
|
const _remoteParticipants = useRemoteParticipants();
|
|
44
|
-
const remoteParticipants =
|
|
18
|
+
const remoteParticipants = useDebouncedValue(_remoteParticipants, 300); // we debounce the remote participants to avoid unnecessary rerenders that happen when participant tracks are all subscribed simultaneously
|
|
45
19
|
const localParticipant = useLocalParticipant();
|
|
46
20
|
const hasScreenShare = useHasOngoingScreenShare();
|
|
47
21
|
const showSpotlightLayout = hasScreenShare || layout === 'spotlight';
|
|
@@ -52,9 +26,9 @@ const CallContent = ({ onBackPressed, onParticipantInfoPress, onHangupCallHandle
|
|
|
52
26
|
/**
|
|
53
27
|
* This hook is used to handle IncallManager specs of the application.
|
|
54
28
|
*/
|
|
55
|
-
|
|
56
|
-
const call =
|
|
57
|
-
const activeCallRef =
|
|
29
|
+
useIncallManager({ media: 'video', auto: true });
|
|
30
|
+
const call = useCall();
|
|
31
|
+
const activeCallRef = useRef(call);
|
|
58
32
|
activeCallRef.current = call;
|
|
59
33
|
const handleFloatingViewParticipantSwitch = () => {
|
|
60
34
|
if (remoteParticipants.length !== 1) {
|
|
@@ -62,9 +36,9 @@ const CallContent = ({ onBackPressed, onParticipantInfoPress, onHangupCallHandle
|
|
|
62
36
|
}
|
|
63
37
|
setShowRemoteParticipantInFloatingView((prevState) => !prevState);
|
|
64
38
|
};
|
|
65
|
-
|
|
39
|
+
useEffect(() => {
|
|
66
40
|
return () => {
|
|
67
|
-
if (activeCallRef.current?.state.callingState !==
|
|
41
|
+
if (activeCallRef.current?.state.callingState !== CallingState.LEFT) {
|
|
68
42
|
activeCallRef.current?.leave();
|
|
69
43
|
}
|
|
70
44
|
};
|
|
@@ -87,29 +61,24 @@ const CallContent = ({ onBackPressed, onParticipantInfoPress, onHangupCallHandle
|
|
|
87
61
|
ParticipantView,
|
|
88
62
|
CallParticipantsList,
|
|
89
63
|
};
|
|
90
|
-
return (
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
</react_native_1.View>
|
|
103
|
-
|
|
104
|
-
{CallControls && (<CallControls onHangupCallHandler={onHangupCallHandler}/>)}
|
|
105
|
-
</react_native_1.View>);
|
|
64
|
+
return (React.createElement(View, { style: [styles.container, callContent.container] },
|
|
65
|
+
React.createElement(View, { style: [styles.container, callContent.callParticipantsContainer] },
|
|
66
|
+
React.createElement(View, { style: [styles.view, callContent.topContainer],
|
|
67
|
+
// "box-none" disallows the container view to be not take up touches
|
|
68
|
+
// and allows only the top and floating view (its child views) to take up the touches
|
|
69
|
+
pointerEvents: "box-none" },
|
|
70
|
+
CallTopView && (React.createElement(CallTopView, { onBackPressed: onBackPressed, onParticipantInfoPress: onParticipantInfoPress, ParticipantsInfoBadge: ParticipantsInfoBadge })),
|
|
71
|
+
showFloatingView && FloatingParticipantView && (React.createElement(FloatingParticipantView, { participant: isRemoteParticipantInFloatingView
|
|
72
|
+
? remoteParticipants[0]
|
|
73
|
+
: localParticipant, onPressHandler: handleFloatingViewParticipantSwitch, ...participantViewProps }))),
|
|
74
|
+
showSpotlightLayout ? (React.createElement(CallParticipantsSpotlight, { ...callParticipantsSpotlightProps })) : (React.createElement(CallParticipantsGrid, { ...callParticipantsGridProps }))),
|
|
75
|
+
CallControls && (React.createElement(CallControls, { onHangupCallHandler: onHangupCallHandler }))));
|
|
106
76
|
};
|
|
107
|
-
|
|
108
|
-
const styles = react_native_1.StyleSheet.create({
|
|
77
|
+
const styles = StyleSheet.create({
|
|
109
78
|
container: { flex: 1 },
|
|
110
79
|
view: {
|
|
111
|
-
...
|
|
112
|
-
zIndex:
|
|
80
|
+
...StyleSheet.absoluteFillObject,
|
|
81
|
+
zIndex: Z_INDEX.IN_FRONT,
|
|
113
82
|
},
|
|
114
83
|
});
|
|
115
84
|
//# sourceMappingURL=CallContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallContent.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallContent/CallContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CallContent.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallContent/CallContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,WAAW,IAAI,kBAAkB,GAElC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,oBAAoB,EAEpB,yBAAyB,GAE1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,YAAY,IAAI,mBAAmB,GACpC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,iBAAiB,EA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ined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./CallContent"), exports);
|
|
1
|
+
export * from './CallContent';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallContent/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallContent/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.AcceptCallButton = void 0;
|
|
7
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
10
|
-
const icons_1 = require("../../../icons");
|
|
11
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import { useCall } from '@stream-io/video-react-bindings';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
4
|
+
import { Phone } from '../../../icons';
|
|
5
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
12
6
|
/**
|
|
13
7
|
* Button to accept a call.
|
|
14
8
|
*
|
|
15
9
|
* Mostly calls call.join() internally.
|
|
16
10
|
*/
|
|
17
|
-
const AcceptCallButton = ({ onPressHandler, onAcceptCallHandler, }) => {
|
|
18
|
-
const call =
|
|
19
|
-
const { theme: { colors, variants: { buttonSizes }, acceptCallButton, }, } =
|
|
11
|
+
export const AcceptCallButton = ({ onPressHandler, onAcceptCallHandler, }) => {
|
|
12
|
+
const call = useCall();
|
|
13
|
+
const { theme: { colors, variants: { buttonSizes }, acceptCallButton, }, } = useTheme();
|
|
20
14
|
const acceptCallHandler = async () => {
|
|
21
15
|
if (onPressHandler) {
|
|
22
16
|
onPressHandler();
|
|
@@ -32,9 +26,7 @@ const AcceptCallButton = ({ onPressHandler, onAcceptCallHandler, }) => {
|
|
|
32
26
|
console.log('Error joining Call', error);
|
|
33
27
|
}
|
|
34
28
|
};
|
|
35
|
-
return (
|
|
36
|
-
|
|
37
|
-
</CallControlsButton_1.CallControlsButton>);
|
|
29
|
+
return (React.createElement(CallControlsButton, { onPress: acceptCallHandler, color: colors.info, size: buttonSizes.lg, style: acceptCallButton },
|
|
30
|
+
React.createElement(Phone, { color: colors.static_white })));
|
|
38
31
|
};
|
|
39
|
-
exports.AcceptCallButton = AcceptCallButton;
|
|
40
32
|
//# sourceMappingURL=AcceptCallButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcceptCallButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/AcceptCallButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AcceptCallButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/AcceptCallButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,O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= require("./ToggleVideoPublishingButton");
|
|
11
|
-
const ToggleCameraFaceButton_1 = require("./ToggleCameraFaceButton");
|
|
12
|
-
const constants_1 = require("../../../constants");
|
|
13
|
-
const HangupCallButton_1 = require("./HangupCallButton");
|
|
14
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { ToggleAudioPublishingButton } from './ToggleAudioPublishingButton';
|
|
4
|
+
import { ToggleVideoPublishingButton } from './ToggleVideoPublishingButton';
|
|
5
|
+
import { ToggleCameraFaceButton } from './ToggleCameraFaceButton';
|
|
6
|
+
import { Z_INDEX } from '../../../constants';
|
|
7
|
+
import { HangUpCallButton } from './HangupCallButton';
|
|
8
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
15
9
|
/**
|
|
16
10
|
* A list/row of controls (mute audio/video, toggle front/back camera, hangup call etc.)
|
|
17
11
|
* the user can trigger within an active call.
|
|
18
12
|
*/
|
|
19
|
-
const CallControls = ({ style, onHangupCallHandler, }) => {
|
|
20
|
-
const { theme: { colors, callControls }, } =
|
|
21
|
-
return (
|
|
13
|
+
export const CallControls = ({ style, onHangupCallHandler, }) => {
|
|
14
|
+
const { theme: { colors, callControls }, } = useTheme();
|
|
15
|
+
return (React.createElement(View, { style: [
|
|
22
16
|
styles.container,
|
|
23
17
|
{ backgroundColor: colors.static_grey },
|
|
24
18
|
style,
|
|
25
19
|
callControls.container,
|
|
26
|
-
]}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</react_native_1.View>);
|
|
20
|
+
] },
|
|
21
|
+
React.createElement(ToggleVideoPublishingButton, null),
|
|
22
|
+
React.createElement(ToggleAudioPublishingButton, null),
|
|
23
|
+
React.createElement(ToggleCameraFaceButton, null),
|
|
24
|
+
React.createElement(HangUpCallButton, { onHangupCallHandler: onHangupCallHandler })));
|
|
32
25
|
};
|
|
33
|
-
|
|
34
|
-
const styles = react_native_1.StyleSheet.create({
|
|
26
|
+
const styles = StyleSheet.create({
|
|
35
27
|
container: {
|
|
36
28
|
paddingVertical: 12,
|
|
37
29
|
flexDirection: 'row',
|
|
38
30
|
justifyContent: 'space-evenly',
|
|
39
|
-
zIndex:
|
|
31
|
+
zIndex: Z_INDEX.IN_FRONT,
|
|
40
32
|
},
|
|
41
33
|
});
|
|
42
34
|
//# sourceMappingURL=CallControls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/CallControls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/CallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAa,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAa1D;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,mBAAmB,GACF,EAAE,EAAE;IACrB,MAAM,EACJ,KAAK,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,GAChC,GAAG,QAAQ,EAAE,CAAC;IACf,OAAO,CACL,oBAAC,IAAI,IACH,KAAK,EAAE;YACL,MAAM,CAAC,SAAS;YAChB,EAAE,eAAe,EAAE,MAAM,CAAC,WAAW,EAAE;YACvC,KAAK;YACL,YAAY,CAAC,SAAS;SACvB;QAED,oBAAC,2BAA2B,OAAG;QAC/B,oBAAC,2BAA2B,OAAG;QAC/B,oBAAC,sBAAsB,OAAG;QAC1B,oBAAC,gBAAgB,IAAC,mBAAmB,EAAE,mBAAmB,GAAI,CACzD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,eAAe,EAAE,EAAE;QACnB,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;QAC9B,MAAM,EAAE,OAAO,CAAC,QAAQ;KACzB;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CallControlsButton = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
10
|
-
const CallControlsButton = (props) => {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Pressable, StyleSheet, View, } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
4
|
+
export const CallControlsButton = (props) => {
|
|
11
5
|
const { onPress, children, disabled, color: colorProp, style: styleProp, size, testID, onLayout, } = props;
|
|
12
|
-
const { theme: { variants: { buttonSizes }, colors, callControlsButton: { container }, }, } =
|
|
6
|
+
const { theme: { variants: { buttonSizes }, colors, callControlsButton: { container }, }, } = useTheme();
|
|
13
7
|
const pressableStyle = ({ pressed }) => [
|
|
14
8
|
styles.container,
|
|
15
9
|
{
|
|
@@ -25,20 +19,16 @@ const CallControlsButton = (props) => {
|
|
|
25
19
|
styleProp?.container ?? null,
|
|
26
20
|
container,
|
|
27
21
|
];
|
|
28
|
-
return (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{children}
|
|
37
|
-
</react_native_1.View>
|
|
38
|
-
</react_native_1.Pressable>);
|
|
22
|
+
return (React.createElement(Pressable, { disabled: disabled, style: pressableStyle, onPress: onPress, testID: testID, onLayout: onLayout },
|
|
23
|
+
React.createElement(View, { style: [
|
|
24
|
+
{
|
|
25
|
+
height: (size || buttonSizes.sm) / 2 - 5,
|
|
26
|
+
width: (size || buttonSizes.sm) / 2 - 5,
|
|
27
|
+
},
|
|
28
|
+
styleProp?.svgContainer ?? null,
|
|
29
|
+
] }, children)));
|
|
39
30
|
};
|
|
40
|
-
|
|
41
|
-
const styles = react_native_1.StyleSheet.create({
|
|
31
|
+
const styles = StyleSheet.create({
|
|
42
32
|
container: {
|
|
43
33
|
justifyContent: 'center',
|
|
44
34
|
borderWidth: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallControlsButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/CallControlsButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CallControlsButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/CallControlsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,SAAS,EAET,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAmC1D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAuD,EACvD,EAAE;IACF,MAAM,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,MAAM,EACJ,KAAK,EAAE,EACL,QAAQ,EAAE,EAAE,WAAW,EAAE,EACzB,MAAM,EACN,kB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ACpB,UAAU;QACV,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE;YACZ,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,CAAC;SACV;QACD,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,CAAC;QAEf,cAAc;QACd,SAAS,EAAE,CAAC;KACb;CACF,CAAC,CAAC"}
|
|
@@ -1,50 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
10
|
-
const icons_1 = require("../../../icons");
|
|
11
|
-
const TestIds_1 = require("../../../constants/TestIds");
|
|
12
|
-
const constants_1 = require("../../../constants");
|
|
13
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
4
|
+
import { Chat } from '../../../icons';
|
|
5
|
+
import { ComponentTestIds } from '../../../constants/TestIds';
|
|
6
|
+
import { Z_INDEX } from '../../../constants';
|
|
7
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
14
8
|
/**
|
|
15
9
|
* Button to open the Chat window while in the call.
|
|
16
10
|
*
|
|
17
11
|
* This call also display the unread count indicator/badge is there messages that are unread.
|
|
18
12
|
*/
|
|
19
|
-
const ChatButton = ({ onPressHandler, unreadBadgeCount, }) => {
|
|
20
|
-
const { theme: { colors, chatButton }, } =
|
|
21
|
-
return (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</CallControlsButton_1.CallControlsButton>);
|
|
13
|
+
export const ChatButton = ({ onPressHandler, unreadBadgeCount, }) => {
|
|
14
|
+
const { theme: { colors, chatButton }, } = useTheme();
|
|
15
|
+
return (React.createElement(CallControlsButton, { onPress: onPressHandler, style: chatButton },
|
|
16
|
+
React.createElement(UnreadBadgeCountIndicator, { count: unreadBadgeCount }),
|
|
17
|
+
React.createElement(Chat, { color: colors.static_black })));
|
|
25
18
|
};
|
|
26
|
-
exports.ChatButton = ChatButton;
|
|
27
19
|
const UnreadBadgeCountIndicator = ({ count, }) => {
|
|
28
|
-
const { theme: { colors, typefaces }, } =
|
|
20
|
+
const { theme: { colors, typefaces }, } = useTheme();
|
|
29
21
|
// Don't show badge if count is 0 or undefined
|
|
30
22
|
if (!count) {
|
|
31
23
|
return null;
|
|
32
24
|
}
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{count}
|
|
38
|
-
</react_native_1.Text>
|
|
39
|
-
</react_native_1.View>);
|
|
25
|
+
return (React.createElement(View, { testID: ComponentTestIds.CHAT_UNREAD_BADGE_COUNT_INDICATOR, style: (styles.chatBadge, { backgroundColor: colors.error }) },
|
|
26
|
+
React.createElement(Text, { style: (styles.chatBadgeText,
|
|
27
|
+
{ color: colors.static_white },
|
|
28
|
+
typefaces.bodyBold) }, count)));
|
|
40
29
|
};
|
|
41
|
-
const styles =
|
|
30
|
+
const styles = StyleSheet.create({
|
|
42
31
|
chatBadge: {
|
|
43
32
|
borderRadius: 30,
|
|
44
33
|
position: 'absolute',
|
|
45
34
|
left: 15,
|
|
46
35
|
bottom: 20,
|
|
47
|
-
zIndex:
|
|
36
|
+
zIndex: Z_INDEX.IN_FRONT,
|
|
48
37
|
height: 30,
|
|
49
38
|
width: 30,
|
|
50
39
|
justifyContent: 'center',
|