@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.
- package/CHANGELOG.md +15 -0
- package/dist/commonjs/components/Call/CallControls/HangupCallButton.js +2 -0
- package/dist/commonjs/components/Call/CallControls/HangupCallButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js +6 -2
- package/dist/commonjs/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ScreenShareButton.js +9 -2
- package/dist/commonjs/components/Call/CallControls/ScreenShareButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js +8 -2
- package/dist/commonjs/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js +7 -1
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js +7 -1
- package/dist/commonjs/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
- package/dist/commonjs/components/Call/Lobby/Lobby.js +7 -4
- package/dist/commonjs/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +7 -1
- package/dist/commonjs/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
- package/dist/commonjs/translations/en.json +3 -0
- package/dist/commonjs/utils/push/ios.js +1 -1
- package/dist/commonjs/utils/push/ios.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/module/components/Call/CallControls/HangupCallButton.js +2 -0
- package/dist/module/components/Call/CallControls/HangupCallButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/OutgoingCallControls.js +6 -2
- package/dist/module/components/Call/CallControls/OutgoingCallControls.js.map +1 -1
- package/dist/module/components/Call/CallControls/ScreenShareButton.js +9 -2
- package/dist/module/components/Call/CallControls/ScreenShareButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js +8 -2
- package/dist/module/components/Call/CallControls/ToggleCameraFaceButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js +7 -1
- package/dist/module/components/Call/CallControls/ToggleVideoPreviewButton.js.map +1 -1
- package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js +7 -1
- package/dist/module/components/Call/CallControls/ToggleVideoPublishingButton.js.map +1 -1
- package/dist/module/components/Call/Lobby/Lobby.js +7 -4
- package/dist/module/components/Call/Lobby/Lobby.js.map +1 -1
- package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js +7 -1
- package/dist/module/components/Livestream/LivestreamControls/LivestreamVideoControlButton.js.map +1 -1
- package/dist/module/translations/en.json +3 -0
- package/dist/module/utils/push/ios.js +1 -1
- package/dist/module/utils/push/ios.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts +6 -1
- package/dist/typescript/components/Call/CallControls/HangupCallButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/OutgoingCallControls.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ScreenShareButton.d.ts +1 -1
- package/dist/typescript/components/Call/CallControls/ScreenShareButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleCameraFaceButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleVideoPreviewButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts +1 -1
- package/dist/typescript/components/Call/CallControls/ToggleVideoPublishingButton.d.ts.map +1 -1
- package/dist/typescript/components/Call/Lobby/Lobby.d.ts.map +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts +1 -1
- package/dist/typescript/components/Livestream/LivestreamControls/LivestreamVideoControlButton.d.ts.map +1 -1
- package/dist/typescript/translations/index.d.ts +3 -0
- package/dist/typescript/translations/index.d.ts.map +1 -1
- package/dist/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Call/CallControls/HangupCallButton.tsx +6 -0
- package/src/components/Call/CallControls/OutgoingCallControls.tsx +8 -2
- package/src/components/Call/CallControls/ScreenShareButton.tsx +10 -2
- package/src/components/Call/CallControls/ToggleCameraFaceButton.tsx +10 -2
- package/src/components/Call/CallControls/ToggleVideoPreviewButton.tsx +7 -1
- package/src/components/Call/CallControls/ToggleVideoPublishingButton.tsx +7 -1
- package/src/components/Call/Lobby/Lobby.tsx +32 -26
- package/src/components/Livestream/LivestreamControls/LivestreamVideoControlButton.tsx +7 -1
- package/src/translations/en.json +3 -0
- package/src/utils/push/ios.ts +1 -1
- 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
|
-
{
|
|
114
|
+
{isVideoEnabledInCall
|
|
115
|
+
? t('Setup your audio and video')
|
|
116
|
+
: t('Setup your audio')}
|
|
113
117
|
</Text>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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: '
|
|
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:
|
|
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}
|
package/src/translations/en.json
CHANGED
|
@@ -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",
|
package/src/utils/push/ios.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
1
|
+
export const version = '0.3.17';
|