diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx
index d7402e9ad8..8d5f8b7979 100644
--- a/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx
+++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/JoinLiveStream.tsx
@@ -7,6 +7,7 @@ import {
StyleSheet,
Text,
View,
+ ViewStyle,
} from 'react-native';
import { appTheme } from '../../theme';
import { useAppGlobalStoreValue } from '../../contexts/AppContext';
@@ -15,6 +16,7 @@ import { Button } from '../../components/Button';
import { randomId } from '../../modules/helpers/randomId';
import { NativeStackScreenProps } from '@react-navigation/native-stack';
import { LiveStreamParamList } from '../../../types';
+import { useOrientation } from '../../hooks/useOrientation';
type JoinLiveStreamScreenProps = NativeStackScreenProps<
LiveStreamParamList,
@@ -29,6 +31,7 @@ export const JoinLiveStream = ({
const userId = useAppGlobalStoreValue((store) => store.userId);
const userName = useAppGlobalStoreValue((store) => store.userName);
const { t } = useI18n();
+ const orientation = useOrientation();
const {
params: { mode },
} = route;
@@ -44,46 +47,54 @@ export const JoinLiveStream = ({
navigation.navigate('ViewerLiveStream', { callId });
};
+ const landScapeStyles: ViewStyle = {
+ flexDirection: orientation === 'landscape' ? 'row' : 'column',
+ };
+
return (
-
-
-
- {t('Hello, {{ userName }}', { userName: userName || userId })}
-
-
- {mode === 'host'
- ? t('Start a live stream by entering the call ID.')
- : t('Join/View a live stream by entering the call ID.')}
-
+
+
+
+
+ {t('Hello, {{ userName }}', { userName: userName || userId })}
+
+
+ {mode === 'host'
+ ? t('Start a live stream by entering the call ID.')
+ : t('Join/View a live stream by entering the call ID.')}
+
+
-
- {
- setCallId(text.trim().split(' ').join('-'));
- }}
- />
+
+
+ {
+ setCallId(text.trim().split(' ').join('-'));
+ }}
+ />
+
+ {mode === 'host' ? (
+
+ ) : (
+
+ )}
- {mode === 'host' ? (
-
- ) : (
-
- )}
);
};
@@ -95,6 +106,10 @@ const styles = StyleSheet.create({
flex: 1,
justifyContent: 'space-evenly',
},
+ topContainer: {
+ flex: 1,
+ justifyContent: 'center',
+ },
logo: {
height: 100,
width: 100,
@@ -106,14 +121,18 @@ const styles = StyleSheet.create({
color: appTheme.colors.static_white,
fontWeight: '500',
textAlign: 'center',
+ marginTop: appTheme.spacing.lg,
},
subTitle: {
color: appTheme.colors.light_gray,
fontSize: 16,
textAlign: 'center',
- marginTop: appTheme.spacing.lg,
marginHorizontal: appTheme.spacing.xl,
},
+ bottomContainer: {
+ flex: 1,
+ justifyContent: 'center',
+ },
createCall: {
display: 'flex',
flexDirection: 'row',
diff --git a/sample-apps/react-native/dogfood/src/screens/LiveStream/index.tsx b/sample-apps/react-native/dogfood/src/screens/LiveStream/index.tsx
index d9d3bcf2f0..90f2d084cb 100644
--- a/sample-apps/react-native/dogfood/src/screens/LiveStream/index.tsx
+++ b/sample-apps/react-native/dogfood/src/screens/LiveStream/index.tsx
@@ -1,10 +1,11 @@
import { useI18n } from '@stream-io/video-react-native-sdk';
import React from 'react';
-import { Image, StyleSheet, Text, View } from 'react-native';
+import { Image, StyleSheet, Text, View, ViewStyle } from 'react-native';
import { Button } from '../../components/Button';
import { appTheme } from '../../theme';
import { NativeStackScreenProps } from '@react-navigation/native-stack';
import { LiveStreamParamList } from '../../../types';
+import { useOrientation } from '../../hooks/useOrientation';
type LiveStreamScreenProps = NativeStackScreenProps<
LiveStreamParamList,
@@ -15,6 +16,7 @@ export const LiveStreamChooseScreen = ({
navigation,
}: LiveStreamScreenProps) => {
const { t } = useI18n();
+ const orientation = useOrientation();
const onHostViewSelect = () => {
navigation.navigate('JoinLiveStream', { mode: 'host' });
@@ -24,20 +26,28 @@ export const LiveStreamChooseScreen = ({
navigation.navigate('JoinLiveStream', { mode: 'viewer' });
};
+ const landScapeStyles: ViewStyle = {
+ flexDirection: orientation === 'landscape' ? 'row' : 'column',
+ };
+
return (
-
-
-
- {t('Stream Live stream App')}
- {t('Choose the Mode')}
+
+
+
+
+ {t('Stream Live stream App')}
+ {t('Choose the Mode')}
+
-
-
-
+
+
+
+
+
);
@@ -50,6 +60,10 @@ const styles = StyleSheet.create({
backgroundColor: appTheme.colors.static_grey,
padding: appTheme.spacing.lg,
},
+ topContainer: {
+ flex: 1,
+ justifyContent: 'center',
+ },
viewerButton: {
marginTop: appTheme.spacing.md,
},
@@ -59,17 +73,21 @@ const styles = StyleSheet.create({
borderRadius: 20,
alignSelf: 'center',
},
+ bottomContainer: {
+ flex: 1,
+ justifyContent: 'center',
+ },
title: {
fontSize: 30,
color: appTheme.colors.static_white,
fontWeight: '500',
textAlign: 'center',
+ marginTop: appTheme.spacing.lg,
},
subTitle: {
color: appTheme.colors.light_gray,
fontSize: 16,
textAlign: 'center',
- marginTop: appTheme.spacing.lg,
marginHorizontal: appTheme.spacing.xl,
},
});