Add countdown audio per presentation
One audio file per poll (MP3, M4A, OGG, WAV) is uploaded in the admin settings and looped in the presenter view while a quiz runs. Format is detected by magic bytes, files are served with a fixed content type, copied with the poll and swept by images_cleanup. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cad09163d9
commit
2f7a401522
16 files changed
+648
-11
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user