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