show user a preview of the video and allow them to re-record

This commit is contained in:
Abi Raja 2024-03-22 11:15:33 -04:00
parent 87a44cfb77
commit 7024057c03

View File

@ -118,7 +118,26 @@ function ScreenRecorder({
<div className="flex items-center mr-2 text-xl gap-x-1">
<span>Screen Recording Captured.</span>
</div>
<Button onClick={kickoffGeneration}>Generate</Button>
{screenRecordingDataUrl && (
<video
muted
autoPlay
loop
className="w-[340px] border border-gray-200 rounded-md"
src={screenRecordingDataUrl}
/>
)}
<div className="flex gap-x-2">
<Button
variant="secondary"
onClick={() =>
setScreenRecorderState(ScreenRecorderState.INITIAL)
}
>
Re-record
</Button>
<Button onClick={kickoffGeneration}>Generate</Button>
</div>
</div>
)}
</div>