This commit is contained in:
1 parent
b0f55f3e6b
commit
197ea41442
1 file changed
+2
-3
@@ -14,14 +14,13 @@ if (!metadata) return new Response(null, { status: 404 });
|
||||
const { title, description, width, height, duration } = metadata;
|
||||
const basePath = import.meta.env.BASE_URL.replace(/\/$/, '');
|
||||
const streamPath = `${basePath}/video/${encodeURIComponent(video.name)}/stream`;
|
||||
const streamUrl = new URL(streamPath, Astro.url);
|
||||
---
|
||||
|
||||
<WebsiteLayout title={`${title} - Video`} description={description ?? undefined}>
|
||||
<Fragment slot="head">
|
||||
<meta property="og:type" content="video" />
|
||||
<meta property="og:video" content={streamUrl.href} />
|
||||
{streamUrl.href.startsWith('https://') && <meta property="og:video:secure_url" content={streamUrl.href} />}
|
||||
<meta property="og:video" content={streamPath} />
|
||||
{streamPath.startsWith('https://') && <meta property="og:video:secure_url" content={streamPath} />}
|
||||
<meta property="og:video:type" content={video.contentType} />
|
||||
{width && <meta property="og:video:width" content={width.toString()} />}
|
||||
{height && <meta property="og:video:height" content={height.toString()} />}
|
||||
|
||||
Reference in new issue
Block a user