diff --git a/js/mobile/src/features/compose/VideoRecordingOverlay.tsx b/js/mobile/src/features/compose/VideoRecordingOverlay.tsx index e42f6a1..eb2680c 100644 --- a/js/mobile/src/features/compose/VideoRecordingOverlay.tsx +++ b/js/mobile/src/features/compose/VideoRecordingOverlay.tsx @@ -1,6 +1,7 @@ import { useEffect, useRef, useState } from "react"; import { Platform, Pressable, StyleSheet, Text, View } from "react-native"; -import { CameraView } from "expo-camera"; +import { CameraView, type CameraType } from "expo-camera"; +import { SwitchCamera } from "lucide-react-native"; import { logError } from "@/lib/errors"; import { acquireRecordingAudioSession, @@ -23,6 +24,7 @@ export function VideoRecordingOverlay({ const [cameraReady, setCameraReady] = useState(false); const [recording, setRecording] = useState(false); const [elapsedMs, setElapsedMs] = useState(0); + const [facing, setFacing] = useState("front"); const startedAtRef = useRef(null); const cancelledRef = useRef(false); @@ -105,7 +107,7 @@ export function VideoRecordingOverlay({ setCameraReady(true)} /> + {!recording && cameraReady ? ( + + + setFacing((f) => (f === "front" ? "back" : "front")) + } + accessibilityLabel="Flip camera" + className="h-11 w-11 items-center justify-center rounded-full bg-white/15" + > + + + + ) : null} + {recording ? (