fix(ui): hide model name in HUD badge; show clips at true aspect with resolution chip

This commit is contained in:
juancarlos.cavero 2026-07-18 13:56:20 +02:00
parent d2febde078
commit 928b4a3ddc
2 changed files with 7 additions and 2 deletions

View file

@ -137,7 +137,7 @@ const ProcessingAnimation = ({ media, isComplete, syncedTime, isSyncedPlaying, s
{!isSyncedPlaying && !isComplete && ( {!isSyncedPlaying && !isComplete && (
<div className="absolute top-4 right-4 z-30 flex items-center gap-2 px-3 py-1.5 bg-black/70 rounded-full readout"> <div className="absolute top-4 right-4 z-30 flex items-center gap-2 px-3 py-1.5 bg-black/70 rounded-full readout">
AI_MODEL: GEMINI-2.5-PRO VIRAL_DETECTION: ACTIVE
</div> </div>
)} )}

View file

@ -44,6 +44,7 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK
// A reopened project seeds it from the persisted project state. // A reopened project seeds it from the persisted project state.
const [serverVideoFile, setServerVideoFile] = useState(initialState?.server_file || (clip.video_url || '').split('/').pop()); const [serverVideoFile, setServerVideoFile] = useState(initialState?.server_file || (clip.video_url || '').split('/').pop());
const [videoErrored, setVideoErrored] = useState(false); const [videoErrored, setVideoErrored] = useState(false);
const [resolution, setResolution] = useState(null);
// If the local video failed and a durable R2 URL is (now) available, use it. // If the local video failed and a durable R2 URL is (now) available, use it.
// Handles the race where the video errors before the durable URL has loaded. // Handles the race where the video errors before the durable URL has loaded.
@ -511,8 +512,11 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK
ref={videoRef} ref={videoRef}
src={currentVideoUrl} src={currentVideoUrl}
controls controls
className="w-full h-full object-cover" className="w-full h-full object-contain"
playsInline playsInline
onLoadedMetadata={(e) => {
if (e.target.videoWidth) setResolution(`${e.target.videoWidth}×${e.target.videoHeight}`);
}}
onError={() => { onError={() => {
// Local /videos/ file gone (e.g. cleaned up after a reload) → // Local /videos/ file gone (e.g. cleaned up after a reload) →
// fall back to the durable R2 copy for managed users. If the // fall back to the durable R2 copy for managed users. If the
@ -556,6 +560,7 @@ export default function ResultCard({ clip, index, jobId, durableUrl, uploadPostK
</h3> </h3>
<div className="flex flex-wrap gap-1.5"> <div className="flex flex-wrap gap-1.5">
{durationReadout && <span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">{durationReadout}</span>} {durationReadout && <span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">{durationReadout}</span>}
{resolution && <span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">{resolution}</span>}
<span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">#shorts</span> <span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">#shorts</span>
<span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">#viral</span> <span className="readout bg-paper3 px-2 py-0.5 rounded-full shrink-0">#viral</span>
</div> </div>