@stream-io/video-react-native-sdk 0.0.1-alpha.366 → 0.0.1-alpha.368
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/__tests__/components/CallControls.test.js +11 -7
- package/dist/__tests__/components/CallControls.test.js.map +1 -1
- package/dist/src/components/call/CallControls/AcceptCallButton.d.ts +22 -0
- package/dist/src/components/call/CallControls/AcceptCallButton.js +39 -0
- package/dist/src/components/call/CallControls/AcceptCallButton.js.map +1 -0
- package/dist/src/components/call/CallControls/CallControls.d.ts +16 -0
- package/dist/src/components/call/CallControls/CallControls.js +38 -0
- package/dist/src/components/call/CallControls/CallControls.js.map +1 -0
- package/dist/src/components/{utility/internal → call/CallControls}/CallControlsButton.d.ts +5 -1
- package/dist/src/components/{utility/internal → call/CallControls}/CallControlsButton.js +12 -7
- package/dist/src/components/call/CallControls/CallControlsButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ChatButton.d.ts +20 -0
- package/dist/src/components/call/CallControls/ChatButton.js +58 -0
- package/dist/src/components/call/CallControls/ChatButton.js.map +1 -0
- package/dist/src/components/{utility/internal → call/CallControls}/HangupCallButton.d.ts +12 -1
- package/dist/src/components/{utility/internal → call/CallControls}/HangupCallButton.js +10 -16
- package/dist/src/components/call/CallControls/HangupCallButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ReactionButton.d.ts +14 -0
- package/dist/src/components/call/CallControls/ReactionButton.js +76 -0
- package/dist/src/components/call/CallControls/ReactionButton.js.map +1 -0
- package/dist/src/components/call/CallControls/RejectCallButton.d.ts +23 -0
- package/dist/src/components/call/CallControls/RejectCallButton.js +45 -0
- package/dist/src/components/call/CallControls/RejectCallButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ToggleAudioPreviewButton.d.ts +14 -0
- package/dist/src/components/call/CallControls/ToggleAudioPreviewButton.js +39 -0
- package/dist/src/components/call/CallControls/ToggleAudioPreviewButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ToggleAudioPublishingButton.d.ts +14 -0
- package/dist/src/components/{utility/internal/ToggleAudioButton.js → call/CallControls/ToggleAudioPublishingButton.js} +14 -23
- package/dist/src/components/call/CallControls/ToggleAudioPublishingButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ToggleCameraFaceButton.d.ts +14 -0
- package/dist/src/components/{utility/internal → call/CallControls}/ToggleCameraFaceButton.js +12 -16
- package/dist/src/components/call/CallControls/ToggleCameraFaceButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ToggleVideoPreviewButton.d.ts +14 -0
- package/dist/src/components/call/CallControls/ToggleVideoPreviewButton.js +39 -0
- package/dist/src/components/call/CallControls/ToggleVideoPreviewButton.js.map +1 -0
- package/dist/src/components/call/CallControls/ToggleVideoPublishingButton.d.ts +14 -0
- package/dist/src/components/{utility/internal/ToggleVideoButton.js → call/CallControls/ToggleVideoPublishingButton.js} +14 -23
- package/dist/src/components/call/CallControls/ToggleVideoPublishingButton.js.map +1 -0
- package/dist/src/components/call/CallControls/index.d.ts +11 -0
- package/dist/src/components/call/CallControls/index.js +28 -0
- package/dist/src/components/call/CallControls/index.js.map +1 -0
- package/dist/src/components/call/CallTopView/CallTopView.d.ts +22 -0
- package/dist/src/components/call/CallTopView/CallTopView.js +106 -0
- package/dist/src/components/call/CallTopView/CallTopView.js.map +1 -0
- package/dist/src/components/call/CallTopView/ParticipantsInfoBadge.d.ts +7 -0
- package/dist/src/components/call/CallTopView/ParticipantsInfoBadge.js +52 -0
- package/dist/src/components/call/CallTopView/ParticipantsInfoBadge.js.map +1 -0
- package/dist/src/components/call/CallTopView/index.d.ts +2 -0
- package/dist/src/components/call/CallTopView/index.js +19 -0
- package/dist/src/components/call/CallTopView/index.js.map +1 -0
- package/dist/src/components/call/IncomingCall.js +10 -75
- package/dist/src/components/call/IncomingCall.js.map +1 -1
- package/dist/src/components/call/Lobby.js +8 -30
- package/dist/src/components/call/Lobby.js.map +1 -1
- package/dist/src/components/call/OutgoingCall.d.ts +1 -1
- package/dist/src/components/call/OutgoingCall.js +5 -15
- package/dist/src/components/call/OutgoingCall.js.map +1 -1
- package/dist/src/components/call/ReactionsPicker.js +3 -3
- package/dist/src/components/call/ReactionsPicker.js.map +1 -1
- package/dist/src/components/call/index.d.ts +1 -0
- package/dist/src/components/call/index.js +1 -0
- package/dist/src/components/call/index.js.map +1 -1
- package/dist/src/components/participants/index.d.ts +0 -2
- package/dist/src/components/participants/index.js +0 -2
- package/dist/src/components/participants/index.js.map +1 -1
- package/dist/src/icons/Back.d.ts +5 -0
- package/dist/src/icons/Back.js +13 -0
- package/dist/src/icons/Back.js.map +1 -0
- package/dist/src/icons/TopViewBackground.d.ts +13 -0
- package/dist/src/icons/TopViewBackground.js +19 -0
- package/dist/src/icons/TopViewBackground.js.map +1 -0
- package/dist/src/icons/index.d.ts +1 -4
- package/dist/src/icons/index.js +1 -4
- package/dist/src/icons/index.js.map +1 -1
- package/dist/src/theme/padding.js +1 -1
- package/dist/src/translations/en.json +1 -0
- package/dist/src/translations/index.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/components/call/CallControls/AcceptCallButton.tsx +58 -0
- package/src/components/call/CallControls/CallControls.tsx +48 -0
- package/src/components/{utility/internal → call/CallControls}/CallControlsButton.tsx +18 -10
- package/src/components/call/CallControls/ChatButton.tsx +87 -0
- package/src/components/{utility/internal → call/CallControls}/HangupCallButton.tsx +17 -18
- package/src/components/call/CallControls/ReactionButton.tsx +80 -0
- package/src/components/call/CallControls/RejectCallButton.tsx +65 -0
- package/src/components/call/CallControls/ToggleAudioPreviewButton.tsx +61 -0
- package/src/components/{utility/internal/ToggleAudioButton.tsx → call/CallControls/ToggleAudioPublishingButton.tsx} +24 -24
- package/src/components/{utility/internal → call/CallControls}/ToggleCameraFaceButton.tsx +26 -19
- package/src/components/call/CallControls/ToggleVideoPreviewButton.tsx +61 -0
- package/src/components/{utility/internal/ToggleVideoButton.tsx → call/CallControls/ToggleVideoPublishingButton.tsx} +24 -24
- package/src/components/call/CallControls/index.tsx +11 -0
- package/src/components/call/CallTopView/CallTopView.tsx +130 -0
- package/src/components/call/CallTopView/ParticipantsInfoBadge.tsx +61 -0
- package/src/components/call/CallTopView/index.ts +2 -0
- package/src/components/call/IncomingCall.tsx +8 -76
- package/src/components/call/Lobby.tsx +10 -55
- package/src/components/call/OutgoingCall.tsx +5 -38
- package/src/components/call/ReactionsPicker.tsx +3 -3
- package/src/components/call/index.ts +1 -0
- package/src/components/participants/index.ts +0 -2
- package/src/icons/Back.tsx +15 -0
- package/src/icons/TopViewBackground.tsx +43 -0
- package/src/icons/index.tsx +1 -4
- package/src/theme/padding.ts +1 -1
- package/src/translations/en.json +1 -0
- package/dist/__tests__/components/ParticipantBadge.test.d.ts +0 -1
- package/dist/__tests__/components/ParticipantBadge.test.js +0 -70
- package/dist/__tests__/components/ParticipantBadge.test.js.map +0 -1
- package/dist/src/components/call/CallControls.d.ts +0 -35
- package/dist/src/components/call/CallControls.js +0 -136
- package/dist/src/components/call/CallControls.js.map +0 -1
- package/dist/src/components/participants/ParticipantsInfoBadge.d.ts +0 -8
- package/dist/src/components/participants/ParticipantsInfoBadge.js +0 -74
- package/dist/src/components/participants/ParticipantsInfoBadge.js.map +0 -1
- package/dist/src/components/participants/ParticipantsInfoList.d.ts +0 -17
- package/dist/src/components/participants/ParticipantsInfoList.js +0 -243
- package/dist/src/components/participants/ParticipantsInfoList.js.map +0 -1
- package/dist/src/components/participants/internal/ParticipantActions.d.ts +0 -8
- package/dist/src/components/participants/internal/ParticipantActions.js +0 -236
- package/dist/src/components/participants/internal/ParticipantActions.js.map +0 -1
- package/dist/src/components/utility/internal/CallControlsButton.js.map +0 -1
- package/dist/src/components/utility/internal/HangupCallButton.js.map +0 -1
- package/dist/src/components/utility/internal/ToggleAudioButton.d.ts +0 -1
- package/dist/src/components/utility/internal/ToggleAudioButton.js.map +0 -1
- package/dist/src/components/utility/internal/ToggleCameraFaceButton.d.ts +0 -1
- package/dist/src/components/utility/internal/ToggleCameraFaceButton.js.map +0 -1
- package/dist/src/components/utility/internal/ToggleVideoButton.d.ts +0 -1
- package/dist/src/components/utility/internal/ToggleVideoButton.js.map +0 -1
- package/dist/src/icons/ArrowRight.d.ts +0 -5
- package/dist/src/icons/ArrowRight.js +0 -13
- package/dist/src/icons/ArrowRight.js.map +0 -1
- package/dist/src/icons/Cross.d.ts +0 -6
- package/dist/src/icons/Cross.js +0 -13
- package/dist/src/icons/Cross.js.map +0 -1
- package/dist/src/icons/Pin.d.ts +0 -5
- package/dist/src/icons/Pin.js +0 -13
- package/dist/src/icons/Pin.js.map +0 -1
- package/dist/src/icons/VideoDisabled.d.ts +0 -5
- package/dist/src/icons/VideoDisabled.js +0 -14
- package/dist/src/icons/VideoDisabled.js.map +0 -1
- package/src/components/call/CallControls.tsx +0 -195
- package/src/components/participants/ParticipantsInfoBadge.tsx +0 -70
- package/src/components/participants/ParticipantsInfoList.tsx +0 -319
- package/src/components/participants/internal/ParticipantActions.tsx +0 -289
- package/src/icons/ArrowRight.tsx +0 -17
- package/src/icons/Cross.tsx +0 -15
- package/src/icons/Pin.tsx +0 -17
- package/src/icons/VideoDisabled.tsx +0 -23
|
@@ -144,12 +144,12 @@ const styles = StyleSheet.create({
|
|
|
144
144
|
reactionsPopup: {
|
|
145
145
|
position: 'absolute',
|
|
146
146
|
alignItems: 'center',
|
|
147
|
-
backgroundColor: theme.light.
|
|
147
|
+
backgroundColor: theme.light.static_grey,
|
|
148
148
|
paddingTop: TOP_PADDING,
|
|
149
149
|
},
|
|
150
150
|
reactionsButtonDimmer: {
|
|
151
151
|
position: 'absolute',
|
|
152
|
-
backgroundColor: theme.light.
|
|
152
|
+
backgroundColor: theme.light.static_grey,
|
|
153
153
|
opacity: 0.5,
|
|
154
154
|
},
|
|
155
155
|
reactionItem: {
|
|
@@ -157,7 +157,7 @@ const styles = StyleSheet.create({
|
|
|
157
157
|
justifyContent: 'center',
|
|
158
158
|
marginBottom: REACTION_MARGIN_BOTTOM,
|
|
159
159
|
// temporary background color until we have theming
|
|
160
|
-
backgroundColor: theme.light.
|
|
160
|
+
backgroundColor: theme.light.overlay,
|
|
161
161
|
},
|
|
162
162
|
reactionText: {
|
|
163
163
|
fontSize: 18.5,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Svg, Path } from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
color: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Back = ({ color }: Props) => (
|
|
9
|
+
<Svg viewBox="0 0 24 26">
|
|
10
|
+
<Path
|
|
11
|
+
d="M 8.36621 11.6543 C 8.36621 11.9531 8.48047 12.208 8.71777 12.4365 L 15.5732 19.1426 C 15.7578 19.3359 16.0039 19.4326 16.2852 19.4326 C 16.8564 19.4326 17.3047 18.9932 17.3047 18.4131 C 17.3047 18.1318 17.1904 17.877 16.9971 17.6836 L 10.8184 11.6543 L 16.9971 5.625 C 17.1904 5.42285 17.3047 5.16797 17.3047 4.88672 C 17.3047 4.31543 16.8564 3.87598 16.2852 3.87598 C 16.0039 3.87598 15.7578 3.97266 15.5732 4.16602 L 8.71777 10.8721 C 8.48047 11.1006 8.375 11.3555 8.36621 11.6543 Z"
|
|
12
|
+
fill={color}
|
|
13
|
+
/>
|
|
14
|
+
</Svg>
|
|
15
|
+
);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Svg,
|
|
4
|
+
Rect,
|
|
5
|
+
Defs,
|
|
6
|
+
LinearGradient,
|
|
7
|
+
Stop,
|
|
8
|
+
NumberProp,
|
|
9
|
+
} from 'react-native-svg';
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
/**
|
|
13
|
+
* Height of the SVG container
|
|
14
|
+
*/
|
|
15
|
+
height?: NumberProp;
|
|
16
|
+
/**
|
|
17
|
+
* Width of the SVG container
|
|
18
|
+
*/
|
|
19
|
+
width?: NumberProp;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const TopViewBackground = ({ height, width }: Props) => (
|
|
23
|
+
<Svg width={width} height={height} fill={'none'}>
|
|
24
|
+
<Defs>
|
|
25
|
+
<LinearGradient
|
|
26
|
+
id="paint0_linear_8092_98095"
|
|
27
|
+
x1={3}
|
|
28
|
+
y1={0}
|
|
29
|
+
x2={3}
|
|
30
|
+
y2={height}
|
|
31
|
+
gradientUnits="userSpaceOnUse"
|
|
32
|
+
>
|
|
33
|
+
<Stop stopOpacity={0.2} />
|
|
34
|
+
<Stop offset={1} stopOpacity={0} />
|
|
35
|
+
</LinearGradient>
|
|
36
|
+
</Defs>
|
|
37
|
+
<Rect
|
|
38
|
+
width={width}
|
|
39
|
+
height={height}
|
|
40
|
+
fill={'url(#paint0_linear_8092_98095)'}
|
|
41
|
+
/>
|
|
42
|
+
</Svg>
|
|
43
|
+
);
|
package/src/icons/index.tsx
CHANGED
|
@@ -9,11 +9,8 @@ export * from './VideoSlash';
|
|
|
9
9
|
export * from './Chat';
|
|
10
10
|
export * from './Participants';
|
|
11
11
|
export * from './ThreeDots';
|
|
12
|
-
export * from './Pin';
|
|
13
12
|
export * from './PinVertical';
|
|
14
13
|
export * from './Spotlight';
|
|
15
|
-
export * from './Cross';
|
|
16
14
|
export * from './ScreenShare';
|
|
17
|
-
export * from './ArrowRight';
|
|
18
15
|
export * from './Reaction';
|
|
19
|
-
export * from './
|
|
16
|
+
export * from './TopViewBackground';
|
package/src/theme/padding.ts
CHANGED
package/src/translations/en.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"Invite": "Invite",
|
|
6
6
|
"Join": "Join",
|
|
7
7
|
"You": "You",
|
|
8
|
+
"Reconnecting...": "Reconnecting...",
|
|
8
9
|
"Participants ({{ numberOfParticipants }})": "Participants ({{ numberOfParticipants }})",
|
|
9
10
|
"{{ userName }} is sharing their screen": "{{ userName }} is sharing their screen"
|
|
10
11
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const client_1 = require("../mocks/client");
|
|
8
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
9
|
-
const participant_1 = __importDefault(require("../mocks/participant"));
|
|
10
|
-
const TestIds_1 = require("../../src/constants/TestIds");
|
|
11
|
-
const call_1 = require("../mocks/call");
|
|
12
|
-
const RNTLTools_1 = require("../utils/RNTLTools");
|
|
13
|
-
const components_1 = require("../../src/components");
|
|
14
|
-
console.warn = jest.fn();
|
|
15
|
-
jest.useFakeTimers();
|
|
16
|
-
var P_IDS;
|
|
17
|
-
(function (P_IDS) {
|
|
18
|
-
P_IDS["LOCAL_1"] = "local-1";
|
|
19
|
-
P_IDS["REMOTE_1"] = "remote-1";
|
|
20
|
-
P_IDS["REMOTE_2"] = "remote-2";
|
|
21
|
-
})(P_IDS || (P_IDS = {}));
|
|
22
|
-
describe('CallParticipantsBadge', () => {
|
|
23
|
-
it('should render call participants badge component with 1 partic. when the user is alone in the call', async () => {
|
|
24
|
-
const call = (0, call_1.mockCall)((0, client_1.mockClientWithUser)(), [
|
|
25
|
-
(0, participant_1.default)({ isLocalParticipant: true }),
|
|
26
|
-
]);
|
|
27
|
-
(0, RNTLTools_1.render)(<components_1.ParticipantsInfoBadge />, {
|
|
28
|
-
call,
|
|
29
|
-
});
|
|
30
|
-
expect(await RNTLTools_1.screen.findByTestId(TestIds_1.ButtonTestIds.PARTICIPANTS_INFO)).toHaveTextContent('1');
|
|
31
|
-
});
|
|
32
|
-
it('should render call participants info component when the badge is pressed', async () => {
|
|
33
|
-
const call = (0, call_1.mockCall)((0, client_1.mockClientWithUser)(), [
|
|
34
|
-
(0, participant_1.default)({ isLocalParticipant: true }),
|
|
35
|
-
]);
|
|
36
|
-
(0, RNTLTools_1.render)(<components_1.ParticipantsInfoBadge />, {
|
|
37
|
-
call,
|
|
38
|
-
});
|
|
39
|
-
const badge = await RNTLTools_1.screen.findByTestId(TestIds_1.ButtonTestIds.PARTICIPANTS_INFO);
|
|
40
|
-
expect(badge).toHaveTextContent('1');
|
|
41
|
-
RNTLTools_1.fireEvent.press(badge);
|
|
42
|
-
expect(await RNTLTools_1.screen.findByTestId(TestIds_1.ComponentTestIds.PARTICIPANTS_INFO)).toBeVisible();
|
|
43
|
-
});
|
|
44
|
-
it('should render a call participants badge component with 3 participants', async () => {
|
|
45
|
-
const call = (0, call_1.mockCall)((0, client_1.mockClientWithUser)(), [
|
|
46
|
-
(0, participant_1.default)({
|
|
47
|
-
isLocalParticipant: true,
|
|
48
|
-
sessionId: P_IDS.LOCAL_1,
|
|
49
|
-
userId: P_IDS.LOCAL_1,
|
|
50
|
-
}),
|
|
51
|
-
(0, participant_1.default)({
|
|
52
|
-
publishedTracks: [video_client_1.SfuModels.TrackType.AUDIO],
|
|
53
|
-
videoStream: null,
|
|
54
|
-
sessionId: P_IDS.REMOTE_1,
|
|
55
|
-
userId: P_IDS.REMOTE_1,
|
|
56
|
-
}),
|
|
57
|
-
(0, participant_1.default)({
|
|
58
|
-
publishedTracks: [video_client_1.SfuModels.TrackType.VIDEO],
|
|
59
|
-
audioStream: null,
|
|
60
|
-
sessionId: P_IDS.REMOTE_2,
|
|
61
|
-
userId: P_IDS.REMOTE_2,
|
|
62
|
-
}),
|
|
63
|
-
]);
|
|
64
|
-
(0, RNTLTools_1.render)(<components_1.ParticipantsInfoBadge />, {
|
|
65
|
-
call,
|
|
66
|
-
});
|
|
67
|
-
expect(await RNTLTools_1.screen.findByTestId(TestIds_1.ButtonTestIds.PARTICIPANTS_INFO)).toHaveTextContent('3');
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=ParticipantBadge.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParticipantBadge.test.js","sourceRoot":"","sources":["../../../__tests__/components/ParticipantBadge.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,4CAAqD;AACrD,0DAAoD;AACpD,uEAAmD;AACnD,yDAA8E;AAC9E,wCAAyC;AACzC,kDAA+D;AAC/D,qDAA6D;AAE7D,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACzB,IAAI,CAAC,aAAa,EAAE,CAAC;AAErB,IAAK,KAIJ;AAJD,WAAK,KAAK;IACR,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,8BAAqB,CAAA;AACvB,CAAC,EAJI,KAAK,KAAL,KAAK,QAIT;AAED,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,mGAAmG,EAAE,KAAK,IAAI,EAAE;QACjH,MAAM,IAAI,GAAG,IAAA,eAAQ,EAAC,IAAA,2BAAkB,GAAE,EAAE;YAC1C,IAAA,qBAAe,EAAC,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC;SAC9C,CAAC,CAAC;QACH,IAAA,kBAAM,EAAC,CAAC,kCAAqB,CAAC,AAAD,EAAG,EAAE;YAChC,IAAI;SACL,CAAC,CAAC;QAEH,MAAM,CACJ,MAAM,kBAAM,CAAC,YAAY,CAAC,uBAAa,CAAC,iBAAiB,CAAC,CAC3D,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0EAA0E,EAAE,KAAK,IAAI,EAAE;QACxF,MAAM,IAAI,GAAG,IAAA,eAAQ,EAAC,IAAA,2BAAkB,GAAE,EAAE;YAC1C,IAAA,qBAAe,EAAC,EAAE,kBAAkB,EAAE,IAAI,EAAE,C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H,MAAM,CACJ,MAAM,kBAAM,CAAC,YAAY,CAAC,uBAAa,CAAC,iBAAiB,CAAC,CAC3D,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ViewProps } from 'react-native';
|
|
2
|
-
import { HangUpCallButtonProps } from '../utility/internal/HangupCallButton';
|
|
3
|
-
/**
|
|
4
|
-
* The props for the Chat Button in the Call Controls.
|
|
5
|
-
*/
|
|
6
|
-
type ChatButtonProps = {
|
|
7
|
-
/**
|
|
8
|
-
* Handler to be called when the chat button is pressed.
|
|
9
|
-
* @returns void
|
|
10
|
-
*/
|
|
11
|
-
onPressHandler: () => void;
|
|
12
|
-
/**
|
|
13
|
-
* The unread message indicator to be displayed above on the Chat button.
|
|
14
|
-
*/
|
|
15
|
-
unreadBadgeCountIndicator?: number;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Props for the CallControls Component.
|
|
19
|
-
*/
|
|
20
|
-
export interface CallControlsType extends Pick<ViewProps, 'style'> {
|
|
21
|
-
/**
|
|
22
|
-
* Chat Button Props to be passed as an object
|
|
23
|
-
*/
|
|
24
|
-
chatButton?: ChatButtonProps;
|
|
25
|
-
/**
|
|
26
|
-
* Hang up call button props to be passed as an object
|
|
27
|
-
*/
|
|
28
|
-
hangUpCallButton?: HangUpCallButtonProps;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A list/row of controls (mute audio/video, toggle front/back camera, hangup call etc.)
|
|
32
|
-
* the user can trigger within an active call.
|
|
33
|
-
*/
|
|
34
|
-
export declare const CallControls: ({ chatButton, hangUpCallButton, style, }: CallControlsType) => JSX.Element;
|
|
35
|
-
export {};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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 __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.CallControls = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
|
-
const react_native_1 = require("react-native");
|
|
29
|
-
const icons_1 = require("../../icons");
|
|
30
|
-
const CallControlsButton_1 = require("../utility/internal/CallControlsButton");
|
|
31
|
-
const theme_1 = require("../../theme");
|
|
32
|
-
const video_client_1 = require("@stream-io/video-client");
|
|
33
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
34
|
-
const ToggleAudioButton_1 = require("../utility/internal/ToggleAudioButton");
|
|
35
|
-
const ToggleVideoButton_1 = require("../utility/internal/ToggleVideoButton");
|
|
36
|
-
const TestIds_1 = require("../../constants/TestIds");
|
|
37
|
-
const constants_1 = require("../../constants");
|
|
38
|
-
const ToggleCameraFaceButton_1 = require("../utility/internal/ToggleCameraFaceButton");
|
|
39
|
-
const HangupCallButton_1 = require("../utility/internal/HangupCallButton");
|
|
40
|
-
const ReactionsPicker_1 = require("./ReactionsPicker");
|
|
41
|
-
const utils_1 = require("../../utils");
|
|
42
|
-
/**
|
|
43
|
-
* A list/row of controls (mute audio/video, toggle front/back camera, hangup call etc.)
|
|
44
|
-
* the user can trigger within an active call.
|
|
45
|
-
*/
|
|
46
|
-
const CallControls = ({ chatButton, hangUpCallButton, style, }) => {
|
|
47
|
-
const [showReactionsPicker, setShowReactionsPicker] = (0, react_1.useState)(false);
|
|
48
|
-
const [reactionsButtonLayoutRectangle, setReactionsButtonLayoutRectangle] = (0, react_1.useState)();
|
|
49
|
-
// This is for the reaction popup
|
|
50
|
-
const onReactionsButtonLayout = (event) => {
|
|
51
|
-
const layout = event.nativeEvent.layout;
|
|
52
|
-
setReactionsButtonLayoutRectangle((prev) => {
|
|
53
|
-
if (prev &&
|
|
54
|
-
prev.width === layout.width &&
|
|
55
|
-
prev.height === layout.height &&
|
|
56
|
-
prev.x === layout.x &&
|
|
57
|
-
prev.y === layout.y) {
|
|
58
|
-
return prev;
|
|
59
|
-
}
|
|
60
|
-
return layout;
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
return (<react_native_1.View style={[styles.container, style]}>
|
|
64
|
-
<video_react_bindings_1.Restricted requiredGrants={[video_client_1.OwnCapability.CREATE_REACTION]}>
|
|
65
|
-
<CallControlsButton_1.CallControlsButton testID={TestIds_1.ButtonTestIds.REACTION} onPress={() => {
|
|
66
|
-
setShowReactionsPicker(true);
|
|
67
|
-
}} color={theme_1.theme.light.static_white} style={styles.button} onLayout={onReactionsButtonLayout}>
|
|
68
|
-
<icons_1.Reaction color={theme_1.theme.light.static_black}/>
|
|
69
|
-
</CallControlsButton_1.CallControlsButton>
|
|
70
|
-
</video_react_bindings_1.Restricted>
|
|
71
|
-
{chatButton && (<react_native_1.View>
|
|
72
|
-
<CallControlsButton_1.CallControlsButton color={theme_1.theme.light.static_white} onPress={chatButton.onPressHandler} svgContainerStyle={styles.svgContainerStyle} style={styles.button}>
|
|
73
|
-
<UnreadBadgeCountIndicator count={chatButton.unreadBadgeCountIndicator}/>
|
|
74
|
-
<icons_1.Chat color={theme_1.theme.light.static_black}/>
|
|
75
|
-
</CallControlsButton_1.CallControlsButton>
|
|
76
|
-
</react_native_1.View>)}
|
|
77
|
-
<ToggleVideoButton_1.ToggleVideoButton />
|
|
78
|
-
<ToggleAudioButton_1.ToggleAudioButton />
|
|
79
|
-
<ToggleCameraFaceButton_1.ToggleCameraFaceButton />
|
|
80
|
-
<HangupCallButton_1.HangUpCallButton onPressHandler={hangUpCallButton?.onPressHandler}/>
|
|
81
|
-
|
|
82
|
-
{showReactionsPicker && (<ReactionsPicker_1.ReactionsPicker reactions={utils_1.StreamVideoRN.getConfig().supportedReactions} reactionsButtonLayoutRectangle={reactionsButtonLayoutRectangle} onRequestedClose={() => {
|
|
83
|
-
setShowReactionsPicker(false);
|
|
84
|
-
}}/>)}
|
|
85
|
-
</react_native_1.View>);
|
|
86
|
-
};
|
|
87
|
-
exports.CallControls = CallControls;
|
|
88
|
-
const UnreadBadgeCountIndicator = ({ count, }) => {
|
|
89
|
-
// Don't show badge if count is 0 or undefined
|
|
90
|
-
if (!count) {
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
return (<react_native_1.View testID={TestIds_1.ComponentTestIds.CHAT_UNREAD_BADGE_COUNT_INDICATOR} style={styles.chatBadge}>
|
|
94
|
-
<react_native_1.Text style={styles.chatBadgeText}>{count}</react_native_1.Text>
|
|
95
|
-
</react_native_1.View>);
|
|
96
|
-
};
|
|
97
|
-
const styles = react_native_1.StyleSheet.create({
|
|
98
|
-
container: {
|
|
99
|
-
padding: theme_1.theme.padding.sm,
|
|
100
|
-
flexDirection: 'row',
|
|
101
|
-
justifyContent: 'space-between',
|
|
102
|
-
zIndex: constants_1.Z_INDEX.IN_FRONT,
|
|
103
|
-
backgroundColor: theme_1.theme.light.static_black,
|
|
104
|
-
},
|
|
105
|
-
button: {
|
|
106
|
-
// For iOS
|
|
107
|
-
shadowOffset: {
|
|
108
|
-
width: 0,
|
|
109
|
-
height: 6,
|
|
110
|
-
},
|
|
111
|
-
shadowOpacity: 0.37,
|
|
112
|
-
shadowRadius: 7.49,
|
|
113
|
-
// For android
|
|
114
|
-
elevation: 6,
|
|
115
|
-
},
|
|
116
|
-
svgContainerStyle: {
|
|
117
|
-
paddingTop: theme_1.theme.padding.xs,
|
|
118
|
-
},
|
|
119
|
-
chatBadge: {
|
|
120
|
-
backgroundColor: theme_1.theme.light.error,
|
|
121
|
-
borderRadius: theme_1.theme.rounded.xl,
|
|
122
|
-
position: 'absolute',
|
|
123
|
-
left: 15,
|
|
124
|
-
bottom: 20,
|
|
125
|
-
zIndex: constants_1.Z_INDEX.IN_FRONT,
|
|
126
|
-
height: 30,
|
|
127
|
-
width: 30,
|
|
128
|
-
justifyContent: 'center',
|
|
129
|
-
},
|
|
130
|
-
chatBadgeText: {
|
|
131
|
-
color: theme_1.theme.light.static_white,
|
|
132
|
-
textAlign: 'center',
|
|
133
|
-
...theme_1.theme.fonts.bodyBold,
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
//# sourceMappingURL=CallControls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../src/components/call/CallControls.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AACxC,+CAOsB;AACtB,uCAA6C;AAC7C,+EAA4E;AAC5E,uCAAoC;AACpC,0DAAwD;AACxD,0EAA6D;AAC7D,6EAA0E;AAC1E,6EAA0E;AAC1E,qDAA0E;AAC1E,+CAA0C;AAC1C,uFAAoF;AACpF,2EAG8C;AAC9C,uDAAoD;AACpD,uCAA4C;AA+B5C;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,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,KAAK,EAAE,aAAK,CAAC,KAAK,CAAC,YAAY;QAC/B,SAAS,EAAE,QAAQ;QACnB,GAAG,aAAK,CAAC,KAAK,CAAC,QAAQ;KACxB;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PressableProps } from 'react-native';
|
|
2
|
-
export type ParticipantsInfoBadgeProps = Pick<PressableProps, 'style'>;
|
|
3
|
-
/**
|
|
4
|
-
* Badge that shows the number of participants in the call.
|
|
5
|
-
* When pressed, it opens the ParticipantsInfoList.
|
|
6
|
-
* @param style
|
|
7
|
-
*/
|
|
8
|
-
export declare const ParticipantsInfoBadge: ({ style, }: ParticipantsInfoBadgeProps) => JSX.Element;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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 __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.ParticipantsInfoBadge = void 0;
|
|
27
|
-
const react_1 = __importStar(require("react"));
|
|
28
|
-
const react_native_1 = require("react-native");
|
|
29
|
-
const icons_1 = require("../../icons");
|
|
30
|
-
const video_react_bindings_1 = require("@stream-io/video-react-bindings");
|
|
31
|
-
const theme_1 = require("../../theme");
|
|
32
|
-
const TestIds_1 = require("../../constants/TestIds");
|
|
33
|
-
const constants_1 = require("../../constants");
|
|
34
|
-
const ParticipantsInfoList_1 = require("./ParticipantsInfoList");
|
|
35
|
-
/**
|
|
36
|
-
* Badge that shows the number of participants in the call.
|
|
37
|
-
* When pressed, it opens the ParticipantsInfoList.
|
|
38
|
-
* @param style
|
|
39
|
-
*/
|
|
40
|
-
const ParticipantsInfoBadge = ({ style, }) => {
|
|
41
|
-
const { useParticipantCount } = (0, video_react_bindings_1.useCallStateHooks)();
|
|
42
|
-
const participantCount = useParticipantCount();
|
|
43
|
-
const [isCallParticipantsVisible, setIsCallParticipantsVisible] = (0, react_1.useState)(false);
|
|
44
|
-
const onOpenCallParticipantsInfo = (0, react_1.useCallback)(() => {
|
|
45
|
-
setIsCallParticipantsVisible(true);
|
|
46
|
-
}, [setIsCallParticipantsVisible]);
|
|
47
|
-
return (<react_native_1.Pressable onPress={onOpenCallParticipantsInfo} testID={TestIds_1.ButtonTestIds.PARTICIPANTS_INFO} style={style}>
|
|
48
|
-
<react_native_1.View style={styles.badge}>
|
|
49
|
-
<react_native_1.Text style={styles.badgeText}>{participantCount}</react_native_1.Text>
|
|
50
|
-
</react_native_1.View>
|
|
51
|
-
<react_native_1.View style={theme_1.theme.icon.md}>
|
|
52
|
-
<icons_1.Participants color={theme_1.theme.light.static_white}/>
|
|
53
|
-
</react_native_1.View>
|
|
54
|
-
<ParticipantsInfoList_1.ParticipantsInfoList isCallParticipantsInfoVisible={isCallParticipantsVisible} setIsCallParticipantsInfoVisible={setIsCallParticipantsVisible}/>
|
|
55
|
-
</react_native_1.Pressable>);
|
|
56
|
-
};
|
|
57
|
-
exports.ParticipantsInfoBadge = ParticipantsInfoBadge;
|
|
58
|
-
const styles = react_native_1.StyleSheet.create({
|
|
59
|
-
badge: {
|
|
60
|
-
backgroundColor: theme_1.theme.light.text_low_emphasis,
|
|
61
|
-
borderRadius: theme_1.theme.rounded.xl,
|
|
62
|
-
paddingVertical: theme_1.theme.padding.xs,
|
|
63
|
-
paddingHorizontal: theme_1.theme.padding.sm,
|
|
64
|
-
zIndex: constants_1.Z_INDEX.IN_FRONT,
|
|
65
|
-
top: theme_1.theme.spacing.sm,
|
|
66
|
-
left: theme_1.theme.spacing.xl,
|
|
67
|
-
},
|
|
68
|
-
badgeText: {
|
|
69
|
-
color: theme_1.theme.light.static_white,
|
|
70
|
-
textAlign: 'center',
|
|
71
|
-
...theme_1.theme.fonts.caption,
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=ParticipantsInfoBadge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ParticipantsInfoBadge.js","sourceRoot":"","sources":["../../../../src/components/participants/ParticipantsInfoBadge.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,+CAMsB;AACtB,uCAA2C;AAC3C,0EAAoE;AACpE,uCAAoC;AACpC,qDAAwD;AACxD,+CAA0C;AAC1C,iEAA8D;AAI9D;;;;GAIG;AACI,MAAM,qBAAqB,GAAG,CAAC,EACpC,KAAK,GACsB,EAAE,EAAE;IAC/B,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,wCAAiB,GAAE,CAAC;IACpD,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,CAAC,yBAAyB,EAAE,4BAA4B,CAAC,GAC7D,IAAA,gBAAQ,EAAU,KAAK,CAAC,C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,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;QACrB,IAAI,EAAE,aAAK,CAAC,OAAO,CAAC,EAAE;KACvB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,aAAK,CAAC,KAAK,CAAC,YAAY;QAC/B,SAAS,EAAE,QAAQ;QACnB,GAAG,aAAK,CAAC,KAAK,CAAC,OAAO;KACvB;CACF,CAAC,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ParticipantsInfoListProps {
|
|
3
|
-
/**
|
|
4
|
-
* Boolean that decides whether the CallParticipantsInfo modal should be open or not.
|
|
5
|
-
*/
|
|
6
|
-
isCallParticipantsInfoVisible: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* SetState function to set the value of the boolean field `isCallParticipantsVisible` depending upon whether the CallParticipantsInfo modal should be open or not.
|
|
9
|
-
*/
|
|
10
|
-
setIsCallParticipantsInfoVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A component that shows a list of participants in the call and their information.
|
|
14
|
-
* their mute states, video states, screen share states, etc.
|
|
15
|
-
* Mute all participants, invite participants, etc.
|
|
16
|
-
**/
|
|
17
|
-
export declare const ParticipantsInfoList: ({ isCallParticipantsInfoVisible, setIsCallParticipantsInfoVisible, }: ParticipantsInfoListProps) => JSX.Element;
|