@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ChatButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ChatButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAiB1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,cAAc,EACd,gBAAgB,GACA,EAAE,EAAE;IACpB,MAAM,EACJ,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,GAC9B,GAAG,QAAQ,EAAE,CAAC;IACf,OAAO,CACL,oBAAC,kBAAkB,IAAC,OAAO,EAAE,cAAc,EAAE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perty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
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.HangUpCallButton = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
29
|
-
const icons_1 = require("../../../icons");
|
|
30
|
-
const TestIds_1 = require("../../../constants/TestIds");
|
|
31
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
32
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
33
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
3
|
+
import { PhoneDown } from '../../../icons';
|
|
4
|
+
import { ButtonTestIds } from '../../../constants/TestIds';
|
|
5
|
+
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
6
|
+
import { CallingState } from '@stream-io/video-client';
|
|
7
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
34
8
|
/**
|
|
35
9
|
* Button to hangup a call.
|
|
36
10
|
*
|
|
37
11
|
* Mostly calls call.leave() internally.
|
|
38
12
|
*/
|
|
39
|
-
const HangUpCallButton = ({ onPressHandler, onHangupCallHandler, }) => {
|
|
40
|
-
const call =
|
|
41
|
-
const { useCallCallingState } =
|
|
13
|
+
export const HangUpCallButton = ({ onPressHandler, onHangupCallHandler, }) => {
|
|
14
|
+
const call = useCall();
|
|
15
|
+
const { useCallCallingState } = useCallStateHooks();
|
|
42
16
|
const callingState = useCallCallingState();
|
|
43
|
-
const { theme: { colors, hangupCallButton }, } =
|
|
44
|
-
const onPress =
|
|
17
|
+
const { theme: { colors, hangupCallButton }, } = useTheme();
|
|
18
|
+
const onPress = useCallback(async () => {
|
|
45
19
|
if (onPressHandler) {
|
|
46
20
|
onPressHandler();
|
|
47
21
|
return;
|
|
48
22
|
}
|
|
49
23
|
try {
|
|
50
|
-
if (callingState ===
|
|
24
|
+
if (callingState === CallingState.LEFT) {
|
|
51
25
|
return;
|
|
52
26
|
}
|
|
53
27
|
await call?.leave();
|
|
@@ -60,11 +34,9 @@ const HangUpCallButton = ({ onPressHandler, onHangupCallHandler, }) => {
|
|
|
60
34
|
}
|
|
61
35
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62
36
|
}, [call]);
|
|
63
|
-
return (
|
|
64
|
-
|
|
65
|
-
</CallControlsButton_1.CallControlsButton>);
|
|
37
|
+
return (React.createElement(CallControlsButton, { onPress: onPress, color: colors.error, style: hangupCallButton, testID: ButtonTestIds.HANG_UP_CALL },
|
|
38
|
+
React.createElement(PhoneDown, { color: colors.static_white })));
|
|
66
39
|
};
|
|
67
|
-
exports.HangUpCallButton = HangUpCallButton;
|
|
68
40
|
// TODO: Check if this style is needed
|
|
69
41
|
// This was passed to CallControlsButton as style prop
|
|
70
42
|
// const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HangupCallButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/HangupCallButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Hangup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AAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACL,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,aAAa,CAAC,YAAY;QAElC,oBAAC,SAAS,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAI,CACtB,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,sCAAsC;AACtC,sDAAsD;AACtD,qCAAqC;AACrC,cAAc;AACd,sCAAsC;AACtC,OAAO;AACP,MAAM"}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../contexts';
|
|
4
|
+
import { AcceptCallButton } from './AcceptCallButton';
|
|
5
|
+
import { RejectCallButton } from './RejectCallButton';
|
|
6
|
+
import { ToggleVideoPreviewButton } from './ToggleVideoPreviewButton';
|
|
7
|
+
export const IncomingCallControls = ({ onAcceptCallHandler, onRejectCallHandler, }) => {
|
|
8
|
+
const { theme: { incomingCall }, } = useTheme();
|
|
9
|
+
return (React.createElement(View, { style: [styles.buttonGroup, incomingCall.buttonGroup] },
|
|
10
|
+
React.createElement(RejectCallButton, { onPressHandler: onRejectCallHandler }),
|
|
11
|
+
React.createElement(ToggleVideoPreviewButton, null),
|
|
12
|
+
React.createElement(AcceptCallButton, { onPressHandler: onAcceptCallHandler })));
|
|
4
13
|
};
|
|
5
|
-
|
|
6
|
-
exports.IncomingCallControls = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const contexts_1 = require("../../../contexts");
|
|
10
|
-
const AcceptCallButton_1 = require("./AcceptCallButton");
|
|
11
|
-
const RejectCallButton_1 = require("./RejectCallButton");
|
|
12
|
-
const ToggleVideoPreviewButton_1 = require("./ToggleVideoPreviewButton");
|
|
13
|
-
const IncomingCallControls = ({ onAcceptCallHandler, onRejectCallHandler, }) => {
|
|
14
|
-
const { theme: { incomingCall }, } = (0, contexts_1.useTheme)();
|
|
15
|
-
return (<react_native_1.View style={[styles.buttonGroup, incomingCall.buttonGroup]}>
|
|
16
|
-
<RejectCallButton_1.RejectCallButton onPressHandler={onRejectCallHandler}/>
|
|
17
|
-
<ToggleVideoPreviewButton_1.ToggleVideoPreviewButton />
|
|
18
|
-
<AcceptCallButton_1.AcceptCallButton onPressHandler={onAcceptCallHandler}/>
|
|
19
|
-
</react_native_1.View>);
|
|
20
|
-
};
|
|
21
|
-
exports.IncomingCallControls = IncomingCallControls;
|
|
22
|
-
const styles = react_native_1.StyleSheet.create({
|
|
14
|
+
const styles = StyleSheet.create({
|
|
23
15
|
buttonGroup: {
|
|
24
16
|
flexDirection: 'row',
|
|
25
17
|
justifyContent: 'space-evenly',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IncomingCallControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/IncomingCallControls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IncomingCallControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/IncomingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAgBtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,mBAAmB,EACnB,mBAAmB,GACO,EAAE,EAAE;IAC9B,MAAM,EACJ,KAAK,EAAE,EAAE,YAAY,EAAE,GACxB,GAAG,QAAQ,EAAE,CAAC;IACf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,WAAW,CAAC;QACzD,oBAAC,gBAAgB,IAAC,cAAc,EAAE,mBAAmB,GAAI;QACzD,oBAAC,wBAAwB,OAAG;QAC5B,oBAAC,gBAAgB,IAAC,cAAc,EAAE,mBAAmB,GAAI,CACpD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE;QACX,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;QAC9B,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC,CAAC"}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
exports.LobbyControls = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const ToggleAudioPreviewButton_1 = require("./ToggleAudioPreviewButton");
|
|
10
|
-
const ToggleVideoPreviewButton_1 = require("./ToggleVideoPreviewButton");
|
|
11
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { ToggleAudioPreviewButton } from './ToggleAudioPreviewButton';
|
|
4
|
+
import { ToggleVideoPreviewButton } from './ToggleVideoPreviewButton';
|
|
5
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
12
6
|
/**
|
|
13
7
|
* Controls for the Lobby Component
|
|
14
8
|
*/
|
|
15
|
-
const LobbyControls = () => {
|
|
16
|
-
const { theme: { lobbyControls }, } =
|
|
17
|
-
return (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
</react_native_1.View>);
|
|
9
|
+
export const LobbyControls = () => {
|
|
10
|
+
const { theme: { lobbyControls }, } = useTheme();
|
|
11
|
+
return (React.createElement(View, { style: [styles.container, lobbyControls.container] },
|
|
12
|
+
React.createElement(ToggleAudioPreviewButton, null),
|
|
13
|
+
React.createElement(ToggleVideoPreviewButton, null)));
|
|
21
14
|
};
|
|
22
|
-
|
|
23
|
-
const styles = react_native_1.StyleSheet.create({
|
|
15
|
+
const styles = StyleSheet.create({
|
|
24
16
|
container: {
|
|
25
17
|
paddingVertical: 12,
|
|
26
18
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LobbyControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/LobbyControls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LobbyControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/LobbyControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EACJ,KAAK,EAAE,EAAE,aAAa,EAAE,GACzB,GAAG,QAAQ,EAAE,CAAC;IACf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,SAAS,CAAC;QACtD,oBAAC,wBAAwB,OAAG;QAC5B,oBAAC,wBAAwB,OAAG,CACvB,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;KAC/B;CACF,CAAC,CAAC"}
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { useTheme } from '../../../contexts';
|
|
4
|
+
import { HangUpCallButton } from './HangupCallButton';
|
|
5
|
+
import { ToggleAudioPreviewButton } from './ToggleAudioPreviewButton';
|
|
6
|
+
import { ToggleVideoPreviewButton } from './ToggleVideoPreviewButton';
|
|
7
|
+
export const OutgoingCallControls = ({ onHangupCallHandler, }) => {
|
|
8
|
+
const { theme: { outgoingCall }, } = useTheme();
|
|
9
|
+
return (React.createElement(View, { style: [styles.buttonGroup, outgoingCall.buttonGroup] },
|
|
10
|
+
React.createElement(View, { style: [styles.deviceControlButtons, outgoingCall.deviceControlButtons] },
|
|
11
|
+
React.createElement(ToggleAudioPreviewButton, null),
|
|
12
|
+
React.createElement(ToggleVideoPreviewButton, null)),
|
|
13
|
+
React.createElement(HangUpCallButton, { onPressHandler: onHangupCallHandler })));
|
|
4
14
|
};
|
|
5
|
-
|
|
6
|
-
exports.OutgoingCallControls = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const react_native_1 = require("react-native");
|
|
9
|
-
const contexts_1 = require("../../../contexts");
|
|
10
|
-
const HangupCallButton_1 = require("./HangupCallButton");
|
|
11
|
-
const ToggleAudioPreviewButton_1 = require("./ToggleAudioPreviewButton");
|
|
12
|
-
const ToggleVideoPreviewButton_1 = require("./ToggleVideoPreviewButton");
|
|
13
|
-
const OutgoingCallControls = ({ onHangupCallHandler, }) => {
|
|
14
|
-
const { theme: { outgoingCall }, } = (0, contexts_1.useTheme)();
|
|
15
|
-
return (<react_native_1.View style={[styles.buttonGroup, outgoingCall.buttonGroup]}>
|
|
16
|
-
<react_native_1.View style={[styles.deviceControlButtons, outgoingCall.deviceControlButtons]}>
|
|
17
|
-
<ToggleAudioPreviewButton_1.ToggleAudioPreviewButton />
|
|
18
|
-
<ToggleVideoPreviewButton_1.ToggleVideoPreviewButton />
|
|
19
|
-
</react_native_1.View>
|
|
20
|
-
<HangupCallButton_1.HangUpCallButton onPressHandler={onHangupCallHandler}/>
|
|
21
|
-
</react_native_1.View>);
|
|
22
|
-
};
|
|
23
|
-
exports.OutgoingCallControls = OutgoingCallControls;
|
|
24
|
-
const styles = react_native_1.StyleSheet.create({
|
|
15
|
+
const styles = StyleSheet.create({
|
|
25
16
|
buttonGroup: {
|
|
26
17
|
alignItems: 'center',
|
|
27
18
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutgoingCallControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/OutgoingCallControls.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OutgoingCallControls.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/OutgoingCallControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAYtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,mBAAmB,GACO,EAAE,EAAE;IAC9B,MAAM,EACJ,KAAK,EAAE,EAAE,YAAY,EAAE,GACxB,GAAG,QAAQ,EAAE,CAAC;IACf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,WAAW,CAAC;QACzD,oBAAC,IAAI,IACH,KAAK,EAAE,CAAC,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAAC,oBAAoB,CAAC;YAEvE,oBAAC,wBAAwB,OAAG;YAC5B,oBAAC,wBAAwB,OAAG,CACvB;QACP,oBAAC,gBAAgB,IAAC,cAAc,EAAE,mBAAmB,GAAI,CACpD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,WAAW,EAAE;QACX,UAAU,EAAE,QAAQ;KACrB;IACD,oBAAoB,EAAE;QACpB,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,cAAc;KAC/B;CACF,CAAC,CAAC"}
|
|
@@ -1,46 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
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.ReactionButton = void 0;
|
|
27
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
28
|
-
const react_1 = __importStar(require("react"));
|
|
29
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
30
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
31
|
-
const TestIds_1 = require("../../../constants/TestIds");
|
|
32
|
-
const icons_1 = require("../../../icons");
|
|
33
|
-
const ReactionsPicker_1 = require("./internal/ReactionsPicker");
|
|
34
|
-
const utils_1 = require("../../../utils");
|
|
35
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import { Restricted } from '@stream-io/video-react-bindings';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
4
|
+
import { OwnCapability } from '@stream-io/video-client';
|
|
5
|
+
import { ButtonTestIds } from '../../../constants/TestIds';
|
|
6
|
+
import { Reaction } from '../../../icons';
|
|
7
|
+
import { ReactionsPicker } from './internal/ReactionsPicker';
|
|
8
|
+
import { StreamVideoRN } from '../../../utils';
|
|
9
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
36
10
|
/**
|
|
37
11
|
* Button to display the list of Reactions supported in the call.
|
|
38
12
|
* On press, it opens a view that can be used to send Reaction.
|
|
39
13
|
*/
|
|
40
|
-
const ReactionButton = ({ onPressHandler }) => {
|
|
41
|
-
const [showReactionsPicker, setShowReactionsPicker] =
|
|
42
|
-
const [reactionsButtonLayoutRectangle, setReactionsButtonLayoutRectangle] =
|
|
43
|
-
const { theme: { colors }, } =
|
|
14
|
+
export const ReactionButton = ({ onPressHandler }) => {
|
|
15
|
+
const [showReactionsPicker, setShowReactionsPicker] = useState(false);
|
|
16
|
+
const [reactionsButtonLayoutRectangle, setReactionsButtonLayoutRectangle] = useState();
|
|
17
|
+
const { theme: { colors }, } = useTheme();
|
|
44
18
|
// This is for the reaction picker
|
|
45
19
|
const onReactionsButtonLayout = (event) => {
|
|
46
20
|
const layout = event.nativeEvent.layout;
|
|
@@ -62,16 +36,12 @@ const ReactionButton = ({ onPressHandler }) => {
|
|
|
62
36
|
}
|
|
63
37
|
setShowReactionsPicker(true);
|
|
64
38
|
};
|
|
65
|
-
return (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</video_react_bindings_1.Restricted>
|
|
71
|
-
{showReactionsPicker && (<ReactionsPicker_1.ReactionsPicker reactions={utils_1.StreamVideoRN.getConfig().supportedReactions} reactionsButtonLayoutRectangle={reactionsButtonLayoutRectangle} onRequestedClose={() => {
|
|
39
|
+
return (React.createElement(React.Fragment, null,
|
|
40
|
+
React.createElement(Restricted, { requiredGrants: [OwnCapability.CREATE_REACTION] },
|
|
41
|
+
React.createElement(CallControlsButton, { testID: ButtonTestIds.REACTION, onPress: reactionButtonHandler, onLayout: onReactionsButtonLayout },
|
|
42
|
+
React.createElement(Reaction, { color: colors.static_black }))),
|
|
43
|
+
showReactionsPicker && (React.createElement(ReactionsPicker, { reactions: StreamVideoRN.getConfig().supportedReactions, reactionsButtonLayoutRectangle: reactionsButtonLayoutRectangle, onRequestedClose: () => {
|
|
72
44
|
setShowReactionsPicker(false);
|
|
73
|
-
}}
|
|
74
|
-
</>);
|
|
45
|
+
} }))));
|
|
75
46
|
};
|
|
76
|
-
exports.ReactionButton = ReactionButton;
|
|
77
47
|
//# sourceMappingURL=ReactionButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactionButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ReactionButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReactionButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ReactionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MA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AU,IAAC,cAAc,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC;YACzD,oBAAC,kBAAkB,IACjB,MAAM,EAAE,aAAa,CAAC,QAAQ,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,uBAAuB;gBAEjC,oBAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAI,CACrB,CACV;QACZ,mBAAmB,IAAI,CACtB,oBAAC,eAAe,IACd,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,kBAAkB,EACvD,8BAA8B,EAAE,8BAA8B,EAC9D,gBAAgB,EAAE,GAAG,EAAE;gBACrB,sBAAsB,CAAC,KAAK,CAAC,CAAC;YAChC,CAAC,GACD,CACH,CACA,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
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 video_client_1 = require("@stream-io/video-client");
|
|
12
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
4
|
+
import { PhoneDown } from '../../../icons';
|
|
5
|
+
import { CallingState } from '@stream-io/video-client';
|
|
6
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
13
7
|
/**
|
|
14
8
|
* Button to reject a call.
|
|
15
9
|
*
|
|
16
10
|
* Mostly calls call.leave({ reject: true }) internally.
|
|
17
11
|
*/
|
|
18
|
-
const RejectCallButton = ({ onPressHandler, onRejectCallHandler, }) => {
|
|
19
|
-
const call =
|
|
20
|
-
const { useCallCallingState } =
|
|
12
|
+
export const RejectCallButton = ({ onPressHandler, onRejectCallHandler, }) => {
|
|
13
|
+
const call = useCall();
|
|
14
|
+
const { useCallCallingState } = useCallStateHooks();
|
|
21
15
|
const callingState = useCallCallingState();
|
|
22
|
-
const { theme: { colors, rejectCallButton, variants: { buttonSizes }, }, } =
|
|
16
|
+
const { theme: { colors, rejectCallButton, variants: { buttonSizes }, }, } = useTheme();
|
|
23
17
|
const rejectCallHandler = async () => {
|
|
24
18
|
if (onPressHandler) {
|
|
25
19
|
onPressHandler();
|
|
26
20
|
return;
|
|
27
21
|
}
|
|
28
22
|
try {
|
|
29
|
-
if (callingState ===
|
|
23
|
+
if (callingState === CallingState.LEFT) {
|
|
30
24
|
return;
|
|
31
25
|
}
|
|
32
26
|
await call?.leave({ reject: true });
|
|
@@ -38,12 +32,10 @@ const RejectCallButton = ({ onPressHandler, onRejectCallHandler, }) => {
|
|
|
38
32
|
console.log('Error rejecting Call', error);
|
|
39
33
|
}
|
|
40
34
|
};
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</CallControlsButton_1.CallControlsButton>);
|
|
35
|
+
return (React.createElement(CallControlsButton, { onPress: rejectCallHandler, color: colors.error, size: buttonSizes.lg,
|
|
36
|
+
// TODO: check what to do about this random style prop
|
|
37
|
+
// svgContainerStyle={theme.icon.lg}
|
|
38
|
+
style: rejectCallButton },
|
|
39
|
+
React.createElement(PhoneDown, { color: colors.static_white })));
|
|
47
40
|
};
|
|
48
|
-
exports.RejectCallButton = RejectCallButton;
|
|
49
41
|
//# sourceMappingURL=RejectCallButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RejectCallButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/RejectCallButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RejectCallButton.js","sourceRoot":"","sources":["../../../../../src/components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B,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,IAAI,EAAE,WAAW,CAAC,EAAE;QACpB,sDAAsD;QACtD,oCAAoC;QACpC,KAAK,EAAE,gBAAgB;QAEvB,oBAAC,SAAS,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAI,CACtB,CACtB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const contexts_1 = require("../../../contexts");
|
|
10
|
-
const icons_1 = require("../../../icons");
|
|
11
|
-
const providers_1 = require("../../../providers");
|
|
12
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
1
|
+
import { useCallStateHooks } from '@stream-io/video-react-bindings';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useTheme } from '../../../contexts';
|
|
4
|
+
import { Mic, MicOff } from '../../../icons';
|
|
5
|
+
import { useMediaStreamManagement } from '../../../providers';
|
|
6
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
13
7
|
/**
|
|
14
8
|
* Button to toggle audio mute/unmute status before joining the call.
|
|
15
9
|
*/
|
|
16
|
-
const ToggleAudioPreviewButton = ({ onPressHandler, }) => {
|
|
17
|
-
const { theme: { colors, toggleAudioPreviewButton, variants: { buttonSizes }, }, } =
|
|
18
|
-
const { useMicrophoneState } =
|
|
10
|
+
export const ToggleAudioPreviewButton = ({ onPressHandler, }) => {
|
|
11
|
+
const { theme: { colors, toggleAudioPreviewButton, variants: { buttonSizes }, }, } = useTheme();
|
|
12
|
+
const { useMicrophoneState } = useCallStateHooks();
|
|
19
13
|
const { status } = useMicrophoneState();
|
|
20
|
-
const { toggleInitialAudioMuteState } =
|
|
14
|
+
const { toggleInitialAudioMuteState } = useMediaStreamManagement();
|
|
21
15
|
const onPress = () => {
|
|
22
16
|
if (onPressHandler) {
|
|
23
17
|
onPressHandler();
|
|
@@ -25,15 +19,12 @@ const ToggleAudioPreviewButton = ({ onPressHandler, }) => {
|
|
|
25
19
|
}
|
|
26
20
|
toggleInitialAudioMuteState();
|
|
27
21
|
};
|
|
28
|
-
return (
|
|
22
|
+
return (React.createElement(CallControlsButton, { onPress: onPress, color: status === 'enabled' ? colors.static_white : colors.static_black, size: buttonSizes.md, style: {
|
|
29
23
|
container: {
|
|
30
24
|
shadowColor: status === 'enabled' ? colors.static_white : colors.static_black,
|
|
31
25
|
...toggleAudioPreviewButton.container,
|
|
32
26
|
},
|
|
33
27
|
svgContainer: toggleAudioPreviewButton.svgContainer,
|
|
34
|
-
}}
|
|
35
|
-
{status === 'disabled' ? (<icons_1.MicOff color={colors.static_white}/>) : (<icons_1.Mic color={colors.static_black}/>)}
|
|
36
|
-
</CallControlsButton_1.CallControlsButton>);
|
|
28
|
+
} }, status === 'disabled' ? (React.createElement(MicOff, { color: colors.static_white })) : (React.createElement(Mic, { color: colors.static_black }))));
|
|
37
29
|
};
|
|
38
|
-
exports.ToggleAudioPreviewButton = ToggleAudioPreviewButton;
|
|
39
30
|
//# sourceMappingURL=ToggleAudioPreviewButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleAudioPreviewButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ToggleAudioPreviewButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToggleAudioPreviewButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ToggleAudioPreviewButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAg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AK,EAAE,MAAM,CAAC,YAAY,GAAI,CACpC,CACkB,CACtB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
9
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
10
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
11
|
-
const icons_1 = require("../../../icons");
|
|
12
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OwnCapability } from '@stream-io/video-client';
|
|
3
|
+
import { Restricted, useCall, useCallStateHooks, } from '@stream-io/video-react-bindings';
|
|
4
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
5
|
+
import { Mic, MicOff } from '../../../icons';
|
|
6
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
13
7
|
/**
|
|
14
8
|
* Button to toggle audio mute/unmute status while in the call.
|
|
15
9
|
*/
|
|
16
|
-
const ToggleAudioPublishingButton = ({ onPressHandler, }) => {
|
|
17
|
-
const call =
|
|
18
|
-
const { useMicrophoneState } =
|
|
10
|
+
export const ToggleAudioPublishingButton = ({ onPressHandler, }) => {
|
|
11
|
+
const call = useCall();
|
|
12
|
+
const { useMicrophoneState } = useCallStateHooks();
|
|
19
13
|
const { status } = useMicrophoneState();
|
|
20
|
-
const { theme: { colors, toggleAudioPublishingButton }, } =
|
|
14
|
+
const { theme: { colors, toggleAudioPublishingButton }, } = useTheme();
|
|
21
15
|
const onPress = async () => {
|
|
22
16
|
if (onPressHandler) {
|
|
23
17
|
onPressHandler();
|
|
@@ -25,11 +19,7 @@ const ToggleAudioPublishingButton = ({ onPressHandler, }) => {
|
|
|
25
19
|
}
|
|
26
20
|
await call?.microphone.toggle();
|
|
27
21
|
};
|
|
28
|
-
return (
|
|
29
|
-
|
|
30
|
-
{status === 'disabled' ? (<icons_1.MicOff color={colors.static_white}/>) : (<icons_1.Mic color={colors.static_black}/>)}
|
|
31
|
-
</CallControlsButton_1.CallControlsButton>
|
|
32
|
-
</video_react_bindings_1.Restricted>);
|
|
22
|
+
return (React.createElement(Restricted, { requiredGrants: [OwnCapability.SEND_AUDIO] },
|
|
23
|
+
React.createElement(CallControlsButton, { onPress: onPress, color: status === 'disabled' ? colors.overlay_dark : colors.static_white, style: toggleAudioPublishingButton }, status === 'disabled' ? (React.createElement(MicOff, { color: colors.static_white })) : (React.createElement(Mic, { color: colors.static_black })))));
|
|
33
24
|
};
|
|
34
|
-
exports.ToggleAudioPublishingButton = ToggleAudioPublishingButton;
|
|
35
25
|
//# sourceMappingURL=ToggleAudioPublishingButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleAudioPublishingButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ToggleAudioPublishingButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToggleAudioPublishingButton.js","sourceRoot":"","sources":["../../../../../src/components/Call/CallControls/ToggleAudioPublishingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,OAAO,EACP,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAa1D;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,cAAc,GACmB,EAAE,EAAE;IACrC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,EAAE,kBAAkB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACnD,MAAM,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAExC,MAAM,EACJ,KAAK,EAAE,EAAE,MAAM,EAAE,2BAA2B,EAAE,GAC/C,GAAG,QAAQ,EAAE,CAAC;IACf,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;QACzB,IAAI,cAAc,EAAE;YAClB,cAAc,EAAE,CAAC;YACjB,OAAO;SACR;QAED,MAAM,IAAI,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC;IAClC,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IAAC,cAAc,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC;QACpD,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,EAEnE,KAAK,EAAE,2BAA2B,IAEjC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CACvB,oBAAC,MAAM,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAI,CACvC,CAAC,CAAC,CAAC,CACF,oBAAC,GAAG,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAI,CACpC,CACkB,CACV,CACd,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
8
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const CallControlsButton_1 = require("./CallControlsButton");
|
|
11
|
-
const icons_1 = require("../../../icons");
|
|
12
|
-
const ThemeContext_1 = require("../../../contexts/ThemeContext");
|
|
1
|
+
import { OwnCapability } from '@stream-io/video-client';
|
|
2
|
+
import { Restricted, useCall, useCallStateHooks, } from '@stream-io/video-react-bindings';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { CallControlsButton } from './CallControlsButton';
|
|
5
|
+
import { CameraSwitch } from '../../../icons';
|
|
6
|
+
import { useTheme } from '../../../contexts/ThemeContext';
|
|
13
7
|
/**
|
|
14
8
|
* Button to toggle camera face(front/back) when in the call.
|
|
15
9
|
*/
|
|
16
|
-
const ToggleCameraFaceButton = ({ onPressHandler, }) => {
|
|
17
|
-
const call =
|
|
18
|
-
const { useCameraState } =
|
|
10
|
+
export const ToggleCameraFaceButton = ({ onPressHandler, }) => {
|
|
11
|
+
const call = useCall();
|
|
12
|
+
const { useCameraState } = useCallStateHooks();
|
|
19
13
|
const { status, direction } = useCameraState();
|
|
20
|
-
const { theme: { colors, toggleCameraFaceButton }, } =
|
|
14
|
+
const { theme: { colors, toggleCameraFaceButton }, } = useTheme();
|
|
21
15
|
const onPress = async () => {
|
|
22
16
|
onPressHandler?.();
|
|
23
17
|
await call?.camera.flip();
|
|
24
18
|
};
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</CallControlsButton_1.CallControlsButton>
|
|
29
|
-
</video_react_bindings_1.Restricted>);
|
|
19
|
+
return (React.createElement(Restricted, { requiredGrants: [OwnCapability.SEND_VIDEO] },
|
|
20
|
+
React.createElement(CallControlsButton, { onPress: onPress, color: direction === 'back' ? colors.overlay_dark : colors.static_white, disabled: status === 'disabled', style: toggleCameraFaceButton },
|
|
21
|
+
React.createElement(CameraSwitch, { color: direction === 'front' ? colors.static_black : colors.static_white }))));
|
|
30
22
|
};
|
|
31
|
-
exports.ToggleCameraFaceButton = ToggleCameraFaceButton;
|
|
32
23
|
//# sourceMappingURL=ToggleCameraFaceButton.js.map
|