@stream-io/video-react-native-sdk 0.0.1-alpha.185 → 0.0.1-alpha.187

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/src/components/ActiveCall.js +14 -29
  3. package/dist/src/components/ActiveCall.js.map +1 -1
  4. package/dist/src/components/CallControlsView.d.ts +4 -3
  5. package/dist/src/components/CallControlsView.js +6 -10
  6. package/dist/src/components/CallControlsView.js.map +1 -1
  7. package/dist/src/components/CallParticipantsBadge.d.ts +4 -1
  8. package/dist/src/components/CallParticipantsBadge.js +11 -13
  9. package/dist/src/components/CallParticipantsBadge.js.map +1 -1
  10. package/dist/src/components/CallParticipantsInfoView.js +64 -30
  11. package/dist/src/components/CallParticipantsInfoView.js.map +1 -1
  12. package/dist/src/components/CallParticipantsOptions.d.ts +3 -3
  13. package/dist/src/components/CallParticipantsOptions.js +94 -65
  14. package/dist/src/components/CallParticipantsOptions.js.map +1 -1
  15. package/dist/src/components/CallParticipantsView.js +1 -1
  16. package/dist/src/components/CallParticipantsView.js.map +1 -1
  17. package/dist/src/components/LobbyView.js +0 -1
  18. package/dist/src/components/LobbyView.js.map +1 -1
  19. package/dist/src/components/LocalVideoView.js +19 -6
  20. package/dist/src/components/LocalVideoView.js.map +1 -1
  21. package/dist/src/components/OutgoingCallView.js +3 -3
  22. package/dist/src/components/OutgoingCallView.js.map +1 -1
  23. package/dist/src/components/ParticipantView.js +7 -4
  24. package/dist/src/components/ParticipantView.js.map +1 -1
  25. package/dist/src/constants/index.d.ts +5 -0
  26. package/dist/src/constants/index.js +6 -1
  27. package/dist/src/constants/index.js.map +1 -1
  28. package/dist/src/icons/Cross.d.ts +3 -2
  29. package/dist/src/icons/Cross.js +5 -1
  30. package/dist/src/icons/Cross.js.map +1 -1
  31. package/dist/src/icons/index.d.ts +0 -1
  32. package/dist/src/icons/index.js +0 -1
  33. package/dist/src/icons/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/src/components/ActiveCall.tsx +18 -34
  36. package/src/components/CallControlsView.tsx +12 -13
  37. package/src/components/CallParticipantsBadge.tsx +13 -14
  38. package/src/components/CallParticipantsInfoView.tsx +73 -36
  39. package/src/components/CallParticipantsOptions.tsx +111 -94
  40. package/src/components/CallParticipantsView.tsx +1 -1
  41. package/src/components/LobbyView.tsx +0 -1
  42. package/src/components/LocalVideoView.tsx +22 -6
  43. package/src/components/OutgoingCallView.tsx +3 -3
  44. package/src/components/ParticipantView.tsx +9 -4
  45. package/src/constants/index.ts +6 -0
  46. package/src/icons/Cross.tsx +5 -4
  47. package/src/icons/index.tsx +0 -1
  48. package/dist/src/icons/VideoOff.d.ts +0 -5
  49. package/dist/src/icons/VideoOff.js +0 -10
  50. package/dist/src/icons/VideoOff.js.map +0 -1
  51. package/src/icons/VideoOff.tsx +0 -20
@@ -1,5 +1,6 @@
1
+ import { SvgProps } from 'react-native-svg';
1
2
  type Props = {
2
3
  color: string;
3
- };
4
- export declare const Cross: ({ color }: Props) => JSX.Element;
4
+ } & Pick<SvgProps, 'style'>;
5
+ export declare const Cross: ({ color, style }: Props) => JSX.Element;
5
6
  export {};
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.Cross = void 0;
7
+ const react_1 = __importDefault(require("react"));
4
8
  const react_native_svg_1 = require("react-native-svg");
