fix: prevent mirror review of screen recording

This commit is contained in:
talksik
2026-04-08 16:38:10 -07:00
parent 4c60957657
commit b2dbd65c19
2 changed files with 10 additions and 1 deletions
@@ -25,6 +25,8 @@ interface RecordingOverlayProps {
onDragLeave: (e: React.DragEvent) => void;
onDrop: (e: React.DragEvent) => void;
};
/** Mirror the video horizontally. Defaults to true (selfie-view for webcam). Set false for screen recordings. */
mirror?: boolean;
}
function RecordingTimer() {
@@ -52,9 +54,11 @@ function RecordingTimer() {
function ReviewPlayback({
blob,
isVideo,
mirror = true,
}: {
blob: Blob;
isVideo: boolean;
mirror?: boolean;
}) {
const urlRef = useRef<string | null>(null);
const [objectUrl, setObjectUrl] = useState<string | null>(null);
@@ -82,7 +86,7 @@ function ReviewPlayback({
autoPlay
loop
playsInline
className="absolute inset-0 h-full w-full -scale-x-100 object-cover"
className={`absolute inset-0 h-full w-full object-cover${mirror ? " -scale-x-100" : ""}`}
/>
);
}
@@ -119,6 +123,7 @@ export function RecordingOverlay({
onAddFiles,
isDragging,
dropZoneProps,
mirror = true,
}: RecordingOverlayProps) {
const videoRef = useRef<HTMLVideoElement>(null);
const recordingAudioSource = useAudioSource(mediaStream ?? null);
@@ -176,6 +181,7 @@ export function RecordingOverlay({
<ReviewPlayback
blob={reviewBlob}
isVideo={recordingMode === "video"}
mirror={mirror}
/>
)}