Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat(web): add floating volume control on edit page video preview
Richie McIlroy41704d3b7a9e
diff --git a/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx b/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsxindex 4c7e1e139..76ffc11a8 100644--- a/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx+++ b/apps/web/app/s/[videoId]/_components/CapVideoPlayer.tsx@@ -111,6 +111,7 @@ interface Props {canRetryProcessing?: boolean;duration?: number | null;showPlaybackStatusBadge?: boolean;+ showFloatingVolumeControl?: boolean;onUploadComplete?: () => void;}@@ -142,6 +143,7 @@ export function CapVideoPlayer({canRetryProcessing = false,duration: fallbackDuration,showPlaybackStatusBadge = false,+ showFloatingVolumeControl = false,onUploadComplete,}: Props) {const [currentCue, setCurrentCue] = useState<string>("");@@ -819,6 +821,14 @@ export function CapVideoPlayer({!showUploadFailureOverlay &&!showPlaybackResolutionError && <MediaPlayerError />}<MediaPlayerVolumeIndicator />+ {showFloatingVolumeControl &&+ videoLoaded &&+ !showUploadFailureOverlay &&+ !showPlaybackResolutionError && (+ <div className="absolute bottom-3 left-3 z-50 rounded-full bg-black/45 p-1 text-white shadow-[0_8px_24px_rgba(0,0,0,0.35)] backdrop-blur-md">+ <MediaPlayerVolume expandable />+ </div>+ )}{mainControlsVisible &&markersReady &&diff --git a/apps/web/app/s/[videoId]/edit/EditVideoClient.tsx b/apps/web/app/s/[videoId]/edit/EditVideoClient.tsxindex 9a52bffa1..8304a3a75 100644--- a/apps/web/app/s/[videoId]/edit/EditVideoClient.tsx+++ b/apps/web/app/s/[videoId]/edit/EditVideoClient.tsx@@ -1644,6 +1644,7 @@ export function EditVideoClient({ video }: { video: EditableVideo }) {disableReactionStampsdisablePreviewGifduration={video.duration}+ showFloatingVolumeControl/></div></section>