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} />
|
||||
{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:image" content={new URL(logo512.src, Astro.url).href} />
|
||||
<meta property="og:image" content={logo512.src} />
|
||||
</>
|
||||
)}
|
||||
<slot name="head" />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import WebsiteLayout from '@layouts/website/WebsiteLayout.astro';
|
||||
import VideoPlayer from '@app/website/video/VideoPlayer.svelte';
|
||||
import { getVideoMetadata, resolveVideo } from '@util/video.ts';
|
||||
import { BASE_HOST, BASE_PATH } from 'astro:env/server';
|
||||
|
||||
const { name } = Astro.params;
|
||||
|
||||
@@ -12,8 +13,7 @@ const metadata = await getVideoMetadata(video);
|
||||
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 streamPath = `${BASE_HOST}/${BASE_PATH}/video/${encodeURIComponent(video.name)}/stream`;
|
||||
---
|
||||
|
||||
<WebsiteLayout title={`${title} - Video`} description={description ?? undefined}>
|
||||
|
||||
Reference in new issue
Block a user