Skip to content

Commit

Permalink
show preview of videos (only works for .MP4)
Browse files Browse the repository at this point in the history
  • Loading branch information
abi committed Mar 8, 2024
1 parent caa6301 commit cacf78a
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,27 @@ function App() {
"scanning relative": appState === AppState.CODING,
})}
>
<img
className="w-[340px] border border-gray-200 rounded-md"
src={referenceImages[0]}
alt="Reference"
/>
{inputMode === "image" && (
<img
className="w-[340px] border border-gray-200 rounded-md"
src={referenceImages[0]}
alt="Reference"
/>
)}
{inputMode === "video" && (
<video
muted
autoPlay
loop
className="w-[340px] border border-gray-200 rounded-md"
src={referenceImages[0]}
/>
)}
</div>
<div className="text-gray-400 uppercase text-sm text-center mt-1">
Original Screenshot
{inputMode === "video"
? "Original Video"
: "Original Screenshot"}
</div>
</div>
)}
Expand Down

0 comments on commit cacf78a

Please sign in to comment.