auto-save 2026-05-14 01:45 (+6, ~2)

This commit is contained in:
2026-05-14 01:46:08 +08:00
parent d04ec565a4
commit 8c6ee1d5f6
8 changed files with 1451 additions and 2 deletions

View File

@@ -45,8 +45,19 @@ export function HoverPreview({
<div className={`relative rounded-lg overflow-hidden border-2 bg-black shadow-2xl ${pinned ? "ring-2 ring-violet-400/70" : ""} ${borderClass}`}
style={{ width: "max-content" }}>
{videoSrc ? (
<video src={videoSrc} poster={poster} muted loop playsInline autoPlay
className="block" style={{ maxWidth: "none" }} />
<video
src={videoSrc}
poster={poster}
muted
loop
playsInline
autoPlay
preload="auto"
className="block"
style={{ maxWidth: "none" }}
onLoadedMetadata={(e) => { e.currentTarget.play().catch(() => {}) }}
onCanPlay={(e) => { e.currentTarget.play().catch(() => {}) }}
/>
) : imgSrc ? (
<img src={imgSrc} alt="" className="block" style={{ maxWidth: "none" }} />
) : (