@stream-io/video-react-native-sdk 0.3.15 → 0.3.17

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 (70) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js +2 -0
  3. package/dist/commonjs/components/Call/CallControls/HangupCallButton.js.map +1 -1
  4. package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js +6 -2
  5. package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
  6. package/dist/commonjs/components/Call/CallControls/ScreenShareButton.js +9 -2
  7. package/dist/commonjs/components/Call/CallControls/ScreenShareButton.js.map +1 -1
  8. package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js +8 -2
  9. package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
  10. package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js +7 -1
  11. package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
  12. package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js +7 -1
  13. package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
  14. package/dist/commonjs/components/Call/Lobby/Lobby.js +7 -4
  15. package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
  16. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +7 -1
  17. package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
  18. package/dist/commonjs/translations/en.json +3 -0
  19. package/dist/commonjs/utils/push/ios.js +1 -1
  20. package/dist/commonjs/utils/push/ios.js.map +1 -1
  21. package/dist/commonjs/version.js +1 -1
  22. package/dist/module/components/Call/CallControls/HangupCallButton.js +2 -0
  23. package/dist/module/components/Call/CallControls/HangupCallButton.js.map +1 -1
  24. package/dist/module/components/Call/CallControls/OutgoingCallControls.js +6 -2
  25. package/dist/module/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
  26. package/dist/module/components/Call/CallControls/ScreenShareButton.js +9 -2
  27. package/dist/module/components/Call/CallControls/ScreenShareButton.js.map +1 -1
  28. package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js +8 -2
  29. package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
  30. package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js +7 -1
  31. package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
  32. package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js +7 -1
  33. package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
  34. package/dist/module/components/Call/Lobby/Lobby.js +7 -4
  35. package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
  36. package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +7 -1
  37. package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
  38. package/dist/module/translations/en.json +3 -0
  39. package/dist/module/utils/push/ios.js +1 -1
  40. package/dist/module/utils/push/ios.js.map +1 -1
  41. package/dist/module/version.js +1 -1
  42. package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts +6 -1
  43. package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
  44. package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
  45. package/dist/typescript/components/Call/CallControls/ScreenShareButton.d.ts +1 -1
  46. package/dist/typescript/components/Call/CallControls/ScreenShareButton.d.ts.map +1 -1
  47. package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts +1 -1
  48. package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts.map +1 -1
  49. package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts +1 -1
  50. package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts.map +1 -1
  51. package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts +1 -1
  52. package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts.map +1 -1
  53. package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
  54. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts +1 -1
  55. package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts.map +1 -1
  56. package/dist/typescript/translations/index.d.ts +3 -0
  57. package/dist/typescript/translations/index.d.ts.map +1 -1
  58. package/dist/typescript/version.d.ts +1 -1
  59. package/package.json +1 -1
  60. package/src/components/Call/CallControls/HangupCallButton.tsx +6 -0
  61. package/src/components/Call/CallControls/OutgoingCallControls.tsx +8 -2
  62. package/src/components/Call/CallControls/ScreenShareButton.tsx +10 -2
  63. package/src/components/Call/CallControls/ToggleCameraFaceButton.tsx +10 -2
  64. package/src/components/Call/CallControls/ToggleVideoPreviewButton.tsx +7 -1
  65. package/src/components/Call/CallControls/ToggleVideoPublishingButton.tsx +7 -1
  66. package/src/components/Call/Lobby/Lobby.tsx +32 -26
  67. package/src/components/Livestream/LivestreamControls/LivestreamVideoControlButton.tsx +7 -1
  68. package/src/translations/en.json +3 -0
  69. package/src/utils/push/ios.ts +1 -1
  70. package/src/version.ts +1 -1
@@ -29,7 +29,9 @@ export const ToggleVideoPreviewButton = ({
29
29
  },
30
30
  } = useTheme();
31
31
  const call = useCall();
32
- const { useCameraState } = useCallStateHooks();
32
+ const { useCameraState, useCallSettings } = useCallStateHooks();
33
+ const callSettings = useCallSettings();
34
+ const isVideoEnabledInCall = callSettings?.video.enabled;
33
35
  const { status } = useCameraState();
