Leite Vorschaubilder und Filmstufen geschuetzt ab
Deploy Test / test (push) Successful in 2m28s
Deploy Test / deploy (push) Failing after 14s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-16 09:40:59 +01:00
1 parent d6ff881e4e
commit c997eb500c
32 files changed
+979 -68

No files matched your search

+7
View File
@@ -700,6 +700,13 @@ body.member .thumb .flag {
border-radius: var(--radius-pille);
}
body.member .thumb img {
width: 100%;
height: 8rem;
object-fit: cover;
border-radius: 8px;
}
body.member .thumb-label {
align-self: flex-start;
background: rgb(255 255 255 / 92%);
+22
View File
@@ -1,3 +1,25 @@
import Hls from 'hls.js';
document.querySelectorAll('video[data-hls]').forEach((video) => {
const source = video.dataset.hls;
if (!source) {
return;
}
if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = source;
return;
}
if (Hls.isSupported()) {
const playback = new Hls();
playback.loadSource(source);
playback.attachMedia(video);
}
});
document.addEventListener('click', (event) => {
const fullscreen = event.target.closest('[data-fullscreen]');
+1 -1
View File
@@ -28,7 +28,7 @@
@endif
@if ($entry['playable'])
<div class="player">
<video controls preload="metadata" playsinline src="{{ $entry['url'] }}"></video>
<video controls preload="metadata" playsinline @if (($entry['playback'] ?? 'file') === 'hls') data-hls="{{ $entry['url'] }}" @else src="{{ $entry['url'] }}" @endif></video>
<button class="button button-quiet" type="button" data-fullscreen>Vollbild</button>
</div>
@elseif ($entry['allowed'] && $entry['url'])
+3
View File
@@ -75,6 +75,9 @@
'card' => $program + [
'error' => $program['composition']->thumbnail_error,
'image' => filled($program['composition']->thumbnail_path) ? ($program['composition']->thumbnail_alt ?: 'Vorschaubild') : null,
'image_url' => str_starts_with((string) $program['composition']->thumbnail_path, 'vorschau/')
? route('member.thumbnail', ['kind' => 'komposition', 'subject' => $program['composition']->id])
: null,
],
])
@endforeach
@@ -9,7 +9,11 @@
<a href="{{ $href }}">
<div class="thumb">
<span class="flag">{{ $card['kind'] ?: 'Material' }}</span>
<span class="thumb-label">{{ filled($card['image'] ?? null) ? $card['image'] : 'Platzhalter' }}</span>
@if (filled($card['image_url'] ?? null))
<img src="{{ $card['image_url'] }}" alt="{{ $card['image'] ?: 'Vorschaubild' }}">
@else
<span class="thumb-label">{{ filled($card['image'] ?? null) ? $card['image'] : 'Platzhalter' }}</span>
@endif
</div>
<div class="card-copy">
<h2>{{ $card['title'] }}</h2>
@@ -20,7 +20,7 @@
@if ($node['output_class'] === 'audio')
<audio controls preload="metadata" src="{{ $node['view_url'] }}"></audio>
@else
<video controls preload="metadata" playsinline src="{{ $node['view_url'] }}"></video>
<video controls preload="metadata" playsinline @if (($node['playback'] ?? 'file') === 'hls') data-hls="{{ $node['view_url'] }}" @else src="{{ $node['view_url'] }}" @endif></video>
<button class="button button-quiet" type="button" data-fullscreen>Vollbild</button>
@endif
</div>
+7 -1
View File
@@ -30,7 +30,13 @@
@endif
<div>
<dt>Vorschaubild</dt>
<dd>{{ filled($composition->thumbnail_path) ? ($composition->thumbnail_alt ?: 'Vorschaubild') : 'Platzhalter' }}</dd>
<dd>
@if (str_starts_with((string) $composition->thumbnail_path, 'vorschau/'))
<img src="{{ route('member.thumbnail', ['kind' => 'komposition', 'subject' => $composition->id]) }}" alt="{{ $composition->thumbnail_alt ?: 'Vorschaubild' }}">
@else
Platzhalter
@endif
</dd>
</div>
</dl>
@if (filled($composition->thumbnail_error))
+3
View File
@@ -6,6 +6,9 @@
<p class="crumb"><a href="{{ route('member.library') }}">Bibliothek</a></p>
<article class="reading">
<h1>{{ $version->element->working_title }}</h1>
@if (filled($reader ?? null) && filled($copy ?? null))
<p class="state state-hinweis">Lizenziert für {{ $reader }} · Lizenzkopie {{ $copy }}</p>
@endif
@if (filled($license ?? null))
<p class="state state-hinweis">Lizenzkennzeichnung: {{ $license }}</p>
@endif