<div class='col-md-2 d-flex flex-column gap-2'>
<div class='card bg-transparent border-0' style='aspect-ratio: 1/1; width: 100%; flex: 1;'>
" . Html::a(
- Html::img(isset($previewImageUrls[1]) ? $previewImageUrls[1] : '', [
- 'style' => 'width: 100%; height: 100%; object-fit: cover;',
- ]),
- 'javascript:;', // ссылка не должна вести никуда
+
+ '<video autoplay muted loop playsinline style="width: 100%; height: 100%; object-fit: cover;">
+ <source src="' . Url::to($model->presentation->url ?? null) . '" type="video/mp4">
+ </video>',
+ 'javascript:;',
[
'data-fancybox' => $galleryId,
'data-src' => '<video controls style="width:100%; height:auto;">
- <source src="' . Url::to($model->presentation->url ?? null) . '" type="video/mp4">
- </video>',
+ <source src="' . Url::to($model->presentation->url ?? null) . '" type="video/mp4">
+ </video>',
'data-type' => 'html'
]
) . "
<div class='col-md-2 d-flex flex-column gap-2'>
<div class='card bg-transparent border-0' style='aspect-ratio: 1/1; width: 100%; flex: 1;'>
- " . Html::a(
- Html::img(isset($previewImageUrls[2]) ? $previewImageUrls[2] : '', [
- 'style' => 'width: 100%; height: 100%; object-fit: cover;',
- ]),
+ " . Html::a(
+
+ '<video autoplay muted loop playsinline style="width: 100%; height: 100%; object-fit: cover;">
+ <source src="' . Url::to($model->buildProcess->url ?? null) . '" type="video/mp4">
+ </video>',
'javascript:;',
[
'data-fancybox' => $galleryId,
'data-src' => '<video controls style="width:100%; height:auto;">
- <source src="' . Url::to($model->buildProcess->url ?? null) . '" type="video/mp4">
- </video>',
+ <source src="' . Url::to($model->buildProcess->url ?? null) . '" type="video/mp4">
+ </video>',
'data-type' => 'html'
]
) . "