34
36
  const onPress = async () => {
35
37
  if (onPressHandler) {
@@ -39,6 +41,10 @@ export const ToggleVideoPreviewButton = ({
39
41
  await call?.camera.toggle();
40
42
  };
41
43
 
44
+ if (!isVideoEnabledInCall) {
45
+ return;
46
+ }
47
+
42
48
  return (
43
49
  <CallControlsButton
44
50
  onPress={onPress}
@@ -27,8 +27,10 @@ export const ToggleVideoPublishingButton = ({
27
27
  onPressHandler,
28
28
  }: ToggleVideoPublishingButtonProps) => {
29
29
  const call = useCall();
30
- const { useCameraState } = useCallStateHooks();
30
+ const { useCameraState, useCallSettings } = useCallStateHooks();
31
31
  const { status } = useCameraState();
32
+ const callSettings = useCallSettings();
33
+ const isVideoEnabledInCall = callSettings?.video.enabled;
32
34
  const {
33
35
  theme: { colors },
34
36
  } = useTheme();
@@ -40,6 +42,10 @@ export const ToggleVideoPublishingButton = ({
40
42
  await call?.camera.toggle();
41
43
  };
42
44
 
45
+ if (!isVideoEnabledInCall) {
46
+ return;
47
+ }
48
+
43
49
  return (
44
50
  <Restricted requiredGrants={[OwnCapability.SEND_VIDEO]}>
45
51
  <CallControlsButton
@@ -64,7 +64,9 @@ export const Lobby = ({
64
64
  theme: { colors, lobby, typefaces },
65
65
  } = useTheme();
66
66
  const connectedUser = useConnectedUser();
67
- const { useCameraState } = useCallStateHooks();
67
+ const { useCameraState, useCallSettings } = useCallStateHooks();
68
+ const callSettings = useCallSettings();
69
+ const isVideoEnabledInCall = callSettings?.video.enabled;
68
70
  const { status: cameraStatus, mediaStream } = useCameraState();
69
71
  const { t } = useI18n();
70
72
  const localVideoStream = mediaStream as unknown as MediaStream | undefined;
@@ -109,30 +111,34 @@ export const Lobby = ({
109
111
  typefaces.subtitle,
110
112
  ]}
111
113
  >
112
- {t('Setup your audio and video')}
114
+ {isVideoEnabledInCall
115
+ ? t('Setup your audio and video')
116
+ : t('Setup your audio')}
113
117
  </Text>
114
- <View
115
- style={[
116
- styles.videoContainer,
117
- { backgroundColor: colors.disabled },
118
- lobby.videoContainer,
119
- ]}
120
- >
121
- <View style={styles.topView} />
122
- {cameraStatus === 'enabled' && localVideoStream ? (
123
- <RTCView
124
- mirror={true}
125
- streamURL={localVideoStream.toURL()}
126
- objectFit="cover"
127
- style={StyleSheet.absoluteFillObject}
128
- />
129
- ) : (
130
- <View style={[styles.avatarContainer, lobby.avatarContainer]}>
131
- <Avatar participant={connectedUserAsParticipant} />
132
- </View>
133
- )}
134
- <ParticipantStatus />
135
- </View>
118
+ {isVideoEnabledInCall && (
119
+ <View
120
+ style={[
121
+ styles.videoContainer,
122
+ { backgroundColor: colors.disabled },
123
+ lobby.videoContainer,
124
+ ]}
125
+ >
126
+ <View style={styles.topView} />
127
+ {cameraStatus === 'enabled' && localVideoStream ? (
128
+ <RTCView
129
+ mirror={true}
130
+ streamURL={localVideoStream.toURL()}
131
+ objectFit="cover"
132
+ style={StyleSheet.absoluteFillObject}
133
+ />
134
+ ) : (
135
+ <View style={[styles.avatarContainer, lobby.avatarContainer]}>
136
+ <Avatar participant={connectedUserAsParticipant} />
137
+ </View>
138
+ )}
139
+ <ParticipantStatus />
140
+ </View>
141
+ )}
136
142
  </View>
137
143
  )}
138
144
  <View style={[styles.bottomContainer, lobby.bottomContainer]}>
@@ -203,7 +209,7 @@ const ParticipantStatus = () => {
203
209
  const styles = StyleSheet.create({
204
210
  container: {
205
211
  flex: 1,
206
- justifyContent: 'center',
212
+ justifyContent: 'space-evenly',
207
213
  },
208
214
  topContainer: {
209
215
  flex: 2,
@@ -226,7 +232,7 @@ const styles = StyleSheet.create({
226
232
  },
227
233
  topView: {},
228
234
  bottomContainer: {
229
- flex: 1,
235
+ flex: 2,
230
236
  justifyContent: 'space-evenly',
231
237
  paddingHorizontal: 12,
232
238
  },
@@ -9,8 +9,10 @@ import { Video, VideoSlash } from '../../../icons';
9
9
  */
10
10
  export const LivestreamVideoControlButton = () => {
11
11
  const call = useCall();
12
- const { useCameraState } = useCallStateHooks();
12
+ const { useCameraState, useCallSettings } = useCallStateHooks();
13
13
  const { status } = useCameraState();
14
+ const callSettings = useCallSettings();
15
+ const isVideoEnabledInCall = callSettings?.video.enabled;
14
16
  const {
15
17
  theme: {
16
18
  colors,
@@ -23,6 +25,10 @@ export const LivestreamVideoControlButton = () => {
23
25
  await call?.camera.toggle();
24
26
  };
25
27
 
28
+ if (!isVideoEnabledInCall) {
29
+ return;
30
+ }
31
+
26
32
  return (
27
33
  <Pressable
28
34
  onPress={onPress}
@@ -11,6 +11,9 @@
11
11
  "End Stream": "End Stream",
12
12
  "Leave Stream": "Leave Stream",
13
13
  "Live": "Live",
14
+ "Before Joining": "Before Joining",
15
+ "Setup your audio and video": "Setup your audio and video",
16
+ "Setup your audio": "Setup your audio",
14
17
  "You are first to Join the call.": "You are first to Join the call.",
15
18
  "Participants ({{ numberOfParticipants }})": "Participants ({{ numberOfParticipants }})",
16
19
  "{{ userName }} is sharing their screen": "{{ userName }} is sharing their screen",
@@ -124,7 +124,7 @@ export async function initIosNonVoipToken(
124
124
  pushConfig: PushConfig,
125
125
  setUnsubscribeListener: (unsubscribe: () => void) => void,
126
126
  ) {
127
- if (Platform.OS !== 'ios' || !pushConfig.android.pushProviderName) {
127
+ if (Platform.OS !== 'ios' || !pushConfig.ios.pushProviderName) {
128
128
  return;
129
129
  }
130
130
  const setDeviceToken = async (token: string) => {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '0.3.15';
1
+ export const version = '0.3.17';