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
+7
-1
@@ -37,7 +37,11 @@ return function (RouteBuilder $routes): void {
|
||||
$builder->connect('/p/{code}/img/{file}', 'Participate::image', ['_name' => 'participate:image'])
|
||||
->setPatterns(['code' => '[A-Za-z0-9-]{4,16}', 'file' => '[a-f0-9]{24}\.webp'])
|
||||
->setPass(['code', 'file']);
|
||||
$builder->connect('/p/{code}/vote', 'Participate::vote', ['_name' => 'participate:vote'])
|
||||
// Countdown audio of a poll (played by the presenter view): random file name, only files of this poll.
|
||||
$builder->connect('/p/{code}/audio/{file}', 'Participate::audio', ['_name' => 'participate:audio'])
|
||||
->setPatterns(['code' => '[A-Za-z0-9-]{4,16}', 'file' => '[a-f0-9]{24}\.(mp3|ogg|wav|m4a)'])
|
||||
->setPass(['code', 'file']);
|
||||
$builder->connect('/p/{code}/vote','Participate::vote', ['_name' => 'participate:vote'])
|
||||
->setPatterns(['code' => '[A-Za-z0-9-]{4,16}'])
|
||||
->setPass(['code'])
|
||||
->setMethods(['POST']);
|
||||
@@ -67,6 +71,8 @@ return function (RouteBuilder $routes): void {
|
||||
$admin->connect('/', 'Admin::index', ['_name' => 'admin'])->setPatterns($token);
|
||||
$admin->connect('/settings', 'Admin::settings', ['_name' => 'admin:settings'])
|
||||
->setPatterns($token)->setMethods(['POST']);
|
||||
$admin->connect('/audio', 'Admin::audio', ['_name' => 'admin:audio'])
|
||||
->setPatterns($token)->setMethods(['POST']);
|
||||
$admin->connect('/rotate-token', 'Admin::rotateToken', ['_name' => 'admin:rotate'])
|
||||
->setPatterns($token)->setMethods(['POST']);
|
||||
$admin->connect('/rotate-embed-key', 'Admin::rotateEmbedKey', ['_name' => 'admin:rotate-embed'])
|
||||
|
||||
Reference in new issue
Block a user