Skip to content

Commit

Permalink
Replace TL_FILES_URL with assets context
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Aug 18, 2022
1 parent 0fac619 commit 4d50d15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Resources/contao/templates/rsts_default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<<?= $tagName ?> data-rsts-type="video" <?= $attributes ?>>
<video<?php if (empty($slide['hideVideoControls'])): ?> controls<?php endif ?><?php if (!empty($slide['image'])): ?> poster="<?= $slide['image']->src ?>"<?php endif ?><?php if (!empty($slide['muteVideos'])): ?> muted<?php endif ?><?php if (!empty($slide['videosPlayInline'])): ?> playsinline webkit-playsinline<?php endif ?>>
<?php foreach ($slide['videos'] as $video): ?>
<source src="<?= TL_FILES_URL . $video->path ?>" type="video/<?= $video->extension ?>">
<source src="<?= Contao\System::getContainer()->get('contao.assets.files_context')->getStaticUrl() . $video->path ?>" type="video/<?= $video->extension ?>">
<?php endforeach ?>
</video>

Expand Down Expand Up @@ -192,7 +192,7 @@
<?php if (!empty($slide['backgroundVideos'])): ?>
<video<?php if (!empty($slide['backgroundImage'])): ?> poster="<?= $slide['backgroundImage']->src ?>"<?php endif ?><?php if (!empty($slide['muteVideos'])): ?> muted<?php endif ?> playsinline webkit-playsinline <?= $backgroundAttributes ?>>
<?php foreach ($slide['backgroundVideos'] as $video): ?>
<source src="<?= TL_FILES_URL . $video->path ?>" type="video/<?= $video->extension ?>">
<source src="<?= Contao\System::getContainer()->get('contao.assets.files_context')->getStaticUrl() . $video->path ?>" type="video/<?= $video->extension ?>">
<?php endforeach ?>
</video>
<?php elseif (!empty($slide['backgroundImage'])): ?>
Expand Down

0 comments on commit 4d50d15

Please sign in to comment.