fix(web): add 16:9 aspect-ratio reservation to direct video embeds
This commit is contained in:
@@ -11,12 +11,15 @@ export function VideoEmbed({ embed }: VideoEmbedProps) {
|
|||||||
// Direct video URL — no provider, no embedUrl
|
// Direct video URL — no provider, no embedUrl
|
||||||
if (!embed.provider && !embed.embedUrl) {
|
if (!embed.provider && !embed.embedUrl) {
|
||||||
return (
|
return (
|
||||||
<div className="mt-2 max-w-[400px]">
|
<div
|
||||||
|
className="mt-2 max-w-[400px] rounded-lg overflow-hidden bg-surface-input"
|
||||||
|
style={{ aspectRatio: '16/9' }}
|
||||||
|
>
|
||||||
<video
|
<video
|
||||||
src={embed.url}
|
src={embed.url}
|
||||||
controls
|
controls
|
||||||
preload="none"
|
preload="none"
|
||||||
className="w-full rounded-lg bg-black"
|
className="w-full h-full rounded-lg"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user