Merge pull request 'Add countdown audio per presentation' (#117) from feature/quiz-audio into main
CI / Deploy / PHP 8.4 (push) Successful in 1m16s
CI / Deploy / PHP 8.5 (push) Successful in 1m34s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Successful in 7s

Reviewed-on: #117
This commit was merged in pull request #117.
This commit is contained in:
gnilebein committed 2026-11-21 11:46:28 +01:00
commit 918270540f
16 files changed
+648 -11

No files matched your search

+23
View File
@@ -280,6 +280,29 @@ $hasInternal = array_filter($slides, fn($slide) => !$slide->is_hidden && $slide-
<p class="hint" id="comment-speed-hint"><?= __('Gilt für die Kommentare von Skala-Folien, die nacheinander durchlaufen. Die Anzeigedauer richtet sich weiter nach der Textlänge und wird mit diesem Faktor verkürzt oder verlängert.') ?></p>
<?= $this->Form->button(__('Speichern'), ['class' => 'button']) ?>
<?= $this->Form->end() ?>
<section class="card-section">
<h3 id="audio"><?= __('Musik zum Quiz-Countdown') ?></h3>
<?php $audioMb = (int)round((int)\Cake\Core\Configure::read('Plenario.audio.maxUploadBytes', 10 * 1024 * 1024) / 1024 / 1024); ?>
<p class="hint"><?= __('Eine Audiodatei für die ganze Präsentation (MP3, M4A, OGG oder WAV, bis {0} MB). Sie läuft in der Präsentationsansicht, solange ein Quiz läuft, und wiederholt sich, wenn sie kürzer ist als der Countdown. Teilnehmende hören nichts davon.', $audioMb) ?></p>
<?php if ($poll->hasAudio()) : ?>
<audio controls preload="none" class="audio-player"
src="<?= h($this->Url->build(['_name' => 'participate:audio', 'code' => $poll->join_code, 'file' => $poll->audio])) ?>"></audio>
<?php endif; ?>
<?= $this->Form->create(null, ['url' => $url('admin:audio'), 'type' => 'file']) ?>
<div class="input file">
<label for="audio-file"><?= $poll->hasAudio() ? __('Durch andere Datei ersetzen') : __('Audiodatei auswählen') ?></label>
<input type="file" id="audio-file" name="audio" accept="audio/mpeg,audio/mp4,audio/ogg,audio/wav,.mp3,.m4a,.ogg,.wav" required>
</div>
<?= $this->Form->button(__('Hochladen'), ['class' => 'button button--small']) ?>
<?= $this->Form->end() ?>
<?php if ($poll->hasAudio()) : ?>
<?= $this->Form->postButton(__('Audiodatei entfernen'), $url('admin:audio'), [
'class' => 'button button--small button--danger',
'data' => ['remove' => '1'],
'data-confirm' => __('Die Audiodatei entfernen?'),
]) ?>
<?php endif; ?>
</section>
<section class="card-section">
<h3 id="embed"><?= __('In Präsentation einbetten') ?></h3>
<p class="hint"><?= __('Jede Folie hat einen eigenen Einbett-Link (unter „Einbett-Link“ in der Folienliste). Füge ihn z. B. in Canva als Einbettung auf einer Folie ein.') ?></p>