feat(youtube): playlist support + URL parsing in youtube_video block
YoutubeVideoBlockData gains an optional `playlistId`. The block now accepts either a video, a playlist, or both, and either field can be filled with a raw ID *or* a full youtube.com / youtu.be URL — a helper extracts the ?v= and ?list= parameters automatically. Embed routing: - video only → /embed/<id>?rel=0 - playlist only → /embed/videoseries?list=<plid>&rel=0 - video + playlist → /embed/<id>?list=<plid>&rel=0 - block.params merged via URLSearchParams Also tweaks ImageGalleryBlock (grid variant): green padding/contain fit, darker caption gradient, smaller left-aligned label that expands on hover. Hides post_overview block when no posts and no intro text (prevents a bare heading on /mediathek).
This commit is contained in:
@@ -155,6 +155,13 @@ export interface YoutubeVideoBlockData {
|
||||
_type?: "youtube_video";
|
||||
_slug?: string;
|
||||
youtubeId?: string;
|
||||
/**
|
||||
* Playlist-ID (PLxxxxx). Wenn ohne youtubeId gesetzt, lädt die Playlist
|
||||
* von vorne; mit youtubeId startet das Video in der Playlist.
|
||||
* Akzeptiert auch direkte URLs wie
|
||||
* https://www.youtube.com/watch?v=...&list=PL... (wird parsed).
|
||||
*/
|
||||
playlistId?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
params?: string;
|
||||
|
||||
Reference in New Issue
Block a user