Skip to content

Commit

Permalink
support aspect-ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinGab committed Jan 10, 2024
1 parent 7b0e7b2 commit 527c345
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/views/components/video.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
'media',
])

<video {!! $attributes !!} height="{{ $media->getHeight($conversion) }}" width="{{ $media->getWidth($conversion) }}"
<video {!! $attributes->merge([
'style' => $media->aspect_ratio ? "aspect-ratio:{$media->aspect_ratio};" : null,
]) !!} height="{{ $media->getHeight($conversion) }}" width="{{ $media->getWidth($conversion) }}"
alt="{{ $media->getName($conversion) }}"
poster="{{ $poster ?? $media->getUrl($conversion ? $conversion . '.poster' : 'poster') }}"
src="{{ $src ?? $media->getUrl() }}">
Expand Down

0 comments on commit 527c345

Please sign in to comment.