<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
    xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
    data-namespace-typo3-fluid="true">
    <a href="{be:uri.editRecord(
        uid: uid,
        table: 'tt_content'
    )}">
        <f:for each="{videos}" as="video">
            <figure>
                <video controls preload="metadata">
                    <source src="/{video.publicUrl}" type="video/mp4">
                </video>
                <figcaption>
                    <p>Video v{video.originalFile.uid}: {video.title}</p>
                    <p>
                        <f:if condition="{video.properties.youtube}">
                            <f:then>
                                The Video is available on YouTube: <f:link.typolink parameter="https://www.youtube.com/watch?v=EZkwnqb-4vk" target="_blank">https://www.youtube.com/watch?v={video.properties.youtube}</f:link.typolink>.
                            </f:then>
                            <f:else>
                                The Video is not available on YouTube
                            </f:else>
                        </f:if>
                    </p>
                    <p>{video.description -> f:format.nl2br()}</p>

                    <p>
                        <f:if condition="{video.properties.poster}">
                            <f:then>
                                <f:image image="{video.properties.poster}" height="210" width="375" />
                            </f:then>
                            <f:else>
                                No poster configured.
                            </f:else>
                        </f:if>
                    </p>
                </figcaption>
            </figure>
        </f:for>
    </a>
</html>