@@ -18,6 +18,7 @@ import { usePostHog } from "posthog-js/react";
1818import Tooltip from "~/components/Tooltip" ;
1919import generateThumbnail from "~/utils/generateThumbnail" ;
2020import * as EBML from "ts-ebml" ;
21+ import VideoPlayer from "~/components/VideoPlayer" ;
2122
2223interface Props {
2324 closeModal : ( ) => void ;
@@ -200,7 +201,7 @@ export default function Recorder({ closeModal, step, setStep }: Props) {
200201 const handleSave = ( ) => {
201202 if ( blob ) {
202203 const dateString =
203- "Recording - " + dayjs ( ) . format ( "D MMM YYYY" ) + ".webm" ;
204+ "Snapify Recording - " + dayjs ( ) . format ( "D MMM YYYY" ) + ".webm" ;
204205 invokeSaveAsDialog ( blob , dateString ) ;
205206 }
206207
@@ -210,7 +211,8 @@ export default function Recorder({ closeModal, step, setStep }: Props) {
210211 const handleUpload = async ( ) => {
211212 if ( ! blob || ! videoRef . current ) return ;
212213
213- const dateString = "Recording - " + dayjs ( ) . format ( "D MMM YYYY" ) + ".webm" ;
214+ const dateString =
215+ "Snapify Recording - " + dayjs ( ) . format ( "D MMM YYYY" ) + ".webm" ;
214216 setSubmitting ( true ) ;
215217
216218 try {
@@ -390,15 +392,14 @@ export default function Recorder({ closeModal, step, setStep }: Props) {
390392 { step === "post" ? (
391393 < div >
392394 { blob ? (
393- < video
394- src = { URL . createObjectURL ( blob ) }
395- controls
396- onPlay = { ( ) => posthog ?. capture ( "recorder: played preview video" ) }
397- onPause = { ( ) => posthog ?. capture ( "recorder: paused preview video" ) }
398- ref = { videoRef }
399- className = "mb-4 max-h-[75vh] w-[75vw]"
400- controlsList = "nodownload"
401- />
395+ < div className = "mb-3 aspect-video max-h-[75vh] max-w-[75vw]" >
396+ < VideoPlayer video_url = { URL . createObjectURL ( blob ) } />
397+ < video
398+ src = { URL . createObjectURL ( blob ) }
399+ ref = { videoRef }
400+ className = "absolute hidden"
401+ />
402+ </ div >
402403 ) : null }
403404 < div className = "flex items-center justify-center" >
404405 < button
0 commit comments