Files
laraundfelix/resources/views/content/player.blade.php
T
LarsandCursor 8e77defaca
Deploy Test / test (push) Successful in 28s
Deploy Test / deploy (push) Successful in 39s
Wähle das Vorschaubild am Medium und nutze es als Standard in der Anzeige und in Modulen.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-16 21:34:11 +01:00

29 lines
1.3 KiB
PHP

@php
$metadata = is_array($version->metadata) ? $version->metadata : [];
$class = $version->element->output_class;
$poster = \App\Domain\Media\ThumbnailRef::url('editorial.card', 'element', $version->element->id, $version->element->thumbnail_path);
@endphp
@if ($fileUrl)
@if ($class === 'film')
<video controls preload="metadata" playsinline @if ($poster) poster="{{ $poster }}" @endif src="{{ $fileUrl }}" style="width: 100%; max-height: 70vh; background: #111;"></video>
@elseif ($class === 'audio')
<audio controls preload="metadata" src="{{ $fileUrl }}" style="width: 100%;"></audio>
@elseif ($class === 'bild')
<img src="{{ $fileUrl }}" alt="{{ $version->element->working_title }}" style="max-width: 100%; height: auto;">
@else
<iframe src="{{ $fileUrl }}" title="Fassung {{ $version->number }}" style="width: 100%; height: 70vh; border: 0;"></iframe>
@endif
<p><a href="{{ $fileUrl }}">Datei öffnen</a></p>
@elseif ($pending)
<p>Die Datei wird noch übernommen.</p>
@elseif (is_string($metadata['file'] ?? null))
<p>Für Fassung {{ $version->number }} ist eine Datei vorgemerkt, sie liegt aber nicht vor.</p>
@endif
@if (filled($version->body))
<article class="prose">
{!! nl2br(e($version->body)) !!}
</article>
@endif