-
September 10, 2020, 07:48 PM
#1
Senior Member
Display a youtube video out of photo preview
Hi, I'd like to get the code to display youtube videos in a different place than the videos.
Which code should I please use? Thank you in advance
-
September 11, 2020, 02:36 PM
#2
Senior Member
<iframe width="" height="" src="{if $photos.0.Type == 'video' && $photos.0.Original == 'youtube'}{$photos.0.href}{/if}" frameborder="0" allowfullscreen></iframe>
<video id="player" class="hide" controls>
<source src="" type="video/mp4">
</video>
When using the code alone, the video doesn't come out.
How to bring it out with a foreach or ?