typo3 fluid: dynamic video tag attributes

revision ff520c8603a58e5115f521d5cfa96111b0eef696

raw

phork0.txt

<v:variable.set name="videoAtts" value="{
  controls:   'controls',
  preload:    'metadata'
}"/>
<f:if condition="settings.autplay">
  <v:variable.set name="videoAtts.autoplay" value="autoplay"/>
</f:if>
<f:if condition="settings.poster">
  {v:content.resources.fal(field: 'settings.poster') -> v:iterator.first() -> v:variable.set(name: 'poster')}
  <f:if condition="{poster}">
    <v:variable.set name="videoAtts.poster" value="{poster.url}"/>
  </f:if>
</f:if>

<v:tag name="video"
       id="video-{record.uid}" class="video-js vjs-default-skin"
       additionalAttributes="{videoAtts}">
  <f:render section="Sources" />
</v:tag>

History