video sekcija: YouTube predvajalnik na strani (Google zahteva predvajljiv video za indeksiranje, oglasi tecejo YouTubov), VideoObject kaze na cel video; /videos je zdaj mreza YouTube videov z rubrikami; video-sitemap.xml in vpis v robots; ingest brez napovednika (samo metapodatki in naslovnica)
This commit is contained in:
@@ -20,8 +20,9 @@ export interface YtVideo {
|
||||
description: string;
|
||||
chapters: { t: string; label: string }[];
|
||||
tags: string[];
|
||||
previewUrl: string;
|
||||
previewUrl: string | null;
|
||||
previewS: number;
|
||||
embedUrl?: string;
|
||||
posterUrl: string;
|
||||
youtubeUrl: string;
|
||||
}
|
||||
@@ -83,15 +84,19 @@ export default function VideoDetailPage() {
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<div className="rounded-lg overflow-hidden bg-black">
|
||||
<video
|
||||
controls
|
||||
playsInline
|
||||
preload="metadata"
|
||||
poster={v.posterUrl}
|
||||
src={v.previewUrl}
|
||||
className="w-full aspect-video"
|
||||
data-testid="video-preview"
|
||||
{/* Pravi YouTube predvajalnik: Google zahteva predvajljiv video na
|
||||
strani, oglasi pa tecejo enako kot na youtube.com. Navadna
|
||||
vdelava s klikom na play — brez samodejnega predvajanja, ker
|
||||
YouTube v tem primeru oglasov ne servira. */}
|
||||
<div className="rounded-lg overflow-hidden bg-black aspect-video">
|
||||
<iframe
|
||||
src={v.embedUrl || `https://www.youtube-nocookie.com/embed/${v.ytId}`}
|
||||
title={v.shortTitle}
|
||||
className="w-full h-full"
|
||||
style={{ border: 0 }}
|
||||
allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowFullScreen
|
||||
data-testid="video-embed"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +104,6 @@ export default function VideoDetailPage() {
|
||||
<span className="rounded bg-primary/10 px-2 py-1 font-semibold text-primary">{v.rubrik}</span>
|
||||
<span className="flex items-center gap-1"><Clock className="w-3.5 h-3.5" />{dauer(v.durationS)}</span>
|
||||
<span>{format(new Date(v.publishedAt), "d. MMMM yyyy", { locale: de })}</span>
|
||||
<span className="text-muted-foreground/70">Vorschau {v.previewS} Sek.</span>
|
||||
</div>
|
||||
|
||||
<h1 className="mt-3 text-2xl sm:text-3xl font-bold text-foreground leading-tight" data-testid="text-video-title">
|
||||
|
||||
Reference in New Issue
Block a user