Files
llink/js/mobile/src/navigation/RootNavigator.tsx
T
Arjun Patel 96f5a727d6 feat(mobile): add support for huddles to mobile app (#219)
* feat(mobile): add huddles with LiveKit

Mirrors the desktop huddle window: tap the headphones button on a stream
to fetch a LiveKit token from Orion and join a video room. Active huddles
show a red badge on the stream card (participant count) and a red Join
pill in the stream top bar — both driven by huddle_active_participants
synced from the LiveKit webhook.

The HuddleScreen lives at its own route (not a modal/window): video tile
grid with placeholders for camera-off, mic/camera toggles, and a leave
button. Adds the LiveKit RN SDK plus the WebRTC + LiveKit Expo config
plugins for prebuild.

https://claude.ai/code/session_01Po5tAD17MXhnqGQ9hKh6PC

* fix(mobile): exiting from huddle

* fix: pause stream during huddle

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-26 16:37:37 -07:00

62 lines
2.2 KiB
TypeScript

import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { ActivityIndicator, View } from "react-native";
import { useAuthStore } from "@/stores/auth-store";
import { SignInScreen } from "@/features/auth/SignInScreen";
import { NetworkListScreen } from "@/features/networks/NetworkListScreen";
import { StreamListScreen } from "@/features/streams/StreamListScreen";
import { NewStreamScreen } from "@/features/streams/NewStreamScreen";
import { StreamViewScreen } from "@/features/stream-view/StreamViewScreen";
import { HuddleScreen } from "@/features/huddle/HuddleScreen";
import { SettingsScreen } from "@/features/settings/SettingsScreen";
import { AccountScreen } from "@/features/settings/AccountScreen";
import type { RootStackParamList } from "./types";
const Stack = createNativeStackNavigator<RootStackParamList>();
export function RootNavigator() {
const status = useAuthStore((s) => s.status);
if (status === "idle" || status === "restoring") {
return (
<View className="flex-1 items-center justify-center bg-background">
<ActivityIndicator />
</View>
);
}
if (status === "unauthenticated") {
return (
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="SignIn" component={SignInScreen} />
</Stack.Navigator>
);
}
return (
<Stack.Navigator
initialRouteName="NetworkList"
screenOptions={{ headerShown: false }}
>
<Stack.Screen name="NetworkList" component={NetworkListScreen} />
<Stack.Screen name="StreamList" component={StreamListScreen} />
<Stack.Screen
name="StreamView"
component={StreamViewScreen}
options={{ animation: "fade", gestureEnabled: false }}
/>
<Stack.Screen
name="Huddle"
component={HuddleScreen}
options={{ animation: "slide_from_bottom", gestureEnabled: false }}
/>
<Stack.Screen
name="NewStream"
component={NewStreamScreen}
options={{ animation: "slide_from_bottom" }}
/>
<Stack.Screen name="Settings" component={SettingsScreen} />
<Stack.Screen name="Account" component={AccountScreen} />
</Stack.Navigator>
);
}