5
- const Cross = ({ color }) => (<react_native_svg_1.Svg viewBox="0 0 12 13">
9
+ const Cross = ({ color, style }) => (<react_native_svg_1.Svg viewBox="0 0 12 13" style={style}>
6
10
  <react_native_svg_1.Path d="M 0.322153 11.8408 C 0.700083 12.2188 1.34168 12.21 1.71083 11.8408 L 5.99989 7.56055 L 10.2802 11.8408 C 10.6493 12.21 11.2909 12.2188 11.6688 11.8408 C 12.0468 11.4629 12.038 10.8213 11.6688 10.4521 L 7.38856 6.16309 L 11.6688 1.88281 C 12.038 1.51367 12.0468 0.87207 11.6688 0.494141 C 11.2909 0.116211 10.6493 0.125 10.2802 0.494141 L 5.99989 4.77441 L 1.71083 0.485352 C 1.34168 0.125 0.700083 0.116211 0.322153 0.494141 C -0.0557764 0.87207 -0.0469874 1.51367 0.322153 1.88281 L 4.60243 6.16309 L 0.322153 10.4521 C -0.0469874 10.8213 -0.0557764 11.4629 0.322153 11.8408 Z" fill={color}/>
7
11
  </react_native_svg_1.Svg>);
8
12
  exports.Cross = Cross;
@@ -1 +1 @@
1
- {"version":3,"file":"Cross.js","sourceRoot":"","sources":["../../../src/icons/Cross.tsx"],"names":[],"mappings":";;;AAAA,uDAA6C;AAMtC,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAS,EAAE,EAAE,CAAC,CACzC,CAAC,sBAAG,CAAC,OAAO,CAAC,WAAW,CACtB;IAAA,CAAC,uBAAI,CACH,CAAC,CAAC,okBAAokB,CACtkB,IAAI,CAAC,CAAC,KAAK,CAAC,EAEhB;EAAA,EAAE,sBAAG,CAAC,CACP,CAAC;AAPW,QAAA,KAAK,SAOhB"}
1
+ {"version":3,"file":"Cross.js","sourceRoot":"","sources":["../../../src/icons/Cross.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,uDAAuD;AAMhD,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAS,EAAE,EAAE,CAAC,CAChD,CAAC,sBAAG,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACpC;IAAA,CAAC,uBAAI,CACH,CAAC,CAAC,okBAAokB,CACtkB,IAAI,CAAC,CAAC,KAAK,CAAC,EAEhB;EAAA,EAAE,sBAAG,CAAC,CACP,CAAC;AAPW,QAAA,KAAK,SAOhB"}
@@ -11,7 +11,6 @@ export * from './Participants';
11
11
  export * from './ThreeDots';
12
12
  export * from './Pin';
13
13
  export * from './Spotlight';
14
- export * from './VideoOff';
15
14
  export * from './Cross';
16
15
  export * from './ScreenShare';
17
16
  export * from './ArrowRight';
@@ -27,7 +27,6 @@ __exportStar(require("./Participants"), exports);
27
27
  __exportStar(require("./ThreeDots"), exports);
28
28
  __exportStar(require("./Pin"), exports);
29
29
  __exportStar(require("./Spotlight"), exports);
30
- __exportStar(require("./VideoOff"), exports);
31
30
  __exportStar(require("./Cross"), exports);
32
31
  __exportStar(require("./ScreenShare"), exports);
33
32
  __exportStar(require("./ArrowRight"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icons/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wCAAsB;AACtB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,yCAAuB;AACvB,iDAA+B;AAC/B,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/icons/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,wCAAsB;AACtB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B;AAC3B,0CAAwB;AACxB,+CAA6B;AAC7B,yCAAuB;AACvB,iDAA+B;AAC/B,8CAA4B;AAC5B,wCAAsB;AACtB,8CAA4B;AAC5B,0CAAwB;AACxB,gDAA8B;AAC9B,+CAA6B;AAC7B,6CAA2B;AAC3B,kDAAgC"}
package/package.json CHANGED
@@ -83,5 +83,5 @@
83
83
  "typedoc-plugin-markdown": "^3.15.3",
84
84
  "typescript": "^4.9.5"
85
85
  },
86
- "version": "0.0.1-alpha.185"
86
+ "version": "0.0.1-alpha.187"
87
87
  }
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useRef, useState } from 'react';
1
+ import React, { useEffect, useRef } from 'react';
2
2
  import {
3
3
  useCall,
4
4
  useHasOngoingScreenShare,
@@ -14,6 +14,7 @@ import { usePermissionRequest } from '../hooks/usePermissionRequest';
14
14
  import { CallParticipantsBadge } from './CallParticipantsBadge';
15
15
  import { verifyAndroidBluetoothPermissions } from '../utils/verifyAndroidBluetoothPermissions';
16
16
  import { CallingState } from '@stream-io/video-client';
17
+ import { Z_INDEX } from '../constants';
17
18
 
18
19
  /**
19
20
  * Props to be passed for the ActiveCall component.
@@ -56,7 +57,6 @@ export const ActiveCall = (props: ActiveCallProps) => {
56
57
  };
57
58
 
58
59
  const InnerActiveCall = (props: ActiveCallProps) => {
59
- const [height, setHeight] = useState(0);
60
60
  const { mode = 'grid', chatButton } = props;
61
61
  const hasScreenShare = useHasOngoingScreenShare();
62
62
 
@@ -64,38 +64,22 @@ const InnerActiveCall = (props: ActiveCallProps) => {
64
64
  usePublishMediaStreams();
65
65
  usePermissionRequest();
66
66
 
67
- const onLayout: React.ComponentProps<typeof View>['onLayout'] = (event) => {
68
- setHeight(
69
- // we're saving the CallControlsView height and subtracting an amount of padding.
70
- // this is done to get the CallParticipants(Screen)View neatly underneath the
71
- // rounded corners of the CallControlsView.
72
- Math.trunc(event.nativeEvent.layout.height - theme.spacing.lg * 2),
73
- );
74
- };
75
-
76
67
  const showSpotLightModeView = mode === 'spotlight' || hasScreenShare;
77
68
 
78
69
  return (
79
70
  <View style={styles.container}>
80
- <View style={styles.iconGroup}>
81
- <CallParticipantsBadge />
82
- </View>
83
-
84
- <View
85
- style={[
86
- styles.callParticipantsWrapper,
87
- { paddingBottom: height + theme.padding.lg },
88
- ]}
89
- >
71
+ <CallParticipantsBadge style={styles.iconGroup} />
72
+ <View style={[styles.callParticipantsWrapper]}>
90
73
  {showSpotLightModeView ? (
91
74
  <CallParticipantsSpotlightView />
92
75
  ) : (
93
76
  <CallParticipantsView />
94
77
  )}
95
78
  </View>
96
- <View onLayout={onLayout} style={styles.callControlsWrapper}>
97
- <CallControlsView chatButton={chatButton} />
98
- </View>
79
+ <CallControlsView
80
+ style={styles.callControlsWrapper}
81
+ chatButton={chatButton}
82
+ />
99
83
  </View>
100
84
  );
101
85
  };
@@ -106,17 +90,17 @@ const styles = StyleSheet.create({
106
90
  backgroundColor: theme.light.static_grey,
107
91
  },
108
92
  callParticipantsWrapper: { flex: 1 },
109
- callControlsWrapper: { position: 'absolute', bottom: 0, left: 0, right: 0 },
110
- svgContainerStyle: {
111
- zIndex: 2,
112
- marginRight: theme.margin.md,
113
- marginTop: theme.margin.sm,
93
+ callControlsWrapper: {
94
+ position: 'absolute',
95
+ bottom: 0,
96
+ left: 0,
97
+ right: 0,
98
+ padding: theme.padding.md,
114
99
  },
115
100
  iconGroup: {
116
- display: 'flex',
117
- flexDirection: 'row',
118
- alignSelf: 'flex-end',
119
- alignItems: 'center',
120
- marginRight: theme.margin.md,
101
+ position: 'absolute',
102
+ top: theme.padding.md,
103
+ right: theme.padding.sm,
104
+ zIndex: Z_INDEX.IN_FRONT,
121
105
  },
122
106
  });
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useState } from 'react';
2
- import { StyleSheet, Text, View } from 'react-native';
2
+ import { StyleSheet, Text, View, ViewProps } from 'react-native';
3
3
  import { useCallControls } from '../hooks/useCallControls';
4
4
  import { CameraSwitch, Chat, PhoneDown, Reaction } from '../icons';
5
5
  import { CallControlsButton } from './CallControlsButton';
@@ -14,15 +14,16 @@ import { ReactionModal } from './ReactionsModal';
14
14
  import { ToggleAudioButton } from './ToggleAudioButton';
15
15
  import { ToggleVideoButton } from './ToggleVideoButton';
16
16
  import { A11yButtons } from '../constants/A11yLabels';
17
+ import { Z_INDEX } from '../constants';
17
18
 
18
19
  type ChatButtonType = {
19
20
  onPressHandler: () => void;
20
21
  unreadBadgeCountIndicator?: number;
21
22
  };
22
23
 
23
- export type CallControlsViewType = {
24
+ export interface CallControlsViewType extends Pick<ViewProps, 'style'> {
24
25
  chatButton?: ChatButtonType;
25
- };
26
+ }
26
27
 
27
28
  /**
28
29
  * Shows a list/row of controls (mute audio/video, toggle front/back camera, hangup call etc.)
@@ -32,7 +33,10 @@ export type CallControlsViewType = {
32
33
  * | :--- |
33
34
  * | ![call-controls-view](https://user-images.githubusercontent.com/25864161/217349666-af0f3278-393e-449d-b30e-2d1b196abe5e.png) |
34
35
  */
35
- export const CallControlsView = ({ chatButton }: CallControlsViewType) => {
36
+ export const CallControlsView = ({
37
+ chatButton,
38
+ style,
39
+ }: CallControlsViewType) => {
36
40
  const [isReactionModalActive, setIsReactionModalActive] =
37
41
  useState<boolean>(false);
38
42
 
@@ -61,7 +65,7 @@ export const CallControlsView = ({ chatButton }: CallControlsViewType) => {
61
65
  }, [setIsReactionModalActive]);
62
66
 
63
67
  return (
64
- <View style={styles.container}>
68
+ <View style={[styles.container, style]}>
65
69
  <Restricted requiredGrants={[OwnCapability.CREATE_REACTION]}>
66
70
  <CallControlsButton
67
71
  onPress={onOpenReactionsModalHandler}
@@ -139,13 +143,8 @@ const UnreadBadeCountIndicator = ({
139
143
  const styles = StyleSheet.create({
140
144
  container: {
141
145
  flexDirection: 'row',
142
- justifyContent: 'space-evenly',
143
- paddingVertical: theme.padding.lg,
144
- paddingHorizontal: theme.padding.md,
145
- borderTopLeftRadius: theme.rounded.lg,
146
- borderTopRightRadius: theme.rounded.lg,
147
- backgroundColor: theme.light.controls_bg,
148
- zIndex: 2,
146
+ justifyContent: 'space-between',
147
+ zIndex: Z_INDEX.IN_FRONT,
149
148
  },
150
149
  button: {
151
150
  // For iOS
@@ -168,7 +167,7 @@ const styles = StyleSheet.create({
168
167
  position: 'absolute',
169
168
  left: 15,
170
169
  bottom: 20,
171
- zIndex: 2,
170
+ zIndex: Z_INDEX.IN_FRONT,
172
171
  height: 30,
173
172
  width: 30,
174
173
  justifyContent: 'center',
@@ -1,12 +1,14 @@
1
1
  import React, { useCallback, useState } from 'react';
2
- import { Pressable, StyleSheet, Text, View } from 'react-native';
2
+ import { Pressable, StyleSheet, Text, View, ViewProps } from 'react-native';
3
3
  import { Participants } from '../icons';
4
4
  import { useParticipantCount } from '@stream-io/video-react-bindings';
5
5
  import { theme } from '../theme';
6
6
  import { CallParticipantsInfoView } from './CallParticipantsInfoView';
7
7
  import { A11yButtons } from '../constants/A11yLabels';
8
+ import { Z_INDEX } from '../constants';
8
9
 
9
- export const CallParticipantsBadge = () => {
10
+ export interface ICallParticipantsBadge extends Pick<ViewProps, 'style'> {}
11
+ export const CallParticipantsBadge = ({ style }: ICallParticipantsBadge) => {
10
12
  const participantCount = useParticipantCount();
11
13
  const [isCallParticipantsViewVisible, setIsCallParticipantsViewVisible] =
12
14
  useState<boolean>(false);
@@ -17,14 +19,14 @@ export const CallParticipantsBadge = () => {
17
19
 
18
20
  return (
19
21
  <Pressable
20
- style={styles.participantIcon}
21
22
  onPress={onOpenCallParticipantsInfoView}
22
23
  accessibilityLabel={A11yButtons.PARTICIPANTS_INFO}
24
+ style={[styles.container, style]}
23
25
  >
24
26
  <View style={styles.badge}>
25
27
  <Text style={styles.badgeText}>{participantCount}</Text>
26
28
  </View>
27
- <View style={[styles.svgContainerStyle, theme.icon.md]}>
29
+ <View style={theme.icon.md}>
28
30
  <Participants color={theme.light.static_white} />
29
31
  </View>
30
32
  <CallParticipantsInfoView
@@ -36,22 +38,19 @@ export const CallParticipantsBadge = () => {
36
38
  };
37
39
 
38
40
  const styles = StyleSheet.create({
39
- participantIcon: {
40
- zIndex: 2,
41
- },
42
- svgContainerStyle: {},
41
+ container: { padding: theme.padding.sm },
43
42
  badge: {
44
43
  backgroundColor: theme.light.text_low_emphasis,
45
44
  borderRadius: theme.rounded.xl,
46
- padding: theme.padding.xs,
47
- position: 'relative',
48
- left: theme.spacing.lg,
49
- top: theme.spacing.lg,
50
- zIndex: 2,
45
+ paddingVertical: theme.padding.xs,
46
+ paddingHorizontal: theme.padding.sm,
47
+ position: 'absolute',
48
+ right: 0,
49
+ top: -theme.spacing.sm,
50
+ zIndex: Z_INDEX.IN_FRONT,
51
51
  },
52
52
  badgeText: {
53
53
  color: theme.light.static_white,
54
- textAlign: 'center',
55
54
  ...theme.fonts.caption,
56
55
  },
57
56
  });
@@ -15,6 +15,7 @@ import {
15
15
  FlatList,
16
16
  Modal,
17
17
  Pressable,
18
+ Share,
18
19
  StyleSheet,
19
20
  Text,
20
21
  View,
@@ -26,6 +27,8 @@ import { CallParticipantOptions } from './CallParticipantsOptions';
26
27
  import { Avatar } from './Avatar';
27
28
  import { theme } from '../theme';
28
29
  import { A11yButtons } from '../constants/A11yLabels';
30
+ import { Z_INDEX } from '../constants';
31
+ import { palette } from '../theme/constants';
29
32
 
30
33
  type CallParticipantInfoViewType = {
31
34
  participant: StreamVideoParticipant;
@@ -83,17 +86,17 @@ const CallParticipantInfoItem = (props: CallParticipantInfoViewType) => {
83
86
  <View style={styles.icons}>
84
87
  {isScreenSharing && (
85
88
  <View style={[styles.svgContainerStyle, theme.icon.md]}>
86
- <ScreenShare color={theme.light.info} />
89
+ <ScreenShare color={theme.dark.info} />
87
90
  </View>
88
91
  )}
89
92
  {isAudioMuted && (
90
93
  <View style={[styles.svgContainerStyle, theme.icon.sm]}>
91
- <MicOff color={theme.light.error} />
94
+ <MicOff color={theme.dark.error} />
92
95
  </View>
93
96
  )}
94
97
  {isVideoMuted && (
95
98
  <View style={[styles.svgContainerStyle, theme.icon.sm]}>
96
- <VideoSlash color={theme.light.error} />
99
+ <VideoSlash color={theme.dark.error} />
97
100
  </View>
98
101
  )}
99
102
  {!participantIsLocalParticipant && (
@@ -105,7 +108,7 @@ const CallParticipantInfoItem = (props: CallParticipantInfoViewType) => {
105
108
  ]}
106
109
  >
107
110
  <View style={[styles.svgContainerStyle, theme.icon.sm]}>
108
- <ArrowRight color={theme.light.text_high_emphasis} />
111
+ <ArrowRight color={theme.dark.text_high_emphasis} />
109
112
  </View>
110
113
  </Restricted>
111
114
  )}
@@ -145,6 +148,17 @@ export const CallParticipantsInfoView = ({
145
148
  StreamVideoParticipant | undefined
146
149
  >(undefined);
147
150
  const call = useCall();
151
+ const inviteHandler = async () => {
152
+ try {
153
+ await Share.share({
154
+ url: `https://stream-calls-dogfood.vercel.app/join/${call?.id}`,
155
+ title: 'Stream Calls | Join Call',
156
+ message: `Join me on the call using this link https://stream-calls-dogfood.vercel.app/join/${call?.id}`,
157
+ });
158
+ } catch (error: any) {
159
+ console.log(error.message);
160
+ }
161
+ };
148
162
 
149
163
  const muteAllParticipantsHandler = async () => {
150
164
  try {
@@ -174,12 +188,15 @@ export const CallParticipantsInfoView = ({
174
188
 
175
189
  return (
176
190
  <Modal
177
- animationType="slide"
178
- transparent={true}
191
+ animationType="fade"
192
+ transparent
179
193
  visible={isCallParticipantsViewVisible}
180
194
  onRequestClose={onCloseCallParticipantsViewVisible}
181
195
  >
182
- <View style={styles.container}>
196
+ <>
197
+ {/*independent background, needed due to desired opacity only
198
+ on background, exc. modal content*/}
199
+ <View style={styles.backDropBackground} />
183
200
  <View style={styles.content}>
184
201
  <View style={styles.header}>
185
202
  <View style={styles.leftHeaderElement} />
@@ -187,14 +204,18 @@ export const CallParticipantsInfoView = ({
187
204
  Participants ({participants.length})
188
205
  </Text>
189
206
  <Pressable
190
- style={[styles.closeIcon, theme.icon.sm]}
191
207
  onPress={onCloseCallParticipantsViewVisible}
192
208
  accessibilityLabel={A11yButtons.EXIT_PARTICIPANTS_INFO}
209
+ style={styles.closePressable}
193
210
  >
194
- <Cross color={theme.light.primary} />
211
+ <Cross color={theme.dark.primary} style={theme.icon.xs} />
195
212
  </Pressable>
196
213
  </View>
214
+ <FlatList data={participants} renderItem={renderItem} />
197
215
  <View style={styles.buttonGroup}>
216
+ <Pressable style={styles.button} onPress={inviteHandler}>
217
+ <Text style={styles.buttonText}>Invite</Text>
218
+ </Pressable>
198
219
  <Restricted requiredGrants={[OwnCapability.MUTE_USERS]}>
199
220
  <Pressable
200
221
  style={styles.button}
@@ -204,61 +225,77 @@ export const CallParticipantsInfoView = ({
204
225
  </Pressable>
205
226
  </Restricted>
206
227
  </View>
207
- <FlatList data={participants} renderItem={renderItem} />
208
- {selectedParticipant && (
209
- <View style={[StyleSheet.absoluteFill, styles.modal]}>
210
- <CallParticipantOptions
211
- participant={selectedParticipant}
212
- setSelectedParticipant={setSelectedParticipant}
213
- />
214
- </View>
215
- )}
216
228
  </View>
217
- </View>
229
+ <Modal
230
+ animationType="fade"
231
+ transparent
232
+ visible={!!selectedParticipant}
233
+ onRequestClose={() => setSelectedParticipant(undefined)}
234
+ >
235
+ <>
236
+ {/*independent background, needed due to desired opacity only
237
+ on background, exc. modal content*/}
238
+ <View style={styles.backDropBackground} />
239
+ <CallParticipantOptions
240
+ participant={selectedParticipant}
241
+ setSelectedParticipant={setSelectedParticipant}
242
+ />
243
+ </>
244
+ </Modal>
245
+ </>
218
246
  </Modal>
219
247
  );
220
248
  };
221
249
 
222
250
  const styles = StyleSheet.create({
223
- container: {
224
- flex: 1,
225
- justifyContent: 'center',
251
+ backDropBackground: {
252
+ opacity: 0.75,
253
+ ...StyleSheet.absoluteFillObject,
254
+ backgroundColor: theme.dark.static_white,
255
+ zIndex: Z_INDEX.IN_BACK,
226
256
  },
227
257
  content: {
228
- flex: 1,
229
- backgroundColor: theme.light.bars,
258
+ zIndex: Z_INDEX.IN_FRONT,
259
+ backgroundColor: theme.dark.bars,
230
260
  borderRadius: theme.rounded.md,
231
261
  marginVertical: theme.margin.lg,
232
262
  marginHorizontal: theme.margin.md,
233
263
  },
234
264
  header: {
235
- display: 'flex',
236
265
  flexDirection: 'row',
237
266
  justifyContent: 'space-between',
238
267
  alignItems: 'center',
239
268
  paddingVertical: theme.padding.md,
240
- width: '100%',
241
269
  },
242
270
  leftHeaderElement: {
243
271
  marginLeft: theme.margin.md,
244
272
  },
245
273
  headerText: {
246
274
  ...theme.fonts.bodyBold,
247
- color: theme.light.text_high_emphasis,
275
+ color: theme.dark.text_high_emphasis,
248
276
  },
249
- closeIcon: {
277
+ closePressable: {
278
+ padding: theme.padding.sm,
279
+ borderRadius: theme.rounded.xs,
250
280
  marginRight: theme.margin.md,
281
+ backgroundColor: palette.grey800,
282
+ },
283
+ buttonGroup: {
284
+ flexDirection: 'row',
285
+ justifyContent: 'space-between',
286
+ paddingVertical: theme.padding.md,
287
+ paddingHorizontal: theme.padding.xs,
251
288
  },
252
- buttonGroup: {},
253
289
  button: {
254
- backgroundColor: theme.light.primary,
290
+ flex: 1,
291
+ backgroundColor: theme.dark.primary,
255
292
  borderRadius: theme.rounded.lg,
256
- padding: theme.padding.md,
257
- margin: theme.margin.lg,
293
+ padding: theme.padding.sm,
294
+ marginHorizontal: theme.margin.sm,
258
295
  },
259
296
  buttonText: {
260
297
  textAlign: 'center',
261
- color: theme.light.static_white,
298
+ color: theme.dark.static_white,
262
299
  ...theme.fonts.subtitleBold,
263
300
  },
264
301
  participant: {
@@ -267,12 +304,12 @@ const styles = StyleSheet.create({
267
304
  display: 'flex',
268
305
  flexDirection: 'row',
269
306
  alignItems: 'center',
270
- borderBottomColor: theme.light.borders,
307
+ borderBottomColor: theme.dark.borders,
271
308
  borderBottomWidth: 1,
272
309
  },
273
310
  name: {
274
311
  marginLeft: theme.margin.sm,
275
- color: theme.light.text_high_emphasis,
312
+ color: theme.dark.text_high_emphasis,
276
313
  ...theme.fonts.subtitleBold,
277
314
  },
278
315
  icons: {
@@ -287,6 +324,6 @@ const styles = StyleSheet.create({
287
324
  modal: {
288
325
  alignItems: 'center',
289
326
  justifyContent: 'center',
290
- backgroundColor: theme.light.overlay,
327
+ backgroundColor: theme.dark.overlay,
291
328
  },
292
329
  });