tangled
alpha
login
or
join now
stream.place
/
streamplace
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
top bar gone :0
Natalie Bridgers
4 months ago
40c32b3f
3d5dc6af
+26
-26
4 changed files
expand all
collapse all
unified
split
js
app
components
mobile
chat.tsx
player.tsx
ui.tsx
src
router.tsx
-2
js/app/components/mobile/chat.tsx
···
17
useSharedValue,
18
withSpring,
19
} from "react-native-reanimated";
20
-
import { useResponsiveLayout } from "./useResponsiveLayout";
21
22
import { useNavigation } from "@react-navigation/native";
23
import { usePDSAgent } from "@streamplace/components/src/streamplace-store/xrpc";
···
100
}
101
102
function ChatPanel() {
103
-
const { shouldShowChatSidePanel, safeAreaInsets } = useResponsiveLayout();
104
const { profile } = useLivestreamInfo();
105
const handle = useHandle();
106
···
17
useSharedValue,
18
withSpring,
19
} from "react-native-reanimated";
0
20
21
import { useNavigation } from "@react-navigation/native";
22
import { usePDSAgent } from "@streamplace/components/src/streamplace-store/xrpc";
···
99
}
100
101
function ChatPanel() {
0
102
const { profile } = useLivestreamInfo();
103
const handle = useHandle();
104
+5
js/app/components/mobile/player.tsx
···
10
Text,
11
usePlayerDimensions,
12
usePlayerStore,
0
13
View,
14
} from "@streamplace/components";
15
import { gap, h, pt, w } from "@streamplace/components/src/lib/theme/atoms";
···
161
screenWidth,
162
contentWidth,
163
availableHeight,
0
164
} = useResponsiveLayout({
165
sidebarWidth: sb.animatedWidth,
166
sidebarHidden: !sb.isActive,
···
169
170
// content info
171
const { width, height } = usePlayerDimensions();
0
0
172
173
// Calculate aspect ratio and determine if we're in desktop mode
174
const aspectRatio = width > 0 && height > 0 ? width / height : 16 / 9;
···
220
: {
221
flex: 1,
222
},
0
223
]}
224
>
225
<PlayerInnerInner {...props}>
···
10
Text,
11
usePlayerDimensions,
12
usePlayerStore,
13
+
useSegmentDimensions,
14
View,
15
} from "@streamplace/components";
16
import { gap, h, pt, w } from "@streamplace/components/src/lib/theme/atoms";
···
162
screenWidth,
163
contentWidth,
164
availableHeight,
165
+
safeAreaInsets,
166
} = useResponsiveLayout({
167
sidebarWidth: sb.animatedWidth,
168
sidebarHidden: !sb.isActive,
···
171
172
// content info
173
const { width, height } = usePlayerDimensions();
174
+
175
+
const { isPlayerRatioGreater } = useSegmentDimensions();
176
177
// Calculate aspect ratio and determine if we're in desktop mode
178
const aspectRatio = width > 0 && height > 0 ? width / height : 16 / 9;
···
224
: {
225
flex: 1,
226
},
227
+
{ paddingTop: isPlayerRatioGreater ? safeAreaInsets.top : 0 },
228
]}
229
>
230
<PlayerInnerInner {...props}>
+20
-24
js/app/components/mobile/ui.tsx
···
150
>
151
<ChevronLeft color="white" />
152
</Pressable>
153
-
{shouldShowFloatingMetrics && (
154
-
<>
155
-
<Image
156
-
source={
157
-
profile?.did
158
-
? { url: avatars[profile?.did]?.avatar }
159
-
: require("assets/images/goose.png")
160
-
}
161
-
width={32}
162
-
height={32}
163
-
style={[
164
-
{
165
-
width: 36,
166
-
height: 36,
167
-
backgroundColor: "green",
168
-
},
169
-
{ borderRadius: 999 },
170
-
borders.width.thin,
171
-
borders.color.gray[700],
172
-
]}
173
-
/>
174
-
<Text>{profile?.handle}</Text>
175
-
</>
176
-
)}
177
</View>
178
</View>
179
···
150
>
151
<ChevronLeft color="white" />
152
</Pressable>
153
+
<Image
154
+
source={
155
+
profile?.did
156
+
? { url: avatars[profile?.did]?.avatar }
157
+
: require("assets/images/goose.png")
158
+
}
159
+
width={32}
160
+
height={32}
161
+
style={[
162
+
{
163
+
width: 36,
164
+
height: 36,
165
+
backgroundColor: "green",
166
+
},
167
+
{ borderRadius: 999 },
168
+
borders.width.thin,
169
+
borders.color.gray[700],
170
+
]}
171
+
/>
172
+
<Text>{profile?.handle}</Text>
0
0
0
0
173
</View>
174
</View>
175
+1
js/app/src/router.tsx
···
656
options={{
657
headerTitle: "Stream",
658
title: "Streamplace Stream",
0
659
}}
660
/>
661
</Stack.Navigator>
···
656
options={{
657
headerTitle: "Stream",
658
title: "Streamplace Stream",
659
+
headerShown: false,
660
}}
661
/>
662
</Stack.Navigator>