Add YouTube video slide type
CI / Deploy / test (push) Successful in 46s
CI / Deploy / deploy (push) Skipped

Admins paste a YouTube link (watch, youtu.be, shorts, live, embed).
The link is checked via oEmbed on save and with a "check link" button
(not found / not embeddable is rejected, unreachable saves with a
warning). Start time can be entered or is taken from the link's
timecode; autoplay is optional. The presenter embeds the video via
youtube-nocookie.com; participants get the link plus a share button
(Web Share API, falls back to copying).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-07 15:08:12 +01:00
1 parent 93aeae1884
commit 1c509e31c2
14 files changed
+972 -24

No files matched your search

+23
View File
@@ -47,6 +47,29 @@ $countdown = function (?int $remaining): string {
<p class="muted"><?= __('Warte, bis die erste Frage gestartet wird. Die Seite aktualisiert sich automatisch.') ?></p>
</section>
<?php elseif ($slide->isYouTube()) :
$watchUrl = $slide->youtubeWatchUrl(); ?>
<section class="card">
<p class="eyebrow"><?= __('Video') ?></p>
<h1><?= h($slide->question) ?></h1>
<?php if ($slide->description) : ?>
<div class="prose"><?= nl2br(h($slide->description)) ?></div>
<?php endif; ?>
<?php if ($watchUrl !== null) : ?>
<p class="video-link">
<a class="button button--primary button--block" href="<?= h($watchUrl) ?>" target="_blank" rel="noopener noreferrer">
▶ <?= __('Auf YouTube ansehen') ?>
</a>
</p>
<div class="copy-field share-field">
<input type="text" readonly value="<?= h($watchUrl) ?>" aria-label="<?= __('Link zum Video') ?>" data-copy-source>
<button type="button" class="button" hidden
data-share data-share-url="<?= h($watchUrl) ?>" data-share-title="<?= h($slide->question) ?>"
data-label-share="<?= __('Teilen') ?>" data-label-copy="<?= __('Link kopieren') ?>"><?= __('Teilen') ?></button>
</div>
<?php endif; ?>
</section>
<?php elseif (!$slide->isInteractive()) : ?>
<section class="card">
<h1><?= h($slide->question) ?></h1>