templates/components/video.html.twig line 1

Open in your IDE?
  1. {% if article.videoPoster is empty %}
  2.     {% set video_poster = '/build/images/poster_default.png' %}
  3. {% else %}
  4.     {% set video_poster = '/uploads/images/' ~  article.videoPoster.src %}
  5. {% endif %}
  6. {% set videoMetaTagArray = {} %}
  7. {% for metaTag in article.video.mediaMetaTags %}
  8.     {% set key = metaTag.getKey() %}
  9.     {% set videoMetaTagArray = videoMetaTagArray|merge({(key): metaTag}) %}
  10. {% endfor %}
  11. <div class="videoo">
  12.     <div class="vid_thumbainl">
  13.         <a href="{{ path('post_show', {'slug' : article.slug}) }}" title="{{ article.video.title }}">
  14.             <img src="{{ video_poster }}" alt="{{ article.video.title }}">
  15.             {% if videoMetaTagArray.duration is defined %}
  16.                 {% set minutes = videoMetaTagArray.duration.value // 60 %}
  17.                 {% set seconds = videoMetaTagArray.duration.value % 60 %}
  18.                 <span class="vid-time">{{ minutes }}:{{ seconds }}</span>
  19.             {% endif %}
  20.         </a>
  21.     </div>
  22.     <!--vid_thumbnail end-->
  23.     <div class="video_info">
  24.         <h3>
  25.             <a href="{{ path('post_show', {'slug' : article.slug}) }}" title="">{{ article.video.title }}</a>
  26.         </h3>
  27.         <h4>
  28.             <!--<a href="Single_Channel_Home.html" title="">-->
  29.             {{ article.category.title }}
  30.             <!--</a>-->
  31.         </h4>
  32.         <span>
  33.             <small class="posted_dt">{{ article.createdAt|date(config.dateFormat) }}</small>
  34.         </span>
  35.     </div>
  36. </div>