refactor(video): remove poster

This commit is contained in:
taroj1205 2025-01-27 20:41:07 +13:00
parent a06d53e51e
commit 295cfe1880
7 changed files with 6 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

View file

@ -2,15 +2,10 @@
import Description from '../components/Description.astro'
import browserSidebar from '../assets/browser-sidebar.webm'
import browserSidebarPoster from '../assets/poster/browser-sidebar.webp'
import browserWorkspaces from '../assets/browser-workspaces.webm'
import browserWorkspacesPoster from '../assets/poster/browser-workspaces.webp'
import browserCompactMode from '../assets/browser-compactmode.webm'
import browserCompactModePoster from '../assets/poster/browser-compactmode.webp'
import browserGlance from '../assets/browser-glance.webm'
import browserGlancePoster from '../assets/poster/browser-glance.webp'
import browserSplitViews from '../assets/browser-splitview.webm'
import browserSplitViewsPoster from '../assets/poster/browser-splitview.webp'
import { motion } from 'motion/react'
import { getTitleAnimation } from '../animations'
@ -53,7 +48,6 @@ import Video from './Video.astro'
</div>
<Video
src={browserWorkspaces}
poster={browserWorkspacesPoster.src}
autoplay
loop
muted
@ -74,7 +68,6 @@ import Video from './Video.astro'
</div>
<Video
src={browserCompactMode}
poster={browserCompactModePoster.src}
autoplay
loop
muted
@ -97,7 +90,6 @@ import Video from './Video.astro'
</div>
<Video
src={browserGlance}
poster={browserGlancePoster.src}
autoplay
loop
muted
@ -119,7 +111,6 @@ import Video from './Video.astro'
</div>
<Video
src={browserSplitViews}
poster={browserSplitViewsPoster.src}
autoplay
loop
muted
@ -139,7 +130,6 @@ import Video from './Video.astro'
</div>
<Video
src={browserSidebar}
poster={browserSidebarPoster.src}
autoplay
loop
muted

View file

@ -3,7 +3,12 @@ const { src, class: className, ...rest } = Astro.props
const type = src.split('.').pop() || 'webm'
---
<video class={className} data-src={src} preload="none" {...rest}>
<video
class:list={['w-full', className]}
data-src={src}
preload="none"
{...rest}
>
<source src="" type={`video/${type}`} />
</video>