Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7c24c45

Browse files
committedSep 11, 2024·
Merge branch 'preview'
2 parents c169707 + 27a7bca commit 7c24c45

File tree

3 files changed

+30
-22
lines changed

3 files changed

+30
-22
lines changed
 

‎src/components/dataDisplay/postEmbed/VideoEmbed.tsx

+22-20
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,28 @@ const VideoEmbed = memo(function VideoEmbed(props: Props) {
1818
const { aspectRatio, playlist, thumbnail, alt } = props;
1919

2020
return (
21-
<MediaPlayer
22-
crossOrigin
23-
playsInline
24-
viewType="video"
25-
className="mt-2 hover:brightness-90 hover:cursor-pointer"
26-
src={playlist}
27-
poster={thumbnail ?? ""}
28-
onClick={(e) => e.stopPropagation()}
29-
>
30-
<MediaProvider>
31-
{alt && (
32-
<Poster
33-
src={thumbnail}
34-
alt={alt}
35-
className="absolute inset-0 block bg-black opacity-0 transition-opacity data-[visible]:opacity-100 [&>img]:w-full [&>img]:object-contain"
36-
/>
37-
)}
38-
</MediaProvider>
39-
<DefaultVideoLayout thumbnails={thumbnail} icons={defaultLayoutIcons} />
40-
</MediaPlayer>
21+
<div className="aspect-video mt-2 rounded-md hover:brightness-90 hover:cursor-pointer overflow-hidden">
22+
<MediaPlayer
23+
crossOrigin
24+
playsInline
25+
viewType="video"
26+
className="w-full h-full object-cover"
27+
src={playlist}
28+
poster={thumbnail ?? ""}
29+
onClick={(e) => e.stopPropagation()}
30+
>
31+
<MediaProvider>
32+
{alt && (
33+
<Poster
34+
src={thumbnail}
35+
alt={alt}
36+
className="absolute inset-0 block bg-skin-overlay opacity-0 transition-opacity data-[visible]:opacity-100 [&>img]:w-full [&>img]:object-contain"
37+
/>
38+
)}
39+
</MediaProvider>
40+
<DefaultVideoLayout thumbnails={thumbnail} icons={defaultLayoutIcons} />
41+
</MediaPlayer>
42+
</div>
4143
);
4244
});
4345

‎src/components/forms/loginForm/LoginForm.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default function LoginForm() {
148148
<Button
149149
type="submit"
150150
className={`text-skin-inverted bg-skin-inverted hover:bg-skin-inverted ml-auto mt-5 flex w-full items-center justify-center gap-2 rounded-lg px-3 py-3 font-semibold disabled:cursor-not-allowed ${
151-
loading && "animate-pulse"
151+
loading && "animate-pulse animate-duration-1000"
152152
}`}
153153
disabled={loading}
154154
aria-disabled={loading}

‎tailwind.config.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ export default {
8989
},
9090
},
9191
},
92-
plugins: [
92+
plugins: [
9393
require("tailwindcss-animated"),
94+
require("@vidstack/react/tailwind.cjs")({
95+
// Optimize output by specifying player selector.
96+
selector: ".media-player",
97+
// Change the media variants prefix.
98+
prefix: "media",
99+
}),
94100
],
95101
};

0 commit comments

Comments
 (0)
Please sign in to comment.