typo3 fluid: dynamic video tag attributes

revision ac770eab1a92f3d989b4d630c35d677d538a1cbc

raw

phork0.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<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