This commit is contained in:
1 parent
197ea41442
commit
e55e3f607d
2 files changed
+4
-4
No files matched your search
@@ -28,9 +28,9 @@ const { title, description, keywords, openGraph, viewTransition } = Astro.props;
|
|||||||
<>
|
<>
|
||||||
<meta property="og:title" content={title} />
|
<meta property="og:title" content={title} />
|
||||||
{description && <meta property="og:description" content={description} />}
|
{description && <meta property="og:description" content={description} />}
|
||||||
<meta property="og:url" content={Astro.url.href} />
|
<meta property="og:url" content={Astro.url.pathname} />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:image" content={new URL(logo512.src, Astro.url).href} />
|
<meta property="og:image" content={logo512.src} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<slot name="head" />
|
<slot name="head" />
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import WebsiteLayout from '@layouts/website/WebsiteLayout.astro';
|
import WebsiteLayout from '@layouts/website/WebsiteLayout.astro';
|
||||||
import VideoPlayer from '@app/website/video/VideoPlayer.svelte';
|
import VideoPlayer from '@app/website/video/VideoPlayer.svelte';
|
||||||
import { getVideoMetadata, resolveVideo } from '@util/video.ts';
|
import { getVideoMetadata, resolveVideo } from '@util/video.ts';
|
||||||
|
import { BASE_HOST, BASE_PATH } from 'astro:env/server';
|
||||||
|
|
||||||
const { name } = Astro.params;
|
const { name } = Astro.params;
|
||||||
|
|
||||||
@@ -12,8 +13,7 @@ const metadata = await getVideoMetadata(video);
|
|||||||
if (!metadata) return new Response(null, { status: 404 });
|
if (!metadata) return new Response(null, { status: 404 });
|
||||||
|
|
||||||
const { title, description, width, height, duration } = metadata;
|
const { title, description, width, height, duration } = metadata;
|
||||||
const basePath = import.meta.env.BASE_URL.replace(/\/$/, '');
|
const streamPath = `${BASE_HOST}/${BASE_PATH}/video/${encodeURIComponent(video.name)}/stream`;
|
||||||
const streamPath = `${basePath}/video/${encodeURIComponent(video.name)}/stream`;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<WebsiteLayout title={`${title} - Video`} description={description ?? undefined}>
|
<WebsiteLayout title={`${title} - Video`} description={description ?? undefined}>
|
||||||
|
|||||||
Reference in new issue
Block a user