Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

background selection

Siddharth568d9ca21bb7
diff --git a/public/wallpapers/wallpaper1.jpg b/public/wallpapers/wallpaper1.jpg
new file mode 100644
index 00000000..d91b5307
Binary files /dev/null and b/public/wallpapers/wallpaper1.jpg differ
diff --git a/public/wallpapers/wallpaper1.png b/public/wallpapers/wallpaper1.png
new file mode 100644
index 00000000..0e51d83d
Binary files /dev/null and b/public/wallpapers/wallpaper1.png differ
diff --git a/public/wallpapers/wallpaper10.jpg b/public/wallpapers/wallpaper10.jpg
new file mode 100644
index 00000000..49da791c
Binary files /dev/null and b/public/wallpapers/wallpaper10.jpg differ
diff --git a/public/wallpapers/wallpaper11.jpg b/public/wallpapers/wallpaper11.jpg
new file mode 100644
index 00000000..b2000406
Binary files /dev/null and b/public/wallpapers/wallpaper11.jpg differ
diff --git a/public/wallpapers/wallpaper12.jpg b/public/wallpapers/wallpaper12.jpg
new file mode 100644
index 00000000..264357dd
Binary files /dev/null and b/public/wallpapers/wallpaper12.jpg differ
diff --git a/public/wallpapers/wallpaper2.jpg b/public/wallpapers/wallpaper2.jpg
new file mode 100644
index 00000000..6a5640c7
Binary files /dev/null and b/public/wallpapers/wallpaper2.jpg differ
diff --git a/public/wallpapers/wallpaper3.jpg b/public/wallpapers/wallpaper3.jpg
new file mode 100644
index 00000000..73d60c55
Binary files /dev/null and b/public/wallpapers/wallpaper3.jpg differ
diff --git a/public/wallpapers/wallpaper4.jpg b/public/wallpapers/wallpaper4.jpg
new file mode 100644
index 00000000..3620da9a
Binary files /dev/null and b/public/wallpapers/wallpaper4.jpg differ
diff --git a/public/wallpapers/wallpaper5.jpg b/public/wallpapers/wallpaper5.jpg
new file mode 100644
index 00000000..dec36ce0
Binary files /dev/null and b/public/wallpapers/wallpaper5.jpg differ
diff --git a/public/wallpapers/wallpaper6.jpg b/public/wallpapers/wallpaper6.jpg
new file mode 100644
index 00000000..23314b22
Binary files /dev/null and b/public/wallpapers/wallpaper6.jpg differ
diff --git a/public/wallpapers/wallpaper7.jpg b/public/wallpapers/wallpaper7.jpg
new file mode 100644
index 00000000..6c23515f
Binary files /dev/null and b/public/wallpapers/wallpaper7.jpg differ
diff --git a/public/wallpapers/wallpaper8.jpg b/public/wallpapers/wallpaper8.jpg
new file mode 100644
index 00000000..9cf1193f
Binary files /dev/null and b/public/wallpapers/wallpaper8.jpg differ
diff --git a/public/wallpapers/wallpaper9.jpg b/public/wallpapers/wallpaper9.jpg
new file mode 100644
index 00000000..be273b48
Binary files /dev/null and b/public/wallpapers/wallpaper9.jpg differ
diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx
index 47f61553..6ae4d04f 100644
--- a/src/components/video-editor/SettingsPanel.tsx
+++ b/src/components/video-editor/SettingsPanel.tsx
@@ -1,6 +1,33 @@
-export default function SettingsPanel() {
+import { cn } from "@/lib/utils";
+
+const WALLPAPER_COUNT = 12;
+const WALLPAPER_PATHS = Array.from({ length: WALLPAPER_COUNT }, (_, i) => `/wallpapers/wallpaper${i + 1}.jpg`);
+
+export default function SettingsPanel({ selected, onWallpaperChange }: { selected: string, onWallpaperChange: (path: string) => void }) {
return (
<div className="flex-[3] min-w-0 bg-card border border-border rounded-xl p-8 flex flex-col shadow-sm">
+ <div className="mb-6">
+ <div className="text-lg font-semibold mb-2">Choose Background</div>
+ <div className="grid grid-cols-6 gap-3">
+ {WALLPAPER_PATHS.map((path, idx) => (
+ <div
+ key={path}
+ className={cn(
+ "aspect-square rounded-lg border-2 overflow-hidden cursor-pointer transition-all w-16 h-16",
+ selected === path
+ ? "border-primary/40 ring-1 ring-primary/40 scale-105"
+ : "border-border hover:border-primary/60 hover:scale-105"
+ )}
+ style={{ backgroundImage: `url(${path})`, backgroundSize: "cover", backgroundPosition: "center" }}
+ aria-label={`Wallpaper ${idx + 1}`}
+ tabIndex={0}
+ onClick={() => onWallpaperChange(path)}
+ onKeyDown={e => { if (e.key === 'Enter' || e.key === ' ') onWallpaperChange(path); }}
+ role="button"
+ />
+ ))}
+ </div>
+ </div>
<div className="flex-1 w-full flex items-center justify-center text-muted-foreground text-base">
Settings
</div>
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index e61ec8ba..ac57c610 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -1,11 +1,15 @@
import { useEffect, useRef, useState } from "react";
+
import VideoPlayback, { VideoPlaybackRef } from "./VideoPlayback";
import PlaybackControls from "./PlaybackControls";
import TimelineEditor from "./TimelineEditor";
import SettingsPanel from "./SettingsPanel";
+const WALLPAPER_COUNT = 12;
+const WALLPAPER_PATHS = Array.from({ length: WALLPAPER_COUNT }, (_, i) => `/wallpapers/wallpaper${i + 1}.jpg`);
+
export default function VideoEditor() {
const [videoPath, setVideoPath] = useState<string | null>(null);
const [loading, setLoading] = useState(true);
@@ -13,6 +17,7 @@ export default function VideoEditor() {
const [isPlaying, setIsPlaying] = useState(false);
const [currentTime, setCurrentTime] = useState(0);
const [duration, setDuration] = useState(0);
+ const [wallpaper, setWallpaper] = useState<string>(WALLPAPER_PATHS[0]);
const videoPlaybackRef = useRef<VideoPlaybackRef>(null);
const isSeeking = useRef(false);
@@ -85,6 +90,7 @@ export default function VideoEditor() {
onTimeUpdate={setCurrentTime}
onPlayStateChange={setIsPlaying}
onError={setError}
+ wallpaper={wallpaper}
/>
<PlaybackControls
isPlaying={isPlaying}
@@ -100,7 +106,7 @@ export default function VideoEditor() {
</div>
<TimelineEditor />
</div>
- <SettingsPanel />
+ <SettingsPanel selected={wallpaper} onWallpaperChange={setWallpaper} />
</div>
);
}
\ No newline at end of file
diff --git a/src/components/video-editor/VideoPlayback.tsx b/src/components/video-editor/VideoPlayback.tsx
index 93d91754..2e7d7c78 100644
--- a/src/components/video-editor/VideoPlayback.tsx
+++ b/src/components/video-editor/VideoPlayback.tsx
@@ -7,6 +7,7 @@ interface VideoPlaybackProps {
onTimeUpdate: (time: number) => void;
onPlayStateChange: (playing: boolean) => void;
onError: (error: string) => void;
+ wallpaper?: string;
}
export interface VideoPlaybackRef {
@@ -20,6 +21,7 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(({
onTimeUpdate,
onPlayStateChange,
onError,
+ wallpaper,
}, ref) => {
const videoRef = useRef<HTMLVideoElement | null>(null);
const canvasRef = useRef<HTMLCanvasElement | null>(null);
@@ -70,9 +72,9 @@ const VideoPlayback = forwardRef<VideoPlaybackRef, VideoPlaybackProps>(({
}, [videoPath]);
return (
- <div
+ <div
className="w-full aspect-video rounded-xl p-8 flex items-center justify-center overflow-hidden bg-cover bg-center"
- style={{ backgroundImage: 'url(/wallpaper.png)' }}
+ style={{ backgroundImage: `url(${wallpaper || '/wallpapers/wallpaper1.jpg'})` }}
>
<canvas
ref={canvasRef}